NSLayoutFormatOptions should have a .None value

Originator:aralbalkan
Number:rdar://24071054 Date Originated:06-Jan-2016 11:27 AM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9
Classification:UI/Usability Reproducible:Always
 
Summary:

In the past you could pass nil for the options parameter in (e.g.) NSLayoutConstraint.constraintsWithVisualFormat(). Now you have to pass  NSLayoutFormatOptions(rawValue:0). 

Steps to Reproduce:

1.  NSLayoutConstraint.constraintsWithVisualFormat("V:|[View]|", options: nil, metrics: nil, views: ["View":self.pageViewController.view])

Error

2. Rewrite to:  NSLayoutConstraint.constraintsWithVisualFormat("V:|[View]|", options: .None, metrics: nil, views: ["View":self.pageViewController.view])

Error

3.  NSLayoutConstraint.constraintsWithVisualFormat("V:|[View]|", options: NSLayoutFormatOptions(rawValue:0), metrics: nil, views: ["View":self.pageViewController.view])

OK.

Expected Results:

#2, above, should work.

Actual Results:

It doesn’t.

Regression:

In latest Swift 2.

Notes:

Please add .None as an option. Thanks.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!