David Choi
David Choi

Reputation: 6619

Change location of Navigation Bar

When using the Navigation Controller it creates a new Navigation Bar on my first view controller. Intead of that bar being at the top of my screen I would like it to be on bottom. Is this possible? If not can I switch to using a different Nav Bar?

Upvotes: 0

Views: 810

Answers (2)

PGDev
PGDev

Reputation: 24341

Navigation Bar always appear on the top of your UIViewController when embedded in a UINavigationController. You cannot move it to any other position.

Still if you want to achieve such a requirement,

  1. Hide the default UINavigationBar

    self.navigationController?.navigationBar.isHidden = true
    
  2. Create a custom UIView of same height(44) as the UINavigationBar and pin it to the bottom of your controller.

Upvotes: 0

Lachlan Walls
Lachlan Walls

Reputation: 136

Navigation Bars are always at the top of view controllers, and cannot be moved. You could explore a TabBar or ToolBar though, depending on what you want.

Upvotes: 1

Related Questions