Change the selected TabBar index on button click

前端 未结 4 412
抹茶落季
抹茶落季 2021-01-29 11:27

In my app I have 4 tabs, on the first Tab : I have 4 views. on second view,there is one button which will open the third tab view. But my selected tab Index is One. How can I ch

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-29 11:41

    In Swift 2, you can just call:

        self.tabBarController?.selectedIndex = 0
    

提交回复
热议问题