2010-01-13 35 views
1

我有一个应用程序,在3.1.2的伟大工程,但是当我恢复到2.2.1我的方法翻转的观点是不行的,用下面的代码:翻阅显示为2.2.1 iPhone的SDK

-(IBAction)infoButtonPressed:(id)sender 
{ 
    SecondViewController *second = [[SecondViewController alloc] initWithNibName: nil bundle:nil]; 

    second.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
    [self presentModalViewController:second animated:YES]; 
} 

我收到以下错误消息(http://screencast.com/t/YTJlYTgz)。关于如何轻松解决这个问题的想法?

回答

2

modalTransitionStyle仅适用于3.0+。如果你想有一个类似的过渡,你将不得不自己创建动画过渡。看看下面的UIView功能

+ (void)setAnimationTransition:(UIViewAnimationTransition)transition forView:(UIView *)view cache:(BOOL)cache