Quantcast
Viewing all articles
Browse latest Browse all 3860

Pinning a container width to the device screen width

How do I change a container width so that it is the same size as the device screen (or the scrollable area it sits in) ?
I’ve tried using constraints but it seems to ignore them. I don’t understand why the Container object doesn’t have it’s own auto-layout controls in the inspector, or at least a toggle to fix its width to its parent - this must be a very common requirement as there are very few situations where you would want controls slip-sliding left/right in the UI.

For clarity, I have a Screen called “MainScreen”
A scrollable area called “sa”
and a Container called “Main”

I have the auto-layout features working fine within MainScreen
The individual fields, labels and buttons are similarly set-up with auto-layout in Main, but TBH this was a waste of time unless Main resizes to fit the available width on the device.

Any advice would be welcome please.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3860

Trending Articles