一,工程圖。 二,代碼。 RootViewControlle.m //點擊任何處,頁面翻轉 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { FirstViewController *first=[[FirstView ...
一,工程圖。
二,代碼。
RootViewControlle.m
//點擊任何處,頁面翻轉
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
FirstViewController *first=[[FirstViewController alloc]init];
CATransition *animation = [CATransition animation];
[animation setType:@"cube"];
[animation setSubtype:kCATransitionFromLeft];
[animation setDuration:1.0f];
[self.navigationController.view.layer addAnimation:animation forKey:@"test"];
[self.navigationController pushViewController:first animated:NO];
}