Dark Knight
Dark Knight

Reputation: 370

can't change the height for the navigation bar in swift 4

i hope all is well

please i have an issue for i try change the height navigation bar it's not change it please how can i change it i use the code below but it's not working:

  DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 3.0) {
            self.navigationController?.navigationBar.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: 100)

}

please how can i change the height for the navigation bar

thanks a lot

Upvotes: 1

Views: 800

Answers (1)

Mohmmad S
Mohmmad S

Reputation: 5088

as far as i know you cant change the height for the navigation bar but you can use something called LargeTitle using this

 navigationController?.navigationBar.prefersLargeTitles = true 

this will expand the height of the navigation bar try it might solve your problem

Upvotes: 1

Related Questions