可能这个问题可能是重复的,但我真的需要你的帮助..
UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
NewFeedDetailVC *nextViewController = [[NewFeedDetailVC alloc] initWithNibName:@"NewFeedDetailVC" bundle:[NSBundle mainBundle]];
nextViewController.originRect = imgFrame;
nextViewController.currentscrolloffset=aStylizedView.contentOffset.y;
[window addSubview:nextViewController.view];
[UIView animateWithDuration:0.5
animations:^{
nextViewController.view.frame = CGRectMake(0, 20, 320, ScreenHeight-20);
}
completion:^(BOOL finished){
}];
以上是我尝试在推送之前制作缩放动画的演示代码..
imgFrame 是用户点击右上角的橙色(四个正方形)按钮时将点击的图像,代码如下
[UIView animateWithDuration:0.5
animations:^{
self.view.frame=self.originRect;
}
completion:^(BOOL finished){
[test removeFromSuperview];
[self.view removeFromSuperview];
}];
视图应该弹出,放大动画到父帧,但我无法执行平滑过渡,图像假设与父帧相同,只是黑色视图缩放到原始帧,另一个问题是你可以观察到动画是即使它的框架在原始滚动视图中被剪裁,也不会在导航控件中被剪裁。
谢谢