使用UIDocumentMenuViewController自动布局错误

时间:2016-02-17 12:45:50

标签: ios swift xcode7

使用UIDocumentMenuViewController时出现Autolayout错误,DocumentMenu初始化时出现错误,这是我的代码:

let importMenu = UIDocumentMenuViewController(documentTypes: doctypes, inMode: .Import) //Error message here
importMenu.delegate = self
importMenu.popoverPresentationController?.barButtonItem = self.addButon;
self.presentViewController(importMenu, animated: true, completion: nil)

这是错误,与UICollectionViewFlowLayout

有关
the behavior of the UICollectionViewFlowLayout is not defined because:
2016-02-17 13:28:44.538 App[35218:1131869] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2016-02-17 13:28:44.538 App[35218:1131869] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7fbcd5d18e90>, and it is attached to <UICollectionView: 0x7fbcd6823000; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7fbcd3e63150>; animations = { bounds.origin=<CASpringAnimation: 0x7fbcd5c80c50>; bounds.size=<CASpringAnimation: 0x7fbcd5c80d40>; position=<CASpringAnimation: 0x7fbcd5c80e40>; }; layer = <CALayer: 0x7fbcd5d19450>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7fbcd5d18e90>.
2016-02-17 13:28:44.538 App[35218:1131869] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

我正在使用Xcode v7.2而我的部署目标是8.0,这种情况发生在iPhone和 iPad,有人使用UIDocumentMenuViewController来面对这个错误吗?

这是一种奇怪的行为:

Image

编辑:也发生在Xcode 7.3

0 个答案:

没有答案