演示UIDocumentMenuViewController
以能夠將文件加載到應用程序中。在iPhone上它可以工作,但不能在iPad上工作。使用iOS9。任何想法有什麼不對?UIDocumentMenuViewController在iPad上崩潰,但在iPhone上不崩潰
dmvc = UIDocumentMenuViewController(documentTypes: ["public.data"], inMode: .Import)
dmvc!.delegate = self
dmvc!.popoverPresentationController?.sourceView = addSongButton
self.presentViewController(dmvc!, animated: true, completion: nil)
2016年6月7日09:45:45.256記[2994:977408]的 UICollectionViewFlowLayout的行爲不是限定,因爲:2016年6月7日 09:45:45.260記[2994 :977408]項目寬度必須小於 UICollectionView的寬度減去左側的節插入和 右側值,減去內容插入的左側和右側值。 2016年6月7日09:45:45.261記[2994:977408]相關 UICollectionViewFlowLayout實例是 < _UIAlertControllerCollectionViewFlowLayout:0x1668e6e0>,它是 附接到; 動畫= {bounds.origin =; bounds.size =; position =; }; layer =; contentOffset:{0,0}; contentSize:{0,0}>集合 視圖佈局:< _UIAlertControllerCollectionViewFlowLayout:0x1668e6e0>。 2016-06-07 09:45:45.262記住[2994:977408]在UICollectionViewFlowLayoutBreakForInvalidSizes中創建符號爲 的斷點,以在調試器中捕獲 。
我不明白爲什麼錯誤信息是指collectionView
?我根本不使用collectionView。也許UIDocumentMenuViewController
將它作爲內部組件?
任何運氣在這裏/ – MScottWaller
試試這個:http://stackoverflow.com/a/25644145/3718570 – Ptah