UISearchBar 点击取消回到原来位置时会跳动的解决方法
2015-07-29 15:38
477 查看
今天修改项目里面测试给提的bug,有一个bug就是当点击UISearchBar的取消按钮UISearchBar回到原来位置时会发生偏差50像素左右的跳动,仔细看看前面几个程序写的那个页面,也没有发现UISearchBar的代理方法
去网上找了半天,才发现有一个帖子里说在viewDidLoad中添加这么两句代码就可以
解决问题的帖子:http://stackoverflow.com/questions/20565980/uisearchbar-in-uitableviewheader-strange-animation-on-ios-7-8
-(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar{ }
去网上找了半天,才发现有一个帖子里说在viewDidLoad中添加这么两句代码就可以
[self setAutomaticallyAdjustsScrollViewInsets:YES]; [self setExtendedLayoutIncludesOpaqueBars:YES];不过没给出具体的原因,只是说可能是uikit中的一个错误,不过在查看的过程中也发现还有其他的地方也会出现这个错误,/article/7812333.html
解决问题的帖子:http://stackoverflow.com/questions/20565980/uisearchbar-in-uitableviewheader-strange-animation-on-ios-7-8
相关文章推荐
- Maximum Subarray
- Qt 5.3 下OpenCV 2.4.11 开发(3)简单的GUI项目
- Daikon Forge GUI Library(dfgui)之Scroll Panel
- [UIScreen mainScreen].bounds.size获取设备长宽时的问题
- UILable 设置对齐方式扩展
- 用户选择一个value过滤数据
- 初学miniui之miniui的使用
- easyui获取datagrid所有行、变化行、更新行等数据的方法
- Result Maps collection already contains value for
- UIAlertView,POP返回键盘闪现
- Android学习心得(9) --- ndk-build脚本参数用法
- Easyui 中的placeholder属性
- iOS UIButton按钮图片在上文字在下
- UI 总结-1 UIButton
- iOS UI第一周总结
- priority_queue(优先队列)
- iOS开发UI篇—Quartz2D使用(绘制基本图形)
- hdu5312 Sequence 三角形数的应用
- 1062. Talent and Virtue (25)
- 1062. Talent and Virtue (25)