TabBars and iOS 7 - iphone

I have a UITabbarController that I'm pushing another controller on top of using a UINavigationController. On iOS 6 and below, the tabBar of the parent controller slides away and the toolbar of the new view controller is presented. But on iOS 7 the tabBar doesn't animate away even if I run the code [self.navigationController setToolbarHidden:YES animated:NO];
EDIT - Okay I narrowed my problem to iOS 7 not respecting the hidesBottomBarWhenPushed property, I followed the answers in hidesBottomBarWhenPushed ignored in iOS 7 but it didn't work. The view that is pushed has a toolbar with buttons and the buttons are responding to touches, it's just that the tabBar is on top of the toolbar.

in iOS7 you need to set the property hidesBottomBarWhenPushed to YES on the presented controller instead of the presenter controller to hides the tabbar.

Turns out there was an view not being removed on my custom TabBar.

Related

Weird behavior with navigation controller and its root view controller in iOS 7

I encounter a strange behavior with a navigation controller and its root view controller in iOS 7. The goal is to use a sliding menu like MMDrawerController (http://github.com/mutualmobile/MMDrawerController/) or ECSlidingViewController (http://github.com/edgecase/ECSlidingViewController).
With both of them I got a bottom gap problem with my center main view (as seen on screenshots). In both case i'm using the "storyboard instantiateViewControllerWithIdentifier" to retrieve my controllers, so I think the problem comes from here.
The navigation controller frame (center main view) is ok. But the root view controller of this navigation controller got a wrong frame height...
Everything is fine in iOS6 and Xcode4, and the problem appears in iOS7 ans Xcode5. I already fixed the "extend edges" for all the app, only this navigation controller got this problem...
After more investigations, it seems that the problem is that the height of the uitabbar is removed twice :
1 - ECSlidingViewController remove the uitabbar height to calculate its own height
2 - ECSlidingViewController load navigation controller as center main view with its frame
3 - Navigation controller load its root view controller
4 - Root view controller remove the uitabbar height again to calculate its height
So the Root view controller get "window size - uitabbar height - uitabbar height".
This is why there is a gap of the size of the uitabbar...
Now I need to find out why such behavior, and how to get rid of it... Thanks in advance if you got any idea about this problem !
I found that just hiding navigationController toolbar did the trick...
[self.navigationController.toolbar hide];
PS: MMDrawerController bug ?

UISplitViewController transition from top to bottom instead of right to left

I have a root UISplitViewController that contains a UINavigationController related with a DetailViewController. The DetailViewController calls, via a storyboard push segue, another ViewController, called SecondViewController. When the user clicks on the Back button in SecondViewController toolbar, all the UISplitViewController has a transition from top to bottom, instead of a right-to-left transition of the DetailViewController. In the xCode designed all the transition style properties are set as "Flip horizontal". Is there a way to solve it?
I had the same problem in ios 5, landscape orientation.
Adding shouldAutorotateToInterfaceOrientation: both in Master & Detail controller solved problem
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}

Navigation Controller view is distrupted when launching modal view controller (after upgrading latest xcode/ios 5)

My name is Luca and I am experiencing an issue in my app after upgrading my XCode for ios 5. I really can find a solution to that, so I hope that someone can help me.
My software is a window-based application that uses a navigation controller and a toolbar item. The navigation controller is connected in mainWindow.xib to the application delegate navigation controller property (IBOutlet). The navigation controller init with a root view controller that I call 'starting view controller' (this is done in IB). The app has the status bar visible on top.
In my application delegate I do:
[application setStatusBarStyle:UIStatusBarStyleBlackOpaque];
application.statusBarHidden = NO;
self.window.rootViewController = navigationController;
[window makeKeyAndVisible];
[startingViewController onLaunchApp];
Once the app has finished loading I try to present another view using the Modal View Controller. The Modal View Controller is presented in the root view controller (starting view controller) by doing
[self presentModalViewController:'another view' animated:YES];
Here comes my issue. Once I dismiss the modal view controller, the navigation controller moves on the very top of the main window pulling up with it the root view controller. Part of the navigation bar lies behind the status bar (20 px) and other 20 px of white space are left at the bottom of the root view controller. Therefore my view becomes completely messed up and the only way to fix it is to rotate the device in landscape and then back in portrait orientation. After these operations the whole views' stack is ok and if the modal view controller is presented and dismissed again everything works just fine. In other words, this problem occurs only the first time the modal view controller is dismissed.
I have tested the app with all the simulator versions and they all work correctly except for the latest 5.0.
I spent the last 6 hours reading documentation, posts and trying to fix the app, but no luck.
I would appreciate a lot if someone could help me or give me any hint.
Thank you very much in advance.
If you haven't implemented it this way, try to dismiss modal view controller from the root view controller.

Custom UITabbar

Is it possible to have a UITabBar in such a way that the following things are possible.
Once the app opens, none of the Tabbar items are highlighted (not even the first one). (call it homeview)
if the first Tabbar item is selected it goes to the first view and so on.
Hide the UITabbar for certain Tabbar items.
Allow any subview to go back to homeview.
Any tips on how to go about doing this will be appreciated.
Thanks
I had a similar thing to do:
start with a navigation controller
at some point show an UITabBar with multiple controllers
from some controllers from the UITabBar continue the main navigation controller
from any controller go to the home view (on logout)
For this to work I pragmatically created the UITabBar and pushed it on the navigation stack and from the controllers in the UITabBar I pushed other views on the stack.
To navigate to the root controller you can use this:
[self.navigationController popToRootViewControllerAnimated:YES];

pushviewcontroller iPhone sdk - changing views UITabBar

I have a uitabbar application, and I would like to hide the UITabbar whenever a viewcontroller slides in (it is a tableview so whenever a row is tapped).
I would like the tab bar to hide whenever a viewcontroller is pushed and would like the entire screen to be covered with this new view like in iPod application of iPhone.
Just set the UIViewController hidesBottomBarWhenPushed proprety to YES before you push the viewcontroller.
viewController.hidesBottomBarWhenPushed = YES;