ios - 无法在 iPad 中使用应用程序内的 facebook 按钮注销

标签 ios facebook ipad sdk logout

我已经在 iOS 应用程序中实现了 facebook 登录。在 iPhone 中,一切运行良好,但在 iPad 中,它不显示 uialertcontrolleractionsheet,未打开注销选项。它会产生以下错误:

您的应用程序呈现了一个 UIAlertControllerStyleActionSheet 样式的 UIAlertController()。具有此样式的 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.'

最佳答案

此问题已在 Facebook SDK 4.15 版本中修复

关于ios - 无法在 iPad 中使用应用程序内的 facebook 按钮注销,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38592305/

相关文章:

ios - 无法在 Facebook 的 user_friends API 中获取用户的电子邮件 ID

ios/jquery/metatag - 删除 iPad 上自动调整网站大小

objective-c - 在 UITableView 问题的顶部添加额外的单元格

ios - 如何在最新的 iOS 6 中将 map 区域限制在一个国家?

ios - 重新加载标签栏外观

ios - XCode 不显示自动完成菜单中的所有可用选项

facebook - 在单个 Graph API 请求中获取 Facebook 发布所有反应计数

ios - 如何在 iOS 上访问 Facebook Graph SDK 的 age_range 属性

xcode - 通用应用程序 - iPad View 加载,但我无法将任何 ImageView 链接到 UIImage 对象而不会出现错误

ios - 我将 UIView 放在 iOS 应用程序的 ScrollView 中,但它不滚动。我究竟做错了什么?