Ramcharan Reddy Ramcharan Reddy - 4 years ago 234
iOS Question

how to use stackview for label and textfield together in which textfield has more length

I'm new to stackviews. I'm trying to build the following using stack views.

enter image description here

But when I apply horizontal stackview to the label and textfield together the textfield's length is not as I required. I tried all the allignment and distribution combinations of horizontal stack view. But there is no result. Please help me.
Thanks in advance.

Answer Source

First add a stackview with axis property to vertical, and alignment property to Fill like this enter image description here

And then add a stackview with axis property to horozontal, and alignment property to Fill, and distribution also fill. Like this enter image description here

You will get idea of how to set your view accordingly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download