Navigation bar - why do I get borders? - ios

I have searched but could not find a solution for this...
I have a view controller in storyboard, and I want to add a navigation/toolbar bar under the status bar with a cancel button. I can place a navigation bar using constraints, but I get unwanted borders around the navigation bar. How do I get rid of these?

Turns out that I had customized the appearance of UINavigationBar for iOS 6 and forgotten to disable that code.

Related

Can't make UITableView appear under translucent navigation bar

I'm trying to use a translucent navigation bar and want to put my table view (in a UITableViewController) under the navigation bar but without success.
I've been searching all over the web but I'm only finding help on how to push the content below the navigation bar which is exactly the opposite of what I'm trying to do.
I have Under Top Bars checked inside my storyboard.
Please help!
set
self.automaticallyAdjustsScrollViewInsets = NO
in viewDidLoad and then check

Segmented control in Navigation bar

I need to put segmented control into navigation bar below the title and other buttons. How do I make this? Everything I found so far says you can't increase the height of navigation bar without hacks. Is it even possible?
https://drive.google.com/file/d/0B2fViGVp6nhhOEdJSU0zeWZiS1U/view?pli=1
Why don't you put both of them separately? On top navigation bar and below that UISegmentControl.
Just make sure background for UISegmentControl should be matched and aligned with UINavigation bar.
Hope that helps.

UISearchBar and UINavigationBar from navigation controller disappearing when searching

I have a UINavigationController with a UISearchBar right under the UINavigationBar. When I click in the search bar, the text and buttons on the UINavigationBar disappears, but the blank white bar still stays. I think this is because it is a navigation controller and so the navigation bar can disappear. In addition, when I start typing, the search bar disappears, but I can still type. My question: is there a way to either make the entire navigation bar disappear when I start searching or make the text on the navigation bar stay while searching, and how do I ensure the search bar does not disappear? Thanks.
self.searchController.hidesNavigationBarDuringPresentation = NO;
Figured it out. In the storyboard, I had to click on the little icon on the bottom, third from the left, then "resolve auto layout issues." Autolayout must be off for this to work

storyboard: table view appearing behind navigation bar

As per the picture below, part of the TableView is appearing behind the Navigation Bar.
I had been ignoring it, thinking it was just the way the storyboard drew things because it looks ok in the app. But it can be problematic - sometimes, to select the cell behind the Navigation Bar, one needs to use the Document Outline.
Is that just how it goes? Or is there a way to get Xcode to draw things properly?
It looks like you have selected a translucent navigation bar which will not push down other subviews. Try using the standard or black navigation bar. It probably looks fine in the app because your navigation controller using the non-translucent bar.

UIView is not autoresized after I hide the UIStatusBar

I have a ViewController which need to hide the status bar sometimes. The problem is the view of the UIViewController is not autoresized after the status bar is hidden. (Actually I have another application use the exactly the same View Controller. Which has no problem at all). Can anybody advise which could be the cause of the problem? Thanks
Please refer to my screen shots. The first one is the view before I hide the status bar and the navigation bar. The second one is after I hide the status bar and navigation bar. You can see that the there is obvious black area which previously occupied by status bar.
Seems wantsFullScreenLayout of your view controller isn't set to YES.
[self.navigationController.navigationBar setBarStyle:UIBarStyleBlackTranslucent];
[self setWantsFullScreenLayout:YES];
Try this in your viewDidLoad.
Additionally to full screen layout I think the bar style must be traslucent.

Resources