我有在命中调用下面的方法在导航栏中seachButton:UIView的动画不工作第一次
- (IBAction)search:(id)sender
{
if (nil == searchViewController)
searchViewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
searchViewController.view.backgroundColor = [UIColor clearColor];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown
forView:searchViewController.view
cache:NO];
[self.view addSubview:searchViewController.view];
[UIView commitAnimations];
}
应该加载SearchViewController.xib其中包含的UISearchBar和两个按钮的视图。当我第一次调用搜索方法时,视图很快出现一些奇怪的动画,当我再次调用它时,动画就没有问题。有没有人有线索可能是错的?
不幸的是,它并没有使窍门:/ – BobC 2010-05-06 12:30:36