IB should offer keyboard shortcut to create AL constraint with constant value of 0

Originator:joshavant
Number:rdar://33301294 Date Originated:July 13 2017, 5:05 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 8.3.3
Classification:Other Bug Reproducible:Always
 
Summary:
Frequently, when I'm designing Auto Layout constraints in Interface Builder, I'd like to create a constraint that's initialized with a constant value of 0.

Currently, IB assigns AL constraints with a constant value that mimics the existing placement of the subview. It would be helpful to have a keyboard shortcut to suppress this behavior.

The easiest example of this is when I want to create a subview to be pinned along the edges of its parent view. This is something I frequently do, as content views are a common view architecture pattern.

However, when I create a set of constraints for all of the subview's edges, all 4 constraints will be created with a non-zero constant value and I have to manually reconfigure each constraint with a constant value of 0.

This requires a few seconds of dedicated interactions to correct and is disruptive to a streamlined workflow.

Steps to Reproduce:
0. In Interface Builder, create a view with a subview
1. Control + Click and drag from within the subview to the parent view to open the Auto Layout constraint menu
2. While holding Shift, select 'Leading Space to Container', 'Trailing Space...', 'Top Space...', and 'Bottom Space...'
3. Click 'Add Constraints'

Expected Results:
I am able to hold a modifier key (Control, Option, etc) while clicking 'Add Constraints' to force all constraints to initialize to a constant value of 0

Observed Results:
I am unable to hold a modifier key (Control, Option, etc) while clicking 'Add Constraints' to force all constraints to initialize to a constant value of 0

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!