Check Mobile App
Read now
Start a Project

Fix Keyboard Related issue in iOS 11 using objective C

Save

Fix Keyboard Related issue in iOS 11

In iOS 11 there is some predefined function is not working like get the Keyboard Height “UIKeyboardFrameBeginUserInfoKey”  sometimes it returns 0 or sometimes works so it is not compatible with iOS 11 . so for solving this, we have used the compatible function which will work in iOS 11 as well as less iOS version devices.

for this follow this steps:

1: In viewdidload

write this method:

2: Now define this function:

3: Now write the two methods when the keyboard will show or hide.

4: Now keyboard Height will always return the correct value and now you can use according to their need.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


1 comments

  • kevin van
    Hi, I use the exact same methods as you did. However, I find that when I test my app in iPad4,I touch the textfield and hide my keyboard and touch the same textfield again, “keyboardSize.height” is wrong.
  • css.php

    When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

    Michael Urresta

    Michael Urresta

    Talk to Sales

    Global

    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home