I have two labels inside a UIStackView with a 10 pixels spacing as a default value and a 0pixel spacing for my compact layout.
This works fine on Ipad, the spacing is of 10pixels between the two UILabels. The issue is on iPhone (compact width). The spacing is not actually 0 pixels but still 10 pixels. When debugging the view hierarchy, we can clearly see the constraint added by autolayout with a spacing of 10 pixels when the value is supposed to be zero.
If I update the compact value from 0 to 0.1, the spacing is properly set to zero.
The issue is presents in xcode 10.0 beta, ios 12.0 but also xcode 9.4 ios 11.4. Any idea why that's happening?