HomeiOS Developmentidentical measurement for components in several containers in swiftui

identical measurement for components in several containers in swiftui [closed]


making a customized keyboard for swiftui utilizing png graphics for the keys. i am passing in a part of the identify of the graphic file. this can be a very simplified check for structure.

desired structure is a number of columns (hstack), every with a number of rows (vstack), every with a number of components (hstack) however for every ingredient to be similar in measurement.

every ingredient is constrained by

.aspectRatio(4/5, contentMode: .match)

if i apply

.body(maxHeight: .infinity)

and

.fixedSize(horizontal: true, vertical: false)

i get every ingredient on the most vertical measurement for the mother or father view however they’re far bigger than can match horizontally within the mother or father view. in different phrases, they’re rising constrained solely by general obtainable top with width not being constrained to display/view most.

identical measurement for components in several containers in swiftui [closed]

if i apply

.fixedSize(horizontal: true, vertical: true)

they’re constrained however solely handle to fill about 1/3 of the utmost mother or father view’s width.

images constrained by height and width but only using fraction of available width

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments