Is there a way to use UIViewAnimationOptionTransitionCurlUp without it animating the entire screen?

后端 未结 3 731
[愿得一人]
[愿得一人] 2021-02-04 18:03

I have a view controller that has the following hierarchy:

UIViewController
|
|-view
    |-presentView (UIView)
   

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 18:38

    Wayne i suggest you to use the tab bar and then implement its delegate method.I just did it for you

       - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
        {
            //NSArray *vc= tabBarController.viewControllers;
        //  for (int i = 0; i < [vc count]; i++) {
        //      UINavigationController *nc = [vc objectAtIndex:i];
        //      if (nc == tabBarController.selectedViewController) {
        //          continue;
        //      }
                [UIView beginAnimations:@"animation" context:nil];
                //[self.navigationController pushViewController:nc.topViewController animated:NO]; 
                [UIView setAnimationDuration:1.5];
                [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:viewController.view cache:NO]; 
                [UIView commitAnimations];
            return TRUE;
    
        }
    

    Here is just the logic with the tab bar,it only flips the view not the tabbar.So i hope the same you could with ToolBar. Well it will just give you idea.Hope it could help you

提交回复
热议问题