【发布时间】:2012-03-06 13:11:25
【问题描述】:
我正在实现 twitter 应用程序,例如 #Discover 选项卡的动画。当用户点击搜索栏时,navigationBar 消失,tableView 电影向上,并且取消按钮显示在搜索栏上。这是代码...
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar
{
[self.navigationController setNavigationBarHidden:YES animated:YES];
[self.searchBar setShowsCancelButton:YES animated:YES];
[self.scrollView setContentOffset:CGPointMake(0, 55) animated:YES];
[self.view addSubview:backImgView];
return YES;
}
这很好用,但仅在我第一次点击搜索栏时延迟大约半秒,之后它很快。 有什么想法吗?
【问题讨论】:
标签: iphone performance animation tableview searchbar