我有一个带有 2 个子视图的容器视图。我想从一个翻转到另一个。问题是出现了某种闪烁。它不会在 iPhone 3GS 上发生,而是在 Simulator 和 iPhone 3G 上发生: http ://www.hanspinckaers.com/upload/Flickering.png
有谁知道为什么会这样?
这是代码:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration: 0.75];
[UIView setAnimationDidStopSelector:@selector(afterAnimationProceed)];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.containerView cache:YES];
if(self.mapViewController.view.superview){
[self.mapViewController.view removeFromSuperview];
[self.containerView addSubview:self.tableController.view];
} else {
[self.tableController.view removeFromSuperview];
[self.containerView addSubview:self.mapViewController.view];
}
[UIView commitAnimations];
提前致谢!
汉斯