物料设计的TabsController显示在安全区域上方[iOS,Swift,物料设计]

时间:2020-07-30 06:44:18

标签: ios swift material-design

我试图在ViewController中使用Material Design的TabsController。标签的视图控制器是

class ViewControllerOne: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        tabItem.title = "One"
    }
}

class ViewControllerTwo: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        tabItem.title = "Two"
    }
}

连接到情节提要的父级ViewController是

import Material

class NewViewController: TabsController {
    open override func prepare() {
        viewControllers = [ViewControllerOne(), ViewControllerTwo()]
        super.prepare()

        tabBarAlignment = .top
        tabBar.lineAlignment = .bottom
    }
}

现在的输出是 enter image description here

情节提要是 enter image description here

如何将标签放在安全区域下?

0 个答案:

没有答案