1

I need to get keyboard size for moving View up. But on IOS7 it returned the wrong value.

if let userInfo = notification.userInfo {
        if let keyboardSize =  (userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.CGRectValue() {

            kbHeight = keyboardSize.height

            println("kbHeight")
            println(kbHeight)

            // IOS 7 got 568.0 for Iphone 5s (Landscape)
            // IOS 8 got 193.0 for Iphone 5s (Landscape)

        }
    }

How can i get the right one? Thanks!

Varis Darasirikul
  • 3,013
  • 5
  • 25
  • 35

0 Answers0