相关疑难解决方法(0)

我可以使用Objective-C块作为属性吗?

是否可以使用标准属性语法将块作为属性?

ARC有什么变化吗?

objective-c ios objective-c-blocks automatic-ref-counting

319
推荐指数
6
解决办法
11万
查看次数

自定义Segue动画

我正在尝试使用自定义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)

我做错了什么?

uiview uiviewanimation ios uistoryboardsegue

10
推荐指数
1
解决办法
1万
查看次数