Xcode doesn't allow to type negative value for UIButton insets in Storyboards
Originator: | guillaume.algis | ||
Number: | rdar://35048527 | Date Originated: | 18-oct.-2017 11:20 AM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | Version 9.0 (9A235) |
Classification: | UI/Usability | Reproducible: | Always |
Summary: When editing a UIButton's properties in a Storyboard, Xcode shows stepper boxes under the Size Inspector to edit the `titleEdgeInsets`, `imageEdgeInsets` and `contentEdgeInsets` properties of the button. While these properties allow negative values for their members, it is impossible to input such values directly in the stepper boxes. Having a minus "-" sign in the text field will be considered as invalid by Xcode, and one cannot "tab out" of the field. However, negative values can be set, using the down arrow button on the right of the field. The negative value is then accepted. So this bug only apply to typing negative values in the field. Steps to Reproduce: 1. Open a Storyboard in Xcode 2. Add a UIButton to a view 3. Click on the UIButton and navigate to the Size Inspector panel on the right of the window 4. Input some negative value in one of the fields under "Button" (either one of the 12 fields here will behave the same way) Expected Results: The negative value is accepted, and the inset is set accordingly Actual Results: The value is rejected, Xcode produces an "error" sound, and it's impossible to end the field editing with the negative value set Version: Version 9.0 (9A235) Notes: Attached is a screen cap of the behavior. When using the keyboard to enter the value and tabbing away, the focus stay on the field, and the value is never set. When using the steeper buttons, it works as expected.
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!