I’m still trying to get my head around constraints and the objective c best practises in general.
I need to dynamically create between 1 to 6 UIButtons depending on a variable. I’m ok with this part but confused with how to position them given that:
- The number of buttons could be anything from 1-6.
- The buttons have to be of equal size.
- Landscape and Portrait orientations will have different layouts.
- They have to ‘float’ left in the landscape view and vertically align to the top in portrait view.
I'm guessing I'll need one container that sits at the bottom of the view and changes height depending on the orientation, then have rules for the buttons inside depending on the container width. But how to go about it I have no idea.