你的位置:首页 > 操作系统

[操作系统]【代码笔记】正方形转换


一,工程图。

二,代码。

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];  }
复制代码