问题
In my app I have a view for 4 inch screens in this way:
And then I want to reduce the size of my buttons when the app is running on an iPhone with a 3.5 inch screen, so I set my layout in this way:
but finally I obtain a view in this way
In this way the size of my button are ok but they are not aligned, so in this situation, what's the way to have aligned buttons?
thanks
回答1:
Hi as per your question i've created demo similar to the layout for which you need the controls need to set. I've added images for single control and made video this using multiple controls to set the layout which you retrying to set.
link: https://www.youtube.com/watch?v=Nl2iMF0yKW8&list=PLXCowKcXAVgrxHKLWTa4HxNPrSmTj3D-_
Hope this will solve your issue.
回答2:
I may not comment till I 50 posts, so here is the link. I had like the same problem some days ago. Just put all those in a parent view and center the parent view.
Link to my question/answer: Top constraint won't get less with auto-layout
来源:https://stackoverflow.com/questions/24907080/ios-autolayout-for-multiple-button