iOS 8 UIView not moving up when keyboard appears

后端 未结 4 1710
甜味超标
甜味超标 2021-02-04 12:32

I am developing a chat app which has UITableView and a UIView containing a UITextField and a UIButton in it. I am using the f

4条回答
  •  [愿得一人]
    2021-02-04 13:36

    You can use an accessoryView, which will attach itself to the top of the keyboard. Alternatively, if you want more power over customization, you can use notifications as explained by @pankaj_wadwha to fetch the frame information. Bonus: you can also get the animation information (such as speed) so your view moves alongside the keyboard perfectly.

提交回复
热议问题