Questions tagged [uistackview]

The UIStackView class provides a streamlined interface for laying out a collection of views in either a column or a row. Stack views let you leverage the power of Auto Layout, creating user interfaces that can dynamically adapt to the device’s orientation, screen size, and any changes in the available space.

The UIStackView class provides a streamlined interface for laying out a collection of views in either a column or a row. Stack views let you leverage the power of Auto Layout, creating user interfaces that can dynamically adapt to the device’s orientation, screen size, and any changes in the available space. The stack view manages the layout of all the views in its arrangedSubviews property. These views are arranged along the stack view’s axis, based on their order in the arrangedSubviews array. The exact layout varies depending on the stack view’s axis, distribution, alignment, spacing, and other properties.

enter image description here

To use a stack view, open the Storyboard you wish to edit. Drag either a Horizontal Stack View or a Vertical Stack View out from the Object library, and position the stack view where desired. Next, drag out the stack’s content, dropping the view or control into the stack. You can continue to add views and controls to your stack, as needed. Interface Builder resizes the stack based on its content. You can also adjust the appearance of the stack’s content by modifying the Stack View’s properties in the Attributes inspector.

1429 questions
-3
votes
1 answer

UIStackView bounds is zero after creation

I have a subclass of UIStackView final class MyStack : UIStackView { required init(coder: NSCoder) { super.init(coder: coder) setup() } override init(frame: CGRect) { super.init(frame: frame) setup() } private func…
Duck
  • 34,902
  • 47
  • 248
  • 470
-3
votes
2 answers

how to remove UIButton from stackview if there is no content

I have four buttons in a stackView in a collectionViewCell I am performing segue to a newVC if the button is tapped, the content i am displaying in the newVC is coming via JSON. If the url is empty or url.characters.count == 0 for the respective…
Usama bin Attique
  • 337
  • 1
  • 3
  • 16
-3
votes
1 answer

Will the UIStackView work?

Will the UIStackView work with iPhone all versions?
Roa
  • 109
  • 7
-4
votes
1 answer

why isn't this button Constraints Design working?

Please I am a novice iOS developer. I am working an Application. I just created ios screen but this is not suite the design level, I need to configure it again. Here, Iam attaching the screenshots as well. Please find these screen and guide me P.s.…
User
  • 42
  • 5
1 2 3
95
96