Sheet can not be presented because the view is not in a window,顺便在stackoverflow上找了答案,希望能给大家带来帮助,在此感谢我的朋友们。

1.

UIWindow* window =[[UIApplication sharedApplication] keyWindow];

if([window.subviews containsObject:self.view])

{[emailSheet showInView:self.view];}

else{[emailSheet showInView:window];}
2.
[actionSheet showInView:[[[[UIApplication sharedApplication] keyWindow] subviews] lastObject]];

相关文章:

  • 2021-04-04
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-02
  • 2021-08-12
  • 2021-09-28
  • 2021-06-27
  • 2021-08-17
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案