我有一個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