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