Change Container View Content with Tabs in iOS

前端 未结 5 1846
陌清茗
陌清茗 2021-01-30 18:52

I\'m trying to make a form that spans three tabs. You can see in the screenshot below where the tabs will be. When the user taps a tab, the Container View should update and show

5条回答
  •  旧时难觅i
    2021-01-30 19:19

    I got this to work by using a UITabBarController. In order to use custom tabs, I had to subclass the TabBarController and add the buttons to the controller in code. I then listen for tap events on the buttons and set the selectedIndex for each tab.

    It was pretty straight forward, but it's a lot of junk in my Storyboard for something as simple as 3 tabs.

提交回复
热议问题