Modal View Controller Won't Start in Landscape Mode

后端 未结 7 1429
死守一世寂寞
死守一世寂寞 2020-12-10 17:10

I have a navigation based app that has a detail view (UIWebView) with action buttons across the bottom in a UIToolbar. I want to add \'notes\' when the \'notes\' button is

7条回答
  •  无人及你
    2020-12-10 17:44

    If you use presentModalViewController just for animation like me, you can use pushViewController with animation as below answer;

    Showing pushviewcontroller animation look like presentModalViewController

    and you can close the viewController as below;

    CATransition* transition = [CATransition animation];
    transition.duration = 0.3;
    transition.type = kCATransitionFade;
    transition.subtype = kCATransitionFromTop;
    
    [self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
    [self.navigationController popViewControllerAnimated:NO];
    

    Hope it helps..

提交回复
热议问题