4
我有一個UIBarButtonItem
還沒有被渲染結果和這樣開的酥料餅的一個觀點:UIAlertController popoverPresentationController錯誤:快照,在一個空的快照
@IBAction func openAdmin(sender: UIBarButtonItem) {
let alertController = UIAlertController(title: nil, message: "Elige una opción", preferredStyle: .ActionSheet)
// action button initializations... ... ...
alertController.popoverPresentationController?.sourceView = self.view
alertController.popoverPresentationController?.sourceRect = sender
presentViewController(alertController, animated: true, completion: nil)
}
當我打開酥料餅與功能,我得到這個警告4次:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
我需要做什麼來解決這個警告?
我用相同的警告讀了很多問題,但問題是關於相機或涉及的UIImageView
,但我不使用相機既不是UIImageView
。 popover它只有兩個UIAlertAction
s