Step 1 :- take 4 button in your Storyboard. Button1 , Button2 , Button 3 , Button4

Step 2 :- Give Fixed Height and width to All buttons .

http://i.stack.imgur.com/lR5Zw.gif

Step 3 :- All 2 - 2 button’s pair in 2 stackview.

http://i.stack.imgur.com/oiZc4.gif

Step 4 :- Set UIStackview Property for both .

Distribution -> Fill Equally
     Spacing -> 5 (as per your requirement)

http://i.stack.imgur.com/RZtPa.png


http://i.stack.imgur.com/YECAf.gif

Step 5 :- Add both Stackview in one Stackview

http://i.stack.imgur.com/UlTWA.gif

Step 6 :- Set Distribution = Fill equally Spacing =5 in main stackview (set According to your requirement)

http://i.stack.imgur.com/O3xZe.gif

Step 7 :- Now set Constrain to main stackview

center Horizontally in container

center vertically in container
and select Update Frame.

http://i.stack.imgur.com/HAr7Z.gif

Step 8 :- It’s time for Output for All device .

http://i.stack.imgur.com/dRXWd.png