【问题标题】:pushviewcontroller with zoom animation like ios photo app具有缩放动画的 pushviewcontroller,例如 ios photo app
【发布时间】:2015-08-04 21:59:38
【问题描述】:

我有两个 UIViewController。我的第一个 UIViewController 显示了各种视频缩略图、照片和注释。第二个控制器负责在前一个控制器中显示选定的视频、照片或笔记。我的第一个控制器中还有一个 UICollectionView,它列出了所有内容,就像 Apple 在 iOS 中的照片应用程序一样。

我使用“pushviewcontroller”来显示我的第二个视图控制器。

UIStoryboard *sb=[UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];
    FirstDetailViewController *fD=[sb instantiateViewControllerWithIdentifier:@"firstDetail"];
[self.navigationController pushViewController: seconVCObj animated: YES];

但我想用 ios photo app 之类的缩放效果打开它。当您触摸照片时,应用会像缩放一样显示照片。

【问题讨论】:

    标签: ios uinavigationcontroller pushviewcontroller


    【解决方案1】:

    这可能会回答您想要的效果,因为它提供了多个可行的答案。

    Showing pushviewcontroller animation look like presentModalViewController

    How to change the Push and Pop animations in a navigation based app

    样本之一:

    UIViewController *yourViewController = [[UIViewController alloc]init];
    [UIView  beginAnimations: @"Showinfo"context: nil];
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.75];
    [self.navigationController pushViewController: yourViewController animated:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-28
      • 1970-01-01
      • 1970-01-01
      • 2020-08-27
      • 2018-05-26
      • 1970-01-01
      • 2011-08-10
      • 1970-01-01
      相关资源
      最近更新 更多