How to use scale in UIGridLayout?

I used a UIGridLayout for my shop but the buttons either dont fit right in the frame or go off boundaries depending on the screen.

Smaller Screen:problem 1

Bigger Screen:problem 2

2 Likes

UIGridLayout consists of two values, CellPadding and CellSize, which both have their own x and y cordinates, with their own scale and offset values as shown below.
image
In your case you wanna use scale, instead of offset.

image
Also a good idea would be to put an UISizeConstraint in every frame, to keep their aspect ratio.

Make sure to convert both CellPadding and CellSize.

8 Likes