lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
244 stars 17 forks source link

26395654: Unable to set fraction constants for auto layout, spacing, etc. #14725

Open openradar-mirror opened 8 years ago

openradar-mirror commented 8 years ago

Description

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:

Product Version: 7.3.1 (7D1014) Created: 2016-05-20T18:55:48.477740 Originated: 2016-05-20T14:54:00 Open Radar Link: http://www.openradar.me/26395654

openradar-mirror commented 8 years ago

Modified: 2016-05-20T18:55:48.477920