Skip to main content
Question

Auto Layout with each item same size


Floran

Hello,

I’m designing a tab bar and I want all items to be spaced the same width, with the ability to scale it for larger screens. Of course, each item doesn’t have the same size originally because of the label size.

I’m not sure if it’s possible to do that with auto layout ?

Thanks for your help !

This topic has been closed for comments

3 replies

Floran
  • Author
  • 21 replies
  • June 29, 2021

I finally found an answer that is not looking so bad, by applying a fixed width to the item composant, centered it, and put the container component as space between. But it doesn’t look really centered at the end :

image

Am I wrong ? Is there any better solution ?


tank666
  • 4868 replies
  • June 30, 2021

Select the menu items in your component and set it to “Fill container” horizontally. Thus, all items will become the same width (each item will be equal to 25%).


  • 0 replies
  • July 30, 2021

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings