UITabbarController inside UISplitViewController - ios

iam trying to make a UITbarbarController inside UISplitViewController
when making this segue modal it hides the MasterViewController ,when making it push Segue after reading apple Document we can't put UITabbarController inside UINavigationController,when i make the segue replace it doesn't animate and i cant dismiss the viewController anymore....
what is the best way to achieve this ?

Related

Call pushViewController after presentViewController in Swift

Is it possible to somehow call pushViewController after presentViewController was called in Swift?
Or at least I need to implement the same behaviour when new UIViewController appears from the left side. The only option that I got to develop was to fake pushViewController with CATransition() but in this case the mechanism of new UIViewController appearance is different from the native.
When you use native pushViewController new UIViewController appears over old one with fade.
When you use faked presentViewController while new UIViewController appears previous just moves out of the screen.
I also tried to use segue but in this case new UIViewController appears from bottom.
So I prefer just to call pushViewController after presentViewController if it is possible.
Thanks.
You need use a UINavigationController and set it's rootViewController to the UIViewController you want to present (from the bottom - as a modal).
Call presentViewController on that UINavigationController.
Then you can call pushViewController to push UIViewControllers onto the navigation stack and it will slide in from the side instead of the bottom.

Push new view on front view when using PKRevealController

I am using PKRevealController to display a left side controller.
The PKReveal is connected to my main view controller which is a navigation controller.
I would like when pressing an option from the left side menu it will push a view controller (which is connected to the main view using segue - I use Storyboard).
I'm trying to make it happen from the left side VC - I use the PushViewController but nothing happens.
I am pretty sure you've already overcome this issue, anyway:
Test the class of your RevealController.frontViewController. If it's a navigationController just call [revealController.frontViewController pushViewController: animated:]
Your reveal controller should be accessible from the leftViewController.
If you use storyboard, just instantiate the viewController you want to push by calling [self.storyboard instantiateViewControllerWithIdentifier: ] then push it from the revealController.frontViewController.
This should work. Don't know if this is what you're looking for. Hope this help.

ViewController to NavigationController and back

I have one problem for which im not sure how to solve. Currently i have main UIViewController with some buttons. This is the initial view that is created with app. On it, one button calls storyboards segue with style Modal on ViewController which is part of UINavigationController. After that few other viewcontrollers are handled within the UINavigationController via segues and getting back via navigationController:popViewControllerAnimated. What i dont know is how to get back from UINavigationController to first UIViewController. I tried, when I'm on first one on navigationctrl,
[self removeFromParentViewController];
yet that only removes the view but it seems that UINavigationController somehow stays alive as result is black screen. Creating unconnected segue and call it from code would be possibility, but im not sure if that is the proper way. Would that leave navigation controller alive ?
Is there any reason you are using a UIViewController first and THEN a UINavigationController?
Why not change this so that the UINavigationController is the initial view controller and then drive everything from there.
If you want the first view to not have a nav bar then you can hide it easily.
That way you can move around through all views by popping and pushing through the UINavigationController.

segue does not work in simple segue test

I have a weird problem. I have created 2 viewcontrollers in my storyboard: testSegueViewcontroller and nextPageViewController.
The testSegueViewcontroller contains a UIButton NextPage. I Ctrl-dragged from this button to nextPageViewController and created a Push segue.
The problem is when i run this program and clicking on the NextButton in the testSegueViewcontroller it does not show the nextPageVieController :-(
Any ideas of what I'm doing wrong?
With this approach you should use modal segues. Push segue is a part of UINavigationController transitions
If you want to use push segue then you will need to put your testSegueViewcontroller into UINavigationController instance. This will allow the Push segue to work.
Push segue is a part of navigationcontroller if your viewcontroller is embed with uinavigation controller then only you will able to push the controller to another view. If you don't want to add navigation controller then use modal transitions.
You need to put the testSegueViewcontroller inside a UINavigationController.

NavController push from subview

I got an application with a tabbar and a navigation controller for one of the tab view.
The Navigation controller is pushing several views and one of them has a button which permits to add a subview (I am actually displaying a popup message -not an uialert- when pushing that button).
The problem is that I would like now to be able to push a new view controller once I pushed a button in the subview...
I cannot find my navcontroller, even when I use the pushmethod of appdelegate.tabbar.navigationController
Does one of you have easy idea about how to implement that ?
Thanks a lot !
If the button's press action of the second button is being handled in the same UIViewController as the other button's action you should simply be able to use
[self.navigationController pushViewController:newViewController animated:YES];.
If your subview has it's own UIViewController you could add a reference to your first UIViewController or to the navigationController itself and use it that way.

Resources