简体   繁体   English

如何解决,UIAlertController(ActionSheet)在xamarin.ios本机应用程序的iPad上崩溃了?

[英]How to solve, UIAlertController (ActionSheet) is Crashed on iPad in xamarin.ios native app?

We have implemented UIAlertController in our xamarin.ios native app and its work fine in iPhone but its crash on iPad. 我们已经实施UIAlertController我们xamarin.ios本机应用程序和它的做工精细的iPhone,但其在iPad上的崩溃。 Please guide to solve this issue. 请指导解决此问题。 our code is, 我们的代码是

var alertController = UIAlertController.Create(null, "Select", UIAlertControllerStyle.ActionSheet);

alertController.AddAction(UIAlertAction.Create("Photo/Image", UIAlertActionStyle.Default, action => { 
             /* handle your action */  
}

alertController.AddAction(UIAlertAction.Create("Files", UIAlertActionStyle.Default, action => { 
             /* handle your action */  
}

PresentViewController(alertController, true, null);

its working fine in iPhone but crashed on iPad...Please help 它在iPhone上工作正常,但在iPad上崩溃了...请帮助

for your kind information you can't present alert controller for ipad you can use something which is called popovers 对于您的信息,您不能为ipad呈现警报控制器,您可以使用称为弹出窗口的东西

here are some links 这里有一些链接

popover github example popover github示例

xamarin forum Xamarin论坛

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM