0
import UIKit
import SwiftyDrop
import Material

class HomePageView: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = Color.blue.base
        self.navigationItem.title = "test"
        self.navigationItem.titleLabel.textColor = .black
        self.navigationItem.detail = "Build an app"
    }

    func pushSelf () {
        self.navigationController?.pushViewController(SecondPageView(), animated: true)
    }

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        preparePageTabBarItem()
    }

    init() {
        super.init(nibName: nil, bundle: nil)
        preparePageTabBarItem()
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()

    }
}

extension HomePageView {
    fileprivate func preparePageTabBarItem() {
        pageTabBarItem.title = "Blue"
        pageTabBarItem.titleColor = Color.blueGrey.base

    }
}

我在我的ViewController中使用这些代码来修改NavigationController,但是它保持空白并且根本没有改变,我不能熟练地使用Material,所以不知道你是否能给我一些建议。 在此处输入图像描述

4

0 回答 0