Create a TabBar Controller with a Master-detail te

2020-02-05 10:34发布

I created master-detail template for the ipad application and now I want to add Tab Bar to either master view or detail view. I can easily add tab bar controller using editor->embed in ->tab bar controller. However when I run application tab bar is not showing.

Tab bar is showing in storyboard but I am also unable to add extra tab bar items. What am I doing wrong thanks?

storyboard

1条回答
小情绪 Triste *
2楼-- · 2020-02-05 11:03

You should embed the navigation controller (of either the master or detail VC) in a tab bar controller, then delete the connection between the split view controller and that navigation controller. Finally, remake the connection from the split view controller to the tab bar controller. You'll also need to make several code changes, because the template code refers to the detail controller by its hierarchy in the split view controller, which will now be different.

查看更多
登录 后发表回答