我已经在iOS应用中实现了facebook登录。在iPhone中,一切运行良好,但是在iPad中,未打开注销选项时,不会显示uialertcontrolleractionsheet。它生成以下错误:
您的应用程序展示了一个UIAlertControllerStyleActionSheet风格的UIAlertController()。具有此样式的UIAlertController的modalPresentationStyle为UIModalPresentationPopover。您必须通过警报控制器的popoverPresentationController提供此弹出窗口的位置信息。您必须提供sourceView和sourceRect或barButtonItem。如果在显示警报控制器时不知道此信息,则可以在UIPopoverPresentationControllerDelegate方法-prepareForPopoverPresentation中提供它。
2016-07-26 15:09:24.012 fazfavor [596:215512]假设sourceView是
不为零2016-07-26 15:09:29.045 fazfavor [596:215512] ***终止
应用未捕获的异常“NSGenericException”,原因:“您的
应用程序展示了一个UIAlertControllerStyleActionSheet风格的UIAlertController()。的
具有此样式的UIAlertController的modalPresentationStyle为
UIModalPresentationPopover。您必须提供以下位置信息
通过警报控制器的弹出窗口
popoverPresentationController。您必须提供一个sourceView
和sourceRect或barButtonItem。如果此信息未知
当您显示警报控制器时,可以在
UIPopoverPresentationControllerDelegate方法
-prepareForPopoverPresentation。”
最佳答案
此问题已在Facebook SDK 4.15版本中修复
关于ios - 无法使用iPad中的应用程序中的Facebook按钮注销,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38592305/