xcode7.3和iOS9中出现如下警告:
the behavior of the UICollectionViewFlowLayout is not defined because:
the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
后来在苹果官方网站中找到解决方法:
在弹出对话框之前加入一句代码
[alertController.view setNeedsLayout];
警告就会消失
参考:https://forums.developer.apple.com/thread/18294