我正在尝试为我的视图控制器演示文稿创建缩放动画
我拥有的是
UIViewController *vc =[[UIViewController alloc]initWithNibName:@"nextVC" bundle:[NSBundle mainBundle]];
[vc willMoveToParentViewController:self];
[self addChildViewController:vc];
[self transitionFromViewController:currentViewController toViewController:vc duration:2 options:0 animations:^(void){
vc.view.layer.anchorPoint = currentViewController.view.frame.origin;
vc.view.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
vc.view.frame = currentViewController.view.frame;
}completion:^(BOOL finished){
[vc didMoveToParentViewController:self];
}];
现在这段代码工作,视图控制器出现了。
但不是做我想要的正确比例,而是从右下角飞来。
如何让它从顶部边缘到底部边缘展开