I need to put some buttons around the vertical center of the screen. As far as I know, there is no explicit way to achieve that, so I have thought putting a label, or something, hidden, and align the buttons using that label as a reference.
But, I am not sure if that is an acceptable way to do so.
Is there a way to do it without being "hacky"? Can I achieve my goal with some way I am not aware of? Or simply the hacky way is acceptable?
Thank you.
PS: Need to do it in auto layout, not programmatically.
I tried four buttons to make them around vertical center
The result on different screen is shown in pictures:
Rest of buttons are aligned with Button1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.