当滚动UItableview
并向下滚动显示时,我如何让UISearchBar
隐藏,就像GLIDE - VIDEO TEXT iPhone应用程序一样?UISearchBar作为标题UITableView
0
A
回答
0
试试这个
UISearchBar *temp = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 45)];
temp.barStyle=UIBarStyleBlackTranslucent;
temp.showsCancelButton=NO;
temp.autocorrectionType=UITextAutocorrectionTypeNo;
temp.autocapitalizationType=UITextAutocapitalizationTypeNone;
temp.delegate=self;
YourTable.tableHeaderView=temp;
终于YourTableView添加到滚动型。
[yourScrollView addSubView:YourTableView];
可能是它帮助你
+0
它确实符合我的预期。我希望UISearchBar始终位于UITableView的顶部,但在滚动表格时不会向下滚动。但是当滚动时它会隐藏(在UINavigationBar下)。谢谢! – user3828270 2014-10-31 02:32:48
0
你必须把作为的UISearchBar的的UITableView头。即使行与部分(如Glide)一样,它也可以工作。
希望它有帮助。
相关问题
- 1. PickerView标题作为UITableView?
- 2. UISearchBar作为UITableView的子视图
- 3. 不可避免的保留循环使用UISearchBar作为UITableView的标题视图?
- 4. 当取消触摸时,将UISearchbar作为标题隐藏在UITableview中
- 5. uisearchbar + uitableview + nsfetchedresultscontroller
- 6. 修改UITableView标头中的UISearchBar宽度
- 7. UIViewController与UITableView和UISearchBar间隙问题
- 8. 的UISearchBar +的UITableView UINavigationController的+问题
- 9. 带有UITextField的UITableView作为标题
- 10. 编程添加UITextView作为UITableView标题
- 11. 在UICollectionViewController标题上添加UISearchBar标题
- 12. UITableView不滚动使用UISearchBar
- 13. 的UINavigationController +的UITableView + +的UISearchBar UISplitViewController
- 14. 上面的UITableView节UISearchBar
- 15. UITableView下的MasterViewController UISearchBar(UISplitViewController)
- 16. 缩进UITableView标题标签不工作
- 17. UITableView为图像图标添加标题
- 18. 添加标题为UITableView标题的动态标签
- 19. UITableView固定标题
- 20. UITableView:锚节标题
- 21. UITableView标题视图
- 22. UITableView reloadSections/reloadData:标题视图变为空
- 23. 如何在NavigationBar下插入UISearchBar标题
- 24. UISearchBar表部分索引标题重叠
- 25. UISearchController与UIBarPositionTopAttached抛出UISearchBar offscreen;不可能有UITableView的标准UISearchController?
- 26. 使用UISearchBar而不使用UITableView
- 27. 保持uisearchbar总是在uitableview中可见
- 28. UITableView/UISearchBar返回不正确的结果
- 29. UISearchBar与NSArray(在UITableView中搜索不工作)
- 30. 为什么我的章节标题出现在UISearchBar的一侧?
在章节中添加搜索栏。 – 2014-10-29 05:15:49
@ user3828270如果您可以通过指向外部图片的链接回复此评论,我会将其添加到您的问题中。 – 2014-12-08 15:23:13