如何在iPad上展示RPBroadcastActivityViewController。ReplayKit RPBroadcastActivityViewController iPad
我使用的是標準的代碼開始錄製在iPhone,但在iPad上沒有
RPBroadcastActivityViewController.load { [unowned self] (broadcastActivityViewController, error) in
// If an error has occurred, display an alert to the user.
if let error = error {
self.showAlert(message: error.localizedDescription)
return
}
// Present vc
if let broadcastActivityViewController = broadcastActivityViewController {
broadcastActivityViewController.delegate = self
// present
self.present(...
}
}
作品提出並應用一種凍結的。我一直在使用此功能的應用程序商店檢查遊戲,並且發現了相同的問題。
例如在遊戲Tower Dash上按下iPad上的實時流按鈕時不會顯示任何內容,它僅適用於iPhone。
我一直在嘗試播放popover演示文稿,但似乎沒有任何工作。
我錯過了什麼嗎?
更新:這似乎是一個錯誤。即使在蘋果自己的Swift Playground應用程序中也會發生這種情況。
UPDATE2:蘋果實際上已經回答了我的錯誤報告,並告訴我,我需要出示視圖控制器上的iPad作爲酥料餅像這樣
UIDevice.current.userInterfaceIdiom == .pad {
broadcastAVC.popoverPresentationController?.sourceView = view
broadcastAVC.popoverPresentationController?.sourceRect = CGRect(x: view.bounds.midX, y: view.bounds.midY, width: 0, height: 0)
broadcastAVC.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.init(rawValue: 0) // no arrow
}
但是它仍然does not工作對我來說。正如我所提到的,這發生在蘋果自己的Swift Playground應用程序上,所以它一定是一個bug。
修正:
忘了在上述
broadcastAVC.modalPresentationStyle = .popover
你寫了一個錯誤報告嗎? –
是的,我做到了。我認爲這肯定是一個錯誤,因爲它也發生在他們自己的快速遊樂場應用程序上。還沒有從他們那裏收到回覆(28411422) – crashoverride777
希望他們能儘快解決這個問題:) –