我已经在 iOS 应用中实现了 facebook 登录。在 iPhone 中一切运行良好,但在 iPad 中感觉它没有显示 uialertcontrolleractionsheet 未打开的注销选项。它会产生以下错误:
您的应用程序呈现了一个 UIAlertController() 样式的 UIAlertControllerStyleActionSheet。具有此样式的 UIAlertController 的 modalPresentationStyle 是 UIModalPresentationPopover。您必须通过警报 Controller 的 popoverPresentationController 提供此弹出窗口的位置信息。您必须提供 sourceView 和 sourceRect 或 barButtonItem。如果在呈现警报 Controller 时不知道此信息,则可以在 UIPopoverPresentationControllerDelegate 方法 -prepareForPopoverPresentation 中提供。
2016-07-26 15:09:24.012 fazfavor[596:215512] Assuming sourceView is
not nil 2016-07-26 15:09:29.045 fazfavor[596:215512] *** Terminating
app due to uncaught exception 'NSGenericException', reason: 'Your
application has presented a UIAlertController () of style UIAlertControllerStyleActionSheet. The
modalPresentationStyle of a UIAlertController with this style is
UIModalPresentationPopover. You must provide location information for
this popover through the alert controller's
popoverPresentationController. You must provide either a sourceView
and sourceRect or a barButtonItem. If this information is not known
when you present the alert controller, you may provide it in the
UIPopoverPresentationControllerDelegate method
-prepareForPopoverPresentation.'
Best Answer-推荐答案 strong>
此问题已在 Facebook SDK 4.15 版中修复
关于ios - 无法在 iPad 中使用应用程序内的 facebook 按钮注销,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/38592305/
|