swift - How to add Equal Spacing and equal width for button in iOS Auto layout -


am new auto layout constraints in xcode. have 1 bottom view uitabbar 6 uibuttons. without constraints aligned buttons 5 space padding each buttons , each buttons has 50 width. now,i trying make using auto layout support screen sizes.

in storyboard constrains set equal width 6 buttons , made 60 space between each buttons. set first button 0 leading space , set last button 0 tail constraints.

i want buttons equal width , flexible spaces between views in device sizes.

can pleas me? looking help. in advance.

enter image description here

check image , made constraints below...

enter image description here

result:- preview in different sizes

enter image description here


with stackview (for ios 9.0 , above)

enter image description here

note: if have make app ios 9 , later uistackview option you


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -