How do I set selected tab in UITabBarController using StoryBoard?

前端 未结 10 1507
一整个雨季
一整个雨季 2020-12-31 00:38

How can I switch to some tab in UITabBarController using StoryBoard? I have tried the code below but without success (the tab is not selected):

         


        
10条回答
  •  一生所求
    2020-12-31 00:59

    You can achieve this also using storyboards only. Ctrl-drag from the tabBarController to your ViewController(s), and select 'Relationship Segue, View controllers'. The first ViewController you select will be the default/initial ViewController.

提交回复
热议问题