我想在推送视图控制器时显示自定义动画:我希望实现像"扩展"动画这样的东西,这意味着新视图从给定的矩形扩展,让动画期间[100,100 220,380]全屏显示.
任何建议从哪里开始,分别是任何文档,教程,链接?:)
好的.我可以使用以下代码制作展开动画:
if ([coming.view superview] == nil)
[self.view addSubview:coming.view];
coming.view.frame = CGRectMake(160,160,0,0);
[UIView beginAnimations:@"frame" context:nil];
[UIView setAnimationDuration:4];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[coming viewWillAppear:YES];
[going viewWillAppear:YES];
coming.view.frame = CGRectMake(0, 0, 320, 480);
[going viewDidDisappear:YES];
[coming viewDidAppear:YES];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
我的视图已正确显示,但遗憾的是导航栏未更新.有没有办法手动完成?
在示例代码中,一个函数被称为0.03秒,用于更新视图的转换.不幸的是,当推动一个时UIViewController,我无法调整视图的框架...我是吗?
iphone animation uiviewcontroller uikit uinavigationcontroller