我试图在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
}
}
如何将标签放在安全区域下?