是否可以使用标准属性语法将块作为属性?
ARC有什么变化吗?
我正在尝试使用自定义segue来执行一种缩放动画.执行转换时,sourceViewController变黑,然后进行缩放.
试图将pushViewController:设置为完成块,但根本不执行转换.
- (void)perform {
UIViewController *sourceViewController = (UIViewController *) self.sourceViewController;
UIViewController *destinationViewController = (UIViewController *) self.destinationViewController;
[destinationViewController.view setTransform:CGAffineTransformMakeScale(0.5,0.5)];
[destinationViewController.view setAlpha:0.0];
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationCurveEaseOut
animations:^{
[destinationViewController.view setTransform:CGAffineTransformMakeScale(1.0,1.0)];
[destinationViewController.view setAlpha:1.0];
[sourceViewController.navigationController pushViewController:destinationViewController animated:NO];
}
completion:^(BOOL finished){
}];
}
Run Code Online (Sandbox Code Playgroud)
我做错了什么?