Difference between presentModalViewController and presentViewController?

前端 未结 2 1961
故里飘歌
故里飘歌 2021-02-05 04:58

In iOS 5 SDK, there\'re two methods of UIViewController, presentModalViewController:animated: and presentViewController:animated:completion:.

What\'s the difference bet

2条回答
  •  渐次进展
    2021-02-05 05:30

    Another important note is that presentModalViewController will be deprecated in the future, as mentioned in the UIViewController.h of the UIKit framework (Xcode version 4.3.1):

    // Display another view controller as a modal child. Uses a vertical sheet transition if animated.This method has been replaced by presentViewController:animated:completion:
    // It will be DEPRECATED, plan accordingly.
    - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated; 
    
    // Dismiss the current modal child. Uses a vertical sheet transition if animated. This method has been replaced by dismissViewControllerAnimated:completion:
    // It will be DEPRECATED, plan accordingly.
    - (void)dismissModalViewControllerAnimated:(BOOL)animated;
    

提交回复
热议问题