MFMailComposeViewController throws an error only in iOS 9

后端 未结 5 1650
一生所求
一生所求 2020-12-15 18:33

I can\'t get MFMailComposeViewController to open without throwing a fatal error in iOS 9 Simulator.

The same code (Objective C) works flawlessly in iOS 8.x and lower

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-15 19:25

    You should use : [self.window.rootViewController presentViewController:picker animated:YES completion:NULL]; presentModalViewController is DEPRECATED since ios6 is and has been replaced by presentViewController:animated:completion: ie: - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated NS_DEPRECATED_IOS(2_0, 6_0);

提交回复
热议问题