Stronger*
2017-06-29 14:37ios 自定义转场动画的问题
我现在在写自定义转场动画 present跳转的动画,遵循了代理但是代理方法不执行,push跳转的同样是自定义没问题,网上看了demo对比了下没发现区别但是就是不行,下面贴代码
@interface ViewController ()
<
UIViewControllerTransitioningDelegate
@end
@implementation ViewController
-
(void)viewDidLoad {
[super viewDidLoad];
[self initSubviews];self.transitioningDelegate = self;
}
-(void)initSubviews{
self.view.backgroundColor = [UIColor whiteColor];
UIButton * btn = [[UIButton alloc]init];
btn.frame = CGRectMake(100, 100, 50, 50);
btn.backgroundColor = [UIColor redColor];
[btn addTarget:self action:@selector(push) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btn];
}
-(void)push{
ViewController3 * vc = [[ViewController3 alloc]init];
[self presentViewController:vc animated:YES completion:nil];
}
-(id)animationControllerForDismissedController:(UIViewController *)dismissed{
return [[obj_Animation alloc]init];
}
-(id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source{
return [[obj_Animation alloc]init];
}
求教是什么问题
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- iOS 打包上传证书问题
- 发布证书
- ios
- 2个回答
- ios打包时导入的自定义框架framework需要签名吗?
- ios
- 框架
- 2个回答
- iOS 引入第三方API问题
- ios
- api
- 3个回答
- 正则表达式问题(iOS的)
- 正则表达式
- ios
- 1个回答
- 请问IOS 怎么打开自定义图片库
- ios
- 库
- 5个回答