欢迎光临
我们一直在努力

仿格瓦拉电影页面切换动画

建站超值云服务器,限时71元/月

仿格瓦拉电影页面切换动画

项目介绍:

仿格瓦拉电影页面切换动画

仿格瓦拉电影的页面切换特效,包含present-dismiss 和push-pop 2个组合的效果。

主要代码:
[Objective-C] 查看源文件 复制代码

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor grayColor];
    // Do any additional setup after loading the view, typically from a nib.

    // 设置代理
    self.trans = [[LawageTrans alloc] init];
    self.navigationController.delegate = self.trans;
    self.transitioningDelegate = self.trans;

    self.btn = [UIButton buttonWithType:UIButtonTypeSystem];
    self.btn.frame = CGRectMake(0, 0, 100, 100);
    self.btn.backgroundColor = [UIColor redColor];
    self.btn.center = self.view.center;
    [self.btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.btn];


    UIButton *bbb = [UIButton buttonWithType:UIButtonTypeSystem];
    bbb.frame = CGRectMake(100, 100, 100, 100);
    [bbb addTarget:self action:@selector(bbbbBtnClick) forControlEvents:UIControlEventTouchUpInside];
    bbb.backgroundColor = [UIColor greenColor];
    [self.view addSubview:bbb];
}
- (void)btnClick {
    ViewController1 *vc = [[ViewController1 alloc] init];
    [self presentViewController:vc animated:YES completion:nil];
}
- (void)bbbbBtnClick {
    ViewController1 *vc = [[ViewController1 alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




lawage.zip
(33.17 KB, 下载次数: 396)

2016-9-2 15:38 上传
点击文件名下载附件


推荐:每周iOS精选推送

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 仿格瓦拉电影页面切换动画
分享到: 更多 (0)