Thursday 27 July 2017

change Navigation bar title colour programatically in swift 3

override func viewDidLoad() {        super.viewDidLoad()        let nav = self.navigationController?.navigationBar        self.title="Address Details"        nav?.tintColor = UIColor.white            }


    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        let nav = self.navigationController?.navigationBar
        nav?.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]
    }

No comments:

Post a Comment

Remove bottom line in navigation bar

navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default )          navigat...