I'm hardly learning to implement some iOS app screens in xCode Interface Builder with auto-layout.
I've already placed some elements with working constraints but I realize it would be more practical to group them into a vertical StackView
.
At first it seems pretty easy as I did it for a previous screen. However, once I embed my elements in the StackView, all my margins constraints are gone ! Also, if I try to manually put back my constraints, they don't work at all and generate ambiguity.
I don't fully understand the way iOS UI builder works, so I'd gladly need some help.
See screenshots below.
Constraints inside stack views can be quirky, but playing around with / experimenting with the characteristics can help.
In particular, adjusting Alignment
, Distribution
, and Spacing
can often do the trick.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.