Access ViewController in DependencyService to present MFMailComposeViewController

后端 未结 5 2052
失恋的感觉
失恋的感觉 2020-12-15 23:15

How can i access the ViewController in my DependencyService to present a MFMailComposeViewController? I tried using Application.Context but this seems to be only working on

5条回答
  •  独厮守ぢ
    2020-12-15 23:43

    UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(controller, true, null);
    

    This only works in above all solutions

提交回复
热议问题