Wrong status bar height while editing moreViewControllers - ios

I have an iOS app with a "More..." button at the UITabBarController.
When I am hitting "More..." the new view appears that has an "Edit" button
on top right. Clicking "Edit" shows the view in Edit mode, see at the attached image.
The problem with the edit mode is that the "Done" button is shown below the correct position (see the green arrow) or to put differently the bar takes more space than it should be? Why that happens?
"Done" should be on the top right position and the bar should have less height. I guess that I need to change things in
- (void)tabBarController:(UITabBarController *)tabBarController willBeginCustomizingViewControllers:(NSArray *)viewControllers
{
}
but I don't know what exactly happens here.
Code at iOS8.

This looks like a navigationbar with prompt. Maybe the presented viewcontroller inferred this property in your storyboard/XIB-File.

More tab is default behaviour of Tabbar controller, but your the image shows something is modified. Refer image. If you are implementing default method of UINavigationController in category. Do remove it and build again.

Related

Navigation bar changes height after segue

I have an issue with my app that I can't solve. I have a FirstViewController with a button. when this button is pressed a SecondViewController is pushed. The issue is that the navigation bar changes its height in the secondViewController like (GIF above)
I didn't write code related to the navigation bar, I checked everything I could think about and tried to delete the segue and re-add it. How can I solve that?
The only thing I found is this answer but it didn't work for me
It looks like it is making space for a 'prompt' message that appears above the navigation bar as your GIF shows. As you've said you haven't added any code also check the storyboard in case you have entered just a space (as we obviously can't see any text) in the navigation bar prompt box as shown below. Click navigation bar in your view and look at the inspector:
If there is obviously no space, add text and re-delete it.

How to completely remove back button from navigation bar?

For some reason I'm adding left and right buttons to the navigation bar as its subview instead of using navigation item. When pushing a view controller, I'm setting its navigationItem.hidesBackButton to YES so that the ugly looking blue 'back' button will not show up. The problem I'm facing is that, after tapping my own back button, while the currently showing view controller being popped --- I mean during the animation of the 'pop', I can see a '...' in the navigation bar moving right along with the popped view controller. And, I DON'T want that '...' to appear for even 0.0000000001 second. What may I do now? Any hint would be appreciated.
Note:Problem solved with just comment. But posting this as answer so that It will help someone else having same issue.
I too had same problem with navigationBarButtonItem while adding custom barButtonItem to navigationBar in storyboard. If you are also using storyboard then just set navigationBar tint color as clear color in navigationController. By setting clear color, that weird default navigation back button will not appear anymore.

How to manually add a Back button to my NavigationBar?

I would like to know how I can add a back button to my UINavigationBar, I know that If I embed in a Navigation Controller in my main view, that all of this would happen automatically, but that is not what I am trying to do, in fact, the back button could go to any other view I connect the segue to, doesn't even have to be the back.
The back button needs to be the system navigation "back" button, I don't want to have to set image files for my buttons.
I tried dragging in a bar button item in storyboard but nothing shows up, doesn't seem to be doing the trick. The navigation bar was dragged to the view in storyboard (not created programmatically) and it shows up just fine.
I looked at the following similarly asked questions:
-> How do i add a 'back' button to a UINavigationBar manually?
-> How to add a button to UINavigationBar?
-> How to programmatically add a UINavigationBar and a back button on it
but they all point to just embedding the view in a navigation controller, which again, is not what I am trying to do.
If someone can please help me out, provide some sample code I would greatly appreciate it.
Try drag-drop a UIButton object. I have always added manual back button (hardly took the in-built one)

iOS: table view's title bar covered by navigation bar unexpectedly

I'm developing a simple UI for an iOS app.
what I've done is I developed it into a table view which has a navigation controller associated to it and had it laid out in Storyboard.
Everything seems working fine, except the navigation bar accidentally cover the view's title bar "Click to select item" as shown in the pictures below.
the first picture is when it first shows on the screen.
the second one illustrates when I drag the title bar off the covering navigation bar.
what do i do to get completely rid of this?
In Interface Builder, select your view controller and on the attributes inspector turn off Layout: Wants Full Screen. Then, your layout will automatically adjust its size to make room for the navigation bar.
Add this code in your viewDidLoad method
self.navigationController?.navigationBar.translucent = false
It works for me, since you've the same problem with me, I think it's work for you as well.
where u want hide navigation bar use this line
self.navigationController.hidden = YES;

iPad SplitViewController leftViewController is UITableViewController and back button repaints the screen from top to bottom

I have a SplitViewController (iPad) and its leftViewController is a class inherited from UITableViewController; on the other hand, the rightViewController is a map. In landscape mode, when the leftViewController is shown (UITableViewController), then the user can tap on one item and it is pushed onto the left part of the SplitViewController another list of items (UITableViewController). As a result, it appears the title and the back button with the title of the previous list (this is the back button offered by the UITableViewController, so I have not programmed a new button to implement that behavior). During all that process the map does not change (and this is the desired behavior).
The problem is related to the back button and in landscape mode; that is, when it is pressed then the previous list is shown (and this is the desired behavior), however it seems like all the screen (the menu bar at the top and also the sliptviewcontroller -with left and rigth viewcontrollers) is refreshed (repainted) from top to bottom during less than one second.
I am quite sure that is not a problem related to animation because I have commented, in the code, all the sentences related to animation, and, I also have set to false all the function arguments like "animate:".
It is a esthetic problem, but I would like to correct it.
Thanks in advance,
Solution: Implement in the left view controller the following method.
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
return YES;
}

Resources