alert window created with UIAlertController, is producing an error when runs on 6/6s plus simulator:
2015-09-16 22:09:26.187 To Do[7428:1127563] the behavior of the UICollectionViewFlowLayout is not defined because:
2015-09-16 22:09:26.188 To Do[7428:1127563] 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.
2015-09-16 22:09:26.189 To Do[7428:1127563] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7fe8ba5908f0>, and it is attached to <UICollectionView: 0x7fe8bb87fe00; frame = (0 96.6667; 270 44); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7fe8ba5915a0>; layer = <CALayer: 0x7fe8ba591120>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7fe8ba5908f0>.
2015-09-16 22:09:26.189 To Do[7428:1127563] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
function I am using to create alert window:
func alertPopup(){
let alert = UIAlertController(title: "Add New Item", message: nil, preferredStyle: UIAlertControllerStyle.Alert)
let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel){
UIAlertAction in alert.dismissViewControllerAnimated(true, completion: nil)
}
let saveAction = UIAlertAction(title: "Save", style: UIAlertActionStyle.Default){
UIAlertAction in self.saveNewItem()
}
alert.addTextFieldWithConfigurationHandler({(textField: UITextField!) in
textField.placeholder = "new note"
self.tField = textField
})
alert.addAction(cancelAction)
alert.addAction(saveAction)
self.presentViewController(alert, animated: true, completion: nil)
}
Not really sure how to fix that error?
I am using stable xcode 7. Had same error with 7beta and 7.1beta version of xcode.