keyboardWillShow will only work from the second time on
I have a UITextView that I need to move up when the user focuses on it.
In the simulator I have set up 2 keyboards (English,Greek)
keyboardWillShow function I change the UITextView’s height to be less than the existing one, as in
self.page_text.frame = CGRectMake(self.page_text.frame.origin.x, self.page_text.frame.origin.y, self.page_text.frame.width, (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as NSValue).CGRectValue().origin.y - 180)
The problem is that only each first time I focus on the text view the keyboard appears but the UITextView’s height does not change:
After that first time, each time I change the keyboard’s language the text view behaves as expected.
Why could this be happening?
The project can be found here
PS: I noticed that if the two keyboards are in the same language (ex US English and UK English), the height never changes. How strange is that?
- Objective-C: Compiler error when overriding a superclass getter and trying to access ivar
- Getter vs Computed property. What would warrant using one of these approaches over the other?
- Core Data Crash: : object cannot be nil
- Array filter in Swift3
- Storing 'long' type in firebase
- Get the main app bundle from within extension
- Where we have to store download data in iPhone application?
- UITableView cell textLabel color
- How to obtain the selected text from another application?
- GCDAsyncUdpSocket on iOS missing multicasted datagrams
- Xcode crashing when deleting iPad RR variant
- Capturing Video with AVFoundation
- Pop animation is not working in first UINavigationController of UITabbarController
- Swift: Insert Alert Box with Text Input (and Store Text Input )
- The best way to use checkbox – IOS swift
- Xcode 6 – xcassets for universal image support
- Get Android Device and OS Info in Firemonkey
- How To Access Camera & Camera Roll Objective-C
- iOS: Convert UTC NSDate to local Timezone
- How to use NSString drawInRect to center text?
- Convert an UIImage in a texture