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?
- @class May I know the proper use of this
- swift sphere combine star data
- Multithreaded use of Core Data (NSOperationQueue and NSManagedObjectContext)
- How to change Default login button in FBSDKLoginButton in ios?
- Load images from NSURL async with RestKit
- simple way to map a json collection response into swift object class
- How to reference property of static library
- NSFetchedResultsController: Multiple FRCs, Delegate Error when Updating
- dequeueReusableCellWithIdentifier error in my UITableView in iOS5
- EXC_BAD_ACCESS EXC_I386_GPFLT while click on button
- How do I automatically perform unit tests on each build?
- Swift- MKMapkit view only one city?
- Calling a method on an uninitialized object (null pointer)
- Is it possible to have different orientations for viewControllers inside UINavigationController?
- Xcode iOS: check if user is logged in and show different views if not