
Using Auto Layout here is how I do it.
1. Select a view that renders a tab (here called “TabView”). Copy-paste as many as needed. Customize each copy.

2. Add missing constraints manually. Select each tab view, uncheck “Constrain to margins”, and add space constraints. The first tab needs 4 constraints, the rest - only 3.



3. Add size constraints (width or height) by selecting all tab views, then Equal Widths.


4. Finally, update all frames in a parent view.

Embed in a parent controller, declare protocols to handle taps, etc.
No comments:
Post a Comment