How to mimic Keyboard animation on iOS 7 to add “Done” button to numeric keyboard?

前端 未结 7 994
故里飘歌
故里飘歌 2020-12-02 10:09

I had been doing something like this to mimic the keyboard animation on older version of iOS.

CGRect keyboardBeginFrame;
[[note.userInfo objectForKey:UIKeybo         


        
7条回答
  •  有刺的猬
    2020-12-02 10:49

    If you mean to add the button inside a toolbar (similarly as the mobile Safari does it), you can just use the property inputAccessoryView (both UITextField and UITextView have it) and save yourself all the trouble. This hidden gem is little known, I am glad that I stumbled upon it.

    It works on both iOS 6 and iOS 7, I am using it in my app Routie.

提交回复
热议问题