I know this is a little newbie style question but I couldn\'t find any subject about this and I have to horizontally align multiple buttons in my view controller.
I
You just need to give leading, trailing and equal-widths constraints between adjacent buttons.
Steps (We'll only consider horizontal constraints here):
If you follow this approach, you need not add extra views to align the buttons. Please see the screenshots below for understanding this better.
You should use a horizontal stack view. You set the constraints of the stack view to its superview, and then drop in your buttons. You need to adjust spacing, stretch to fill, etc in the attributes inspector and it'll be perfectly aligned.
As i understand your horizontally aligning 5 buttons problem with Autolayout, I make some draw to how you fix it. It has following:
Hope, It'll helpful to you.