我有一个UITableView与UISearchBar作为tableViews.tableHeaderView。就像3.0中的新Mail.app,Notes.app等。我想隐藏SearchBar,直到用户在他的视线中拖动它。滚动UITableView,使标题不可见
我的尝试只在tableView中有几个项目时才起作用,所以tableView实际上需要滚动。我称这种现象的loadView:
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self._tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
但似乎苹果不同的方式处理这样的serachbar。拖出搜索栏后,它似乎不再受限于表格单元(在Notes.app中,而不在Mail.app中)。
但也许苹果有一个独特的方法,新的3.0行为,我只是无法找到它?
结帐夫妇为`UIViewController`新的属性。 [https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/TransitionGuide/AppearanceCustomization.html#//apple_ref/doc/uid/TP40013174-CH15-SW1](https://developer。 apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/TransitionGuide/AppearanceCustomization.html#//apple_ref/doc/uid/TP40013174-CH15-SW1) – 2013-09-13 19:40:21