I have a NavigationController extending from a master TabBarController and extending a ViewController and VC extends to 2x TableView (so, TabBar -> NavigationController -> ViewController -> 2xTableView[with .xib] ). I had to add Navigation Bar to the Navigation Controller to make it work in the viewController, thus works in both tableviews (because I use Instagram-style swipe by using PageMenu). Now, I can see the navigation bar. (Please note that I had to uncheck Translucent
on navigation bar on Storyboard to make it visible)
However, it's quite wide, so I am trying to narrow the height. I have tried several answers that I've found online, but no luck for me. First, I tried adding constraints to Navigation Bar (in NavCont) but, when I click on the constraints, everything is disabled (...but for example, when I change the colour of Navigation Bar from storyboard, it works.)
Also, in my ViewController (where I link to TableView using this code), so I can use these and customise Navigation Bar, however when I try
// These works
self.title = "GLOBAL"
self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.blackColor()]
// Neither works for Height
self.navigationController?.navigationBar.frame.size.height = 200
self.navigationController?.navigationBar.frame = CGRectMake(0, 0, 320, 64)
self.navigationController?.navigationBar.frame.origin.y = -50
The height of Navigation Bar I want to achieve (and achieved for another UIView, by simply dragging Navigation bar to view on Storyboard):
This is how it looks