I am using Storyboard for layout (PS. I don’t want to use any code to layout yet).
I created a stack view and put some buttons in it. These buttons immediately lost their width and height, and became very small. I checked some tutorials and they told me to add constraints to the stack view. Although I feel that these constraints have nothing to do with whether resizing is allowed or not, I added some, but the resize option on the panel is still gray.
Next, I found that in the constraints I can add width and height to the button. This is the only method I found that workaround.
But I got a warning
Fixed width constraints may cause clipping.
I have a lot of questions:
- How to resize the subview in StackView?
- Constraints are not as easy to use as responsive layouts in the front end, why we need it?
- Can the width be expressed as a percentage in the storyboard?
I think the layout of iOS is completely unreasonable, is there any recommended tutorial?