presentModalViewController in iOS6

前端 未结 2 350
深忆病人
深忆病人 2021-02-04 02:53

In my app\'s code I am still presenting viewcontrollers modally with presentModalViewController. This is deprecated in iOS 6. Does that mean this method has no effect on devices

相关标签:
2条回答
  • 2021-02-04 03:12

    Deprecated means that you shouldn't use this method anymore. It still works, but it might be completely removed in one of the next updates.

    For displaying view controllers modally, you can use the new -presentViewController:animated:completion: method introduced in iOS 5.0.
    For dismissing the new method is -dismissViewControllerAnimated:completion:.

    https://developer.apple.com/documentation/uikit/uiviewcontroller

    0 讨论(0)
  • 2021-02-04 03:22

    If you have

    [self presentModalViewController:aController animated:YES];
    

    change it to

    [self presentViewController:aController animated:YES completion:nil];
    
    0 讨论(0)
提交回复
热议问题