-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { /* 1,不使用動畫 UIViewAnimationTransitionNone 2,從左向右旋轉翻頁 UIViewAnimationTransitionFlipFro ...
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { /* 1,不使用動畫 UIViewAnimationTransitionNone 2,從左向右旋轉翻頁 UIViewAnimationTransitionFlipFromLeft 3,從右向左旋轉翻頁,與UIViewAnimationTransitionFlipFromLeft相反 UIViewAnimationTransitionFlipFromRight 4,卷曲翻頁,從下往上 UIViewAnimationTransitionCurlUp 5,卷曲翻頁,從上往下 UIViewAnimationTransitionCurlDown */ FirstViewController *firstVC=[[FirstViewController alloc]init]; [UIView beginAnimations:nil context:NULL]; //置動畫塊中的動畫屬性變化的曲線 [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; //設置持續時間 [UIView setAnimationDuration:0.5]; //設置過渡的動畫效果 [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO]; [self.navigationController pushViewController:firstVC animated:YES]; //提交動畫 [UIView commitAnimations]; }