最近在iOS中用到bubble chat listview,找了个比较有名气的lib(MessagesTableViewController)=>https://github.com/jessesquires/MessagesTableViewController 粗略剖析了一下。
其中比较关键的一个功能是当向下拖动UITableView时,手指拖到键盘区时,需要让输入框 resignFirstResponder。作者是通过检测UITableView的内置的panGestureRecognizer的location和velocity来实现的。比较奇怪的是关于键盘frame的获取,作者不是通过UIKeyboardxxxxNotification中的UIKeyboardFrameEndUserInfoKey来获取,而是通过 self.inputAccessoryView = [[UIView alloc] init]
 和 self.keyboard = self.inputAccessoryView.superview;MessagesTableViewController
 
bubble chat listview

 

相关文章:

  • 2021-07-15
  • 2021-09-12
  • 2022-12-23
  • 2021-07-03
  • 2022-01-16
  • 2022-02-20
  • 2021-07-30
  • 2021-08-30
猜你喜欢
  • 2021-10-13
  • 2021-10-19
  • 2021-12-09
  • 2021-09-25
  • 2021-12-27
相关资源
相似解决方案