2016-07-26 82 views
2

我已經在iOS應用程序中實施了Facebook登錄。在iPhone中一切運行良好,但在iPad的意義上,它不顯示uialertcontrolleractions表未註冊的註銷選項。它會生成以下錯誤:無法在iPad中使用Facebook按鈕在應用程序中註銷

您的應用程序提供了樣式爲UIAlertControllerStyleActionSheet的UIAlertController()。具有此樣式的UIAlertController的modalPresentationStyle是UIModalPresentationPopover。您必須通過警報控制器的popoverPresentationController爲此彈出窗口提供位置信息。您必須提供sourceView和sourceRect或barButtonItem。如果在呈現警報控制器時未知此信息,則可以在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.'

+0

在看到這個曾經http://stackoverflow.com/questions/28089898/actionsheet-not-working-ipad –

+0

@ Anbu.Karthik的UIAlert ActionSheet風格不是我的控制器。它來自Facebook框架。 –

+0

@JorgeCosta - 這裏的任何解決方案?我有同樣的問題 - 只有iPad Air 2 ... – Spidey

回答

0

此問題已修復在4.15版本的Facebook SDK的

相關問題