TabBar叠加在视图上-IOS

时间:2019-07-18 09:44:10

标签: ios swift xcode uitabbarcontroller xcode10.2

我像波纹管一样将TabBar移到顶部:

class RootMainFatherTabBarUITabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    override func viewWillLayoutSubviews() {
        //Shift tabs to top page
        tabBar.frame = CGRect(x: 0, y: 0, width: tabBar.frame.size.width, height: tabBar.frame.size.height)
        super.viewWillLayoutSubviews()

    }
}

但是TabBar覆盖在视图上,我看不到segue

1 个答案:

答案 0 :(得分:0)

您可以通过快捷方式添加标签栏,只需打开ui-control-view并拖放标签栏即可 添加选项卡,然后单击并滑动并拖放要打开的导航视图