Auto Layout: Conflicting explicit width and required content hugging constraints don't throw an exception

Originator:lithium3141
Number:rdar://15106765 Date Originated:28-Sep-2013 05:12 PM
Status:Open Resolved:
Product:iOS SDK Product Version:Xcode 5.0 (5A1412) / iOS 7.0
Classification:Other Bug Reproducible:Always
 
Summary:
The Auto Layout system fails to throw an exception when a view:
• Has a constant intrinsic width
• Has a content hugging priority of 1000 ("required")
• Has an explicit width constraint different from its intrinsic width, also required

Steps to Reproduce:
1. Create a new application from the Empty Application template
2. Add a subclass of UIView that returns a constant CGSize as its intrinsicContentSize (e.g. 50x50)
3. Add an instance of this subclass as a subview of the app's window
4. Set the view's content hugging priority to required along the horizontal axis
5. Add a required constraint to the view setting its width to a value different from its intrinsic content width
6. Run the app

Expected Results:
Auto Layout should determine that the required content hugging & width constraints conflict and throw an exception.

Actual Results:
The app runs without throwing an exception. The view respects the explicit width constraint, ignoring its required content hugging.

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!