菜鸟教程小白 发表于 2022-12-11 17:06:47

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


                                            <p><p>我已经在 iOS 应用中实现了 facebook 登录。在 iPhone 中一切运行良好,但在 iPad 中感觉它没有显示 uialertcontrolleractionsheet 未打开的注销选项。它会产生以下错误:</p>

<p>您的应用程序呈现了一个 UIAlertController() 样式的 UIAlertControllerStyleActionSheet。具有此样式的 UIAlertController 的 modalPresentationStyle 是 UIModalPresentationPopover。您必须通过警报 Controller 的 popoverPresentationController 提供此弹出窗口的位置信息。您必须提供 sourceView 和 sourceRect 或 barButtonItem。如果在呈现警报 Controller 时不知道此信息,则可以在 UIPopoverPresentationControllerDelegate 方法 -prepareForPopoverPresentation 中提供。</p>

<blockquote>
<p>2016-07-26 15:09:24.012 fazfavor Assuming sourceView is
not nil 2016-07-26 15:09:29.045 fazfavor *** Terminating
app due to uncaught exception &#39;NSGenericException&#39;, reason: &#39;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&#39;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.&#39;</p>
</blockquote></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>此问题已在 Facebook SDK 4.15 版中修复</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 无法在 iPad 中使用应用程序内的 facebook 按钮注销,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/38592305/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/38592305/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 无法在 iPad 中使用应用程序内的 facebook 按钮注销