I am facing a problem in design a view using autolayout
where I have four buttons line by line in portrait
mode of the device but I want two buttons side by side in landscape
orientation. How can I do this?
Asked
Active
Viewed 108 times
0

BADRI
- 643
- 8
- 26
-
1hope this helps ... http://stackoverflow.com/questions/17772922/can-i-use-autolayout-to-provide-different-constraints-for-landscape-and-portrait – hariharan Jul 23 '16 at 20:16
-
I agree with with previous commenter you should use size classes for your purpose. But on certain cases you could pull it off using UICollectionView. By setting button sizes on orientation change. If you size it just right such that button 2 reach the end of the screen, button 3 and 4 will automatically flow on the next row using default UICollectionViewFlowLayout – Dickson Leonard Jul 25 '16 at 09:38