I have my views(UITableViewController) and from the storyBoard I have embedded these views in a NavigationController. The thing is that I am wanting to modify the size of the NavigationBar that comes inside the UINavigationController, specifically I am wanting to modify the height.
I am handling the following code inside the ViewDidAppear to make the modification.
//TESTING NAVIGATIONBAR CUSTOM
let bounds = UIScreen.mainScreen().bounds
//let screenHeight = bounds.height
let nav = self.navigationController?.navigationBar
nav?.barStyle = UIBarStyle.Black
nav?.tintColor = UIColor.yellowColor()
// nav?.frame = CGRectMake(0, 0, bounds.size.width, 60)
nav?.frame=CGRectMake(0, 0, bounds.size.width, 80)
//END NAVIGATIONBAR CUSTOM
And the modification part works, the problem comes when I run the app and an empty strip appears between the navigationBar and the first cell of the UITableViewController.
How can I avoid the fringe?
That strip does not correspond to the
UINavigationController
but is probably the height ofheader
theUITableView
. Implement the following methodUITableViewDelegate
like so:So that he
header
has aheight
minimum and thus make it not be seen.UPDATE 1
After resizing the
UINavigationBar
you must readjust the onesinsets
soUITableView
that they fit correctly. For example like so:With the code that you have sent, it is solved.