将动画从滚动子视图(图像视图)缩放到UI窗口并缩放

时间:2013-07-25 10:41:05

标签: iphone ios

可能是这个问题可能重复,但我真的需要你的帮助..

Grid Image

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];
                     }];

视图应该弹出放大动画到父帧,但我无法执行平滑过渡,图像假设与父帧相同,只是黑色视图缩放到原始帧,另一个问题是你可以即使其帧在原始滚动视图中剪切,观察动画也不会在导航控件中剪切掉。

由于

After push to next view controller While poping to grid image view part-1 To next grid image view

0 个答案:

没有答案