Unable to set fraction constants for auto layout, spacing, etc.
| Originator: | mattswell | ||
| Number: | rdar://26395654 | Date Originated: | 20-May-2016 02:54 PM |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 7.3.1 (7D1014) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: Interface Builder does not handle fraction/decimal constants for layout constraints, margins, stack view spacings, etc. It is very common to use "0.5" to recreate the very thin lines commonly used as the UITableView spacer. IB rounds 0.5 to 0 or 1 (usually 0). As a workaround, you can manually edit the storyboard XML file and set the value to 0.5. In IB it will still display as 0 or 1 but saving the storyboard/nib does not reset the raw value in the XML file. Steps to Reproduce: 1. Create storyboard, add UIViewController 2. Add UIStackView with a few views 3. Set UIStackView's spacing to '0.5' Expected Results: Spacing is set to 0.5 Actual Results: Spacing is rounded to 0 Version: Xcode Version 7.3.1 (7D1014) OS X Version 10.11.4 (15E65) Notes: Perhaps it's more acceptable to add this thin line w/ drawRect, but it is IMO easier and more convenient to do this in IB. Configuration: Attachments:
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!