我有一个containerview有2个子视图。我想从一个翻到另一个。问题是出现了某种闪烁现象。它不会发生在iPhone 3GS上,但在模拟器和iPhone 3G上: http://www.hanspinckaers.com/upload/Flickering.png闪烁的动画与UIViewAnimationTransitionFlip
有没有人知道为什么会发生这种情况?
这是代码:
[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];
提前感谢!
汉斯
http://www.hanspinckaers.com/upload/Flickering.zip,在这里你可以看到它发生。 – HansPinckaers 2010-01-22 21:15:10