Transition between a standard view and UITabBarController view? - iphone

What is the cleanest way to set up a structure where you have an initial standard, full screen UIView, which transitions to a Tab Bar view?

Add the tab bar view as a subview to the window. Then show the fullscreen view (controller) by presenting it as a modal view (controller) over the tab bar. Remove the fullscreen view with an animation by dismissing the modal view.

Yes, I agree. Displaying ordinary UIView over a UITabBarController view as modal is probably the cleanest way. But you could alternatively do a flip view transition if you don't want to use modal view.

Related

Present UIViewController modally within a UIViewController that does not cover full screen

Basically once I dismissed the modal view, my customized UIToolbar no longer clickable.
Here is my design:
a customized UIToolbar at the bottom of the screen
top part of the screen is associated with a container view controller
[note] I added the top two items above into a root view controller and assigned to UIWinow's root view controller. The container view can be changed whenever toolbar items are clicked.
then, each toolbar item associated with a UINavigationController so that it's navigable.
within a UIViewController of a navigation, I present a view modally. The modal view does NOT cover the full screen as a result of the entire design...
after i dismiss the modal view, the UIToolbar items are no longer clickable.
I think the 'bug' is resided in where i presented the modal view, so I also tried to present modal view using root view controller, then there is also other issues...
maybe someone has more insight on this, that will be really appreciated :)
Thanks.
Try releasing the modalViewController as soon as its no longer needed. If you are using ARC, set it to nil. Allocate a new one when a modalView is needed.

Add view controller over tab bar based application with navigation controller?

I want to add a view controller over navigation view controller in a tab bar application which covers the full screen.
I have crated a view controller (enterPin) and added over the current navigationview controller in a tab bar application.
[self.view addSubview: enterPin.view];
but bottom bar, navigation controller and status bar is not hidding and comes over enterPin view controller. If we hide bottom bar, navigationcontroller and status bar it give white screen at back.
I want the view controller (enterPin) should appear over the navigationview controller (self.view).
Use modal view controller: Tutorial and documentation. Does exactly what you are asking for.
This is very normal behavior. 95% of the time the developer would not want the UINavigationBar to be covered by another view. You have a few options.
Use a modal view controller to prevent the user form interacting with other controls.
Animate the UINavigationBar out or disable it in some way.
Consider making the "Enter PIN" screen something the user sees when they first launch the application.

Customizing UIModalViewController Size and Having a Navigation Bar

I've created my own ProfileUIViewController class that is a UINavigationControllerDelegate. I display this view in two ways:
From an IBAction within A-UIViewController.m, as a UIModalViewController. A-UIViewController has a UINavigationBar when it's loaded, but when I display the modal, it no longer has the navigation bar.
From clicking a table cell row within B-UIViewController.m, by pushing it onto the stack. B-UIViewController has a UINavigationBar when it's loaded, and the ProfileViewController keeps the navBar as desired :)
What I am looking to do is keep the UINavigationBar when the view is loaded as a modal in case 1, filling in INSIDE the UINavigationBar instead of laying over the entire view. (IE, I would like the modal to appear within A-UIViewConroller underneath the navBar - making it a smaller size)
Can someone help me with this? Do I need to make my own custom ModalViewController class - wouldn't this be ProfileUIViewController? Does it need some instance methods that I'm not giving it? Any direction would be great:)
The navigation bar is managed by the navigation controller, not by your view controller. When you push your view controller into the navigation controller, the navigation controller uses the information in the navigationItem to determine what to put in the navigation bar. But when you display your view controller modally, it's not inside any navigation controller so there is no bar.
One simple solution for the modal case is to create a new UINavigationController with your view controller as its root view controller, and display that modally instead of displaying your view controller directly.

Partial Curl Modal Transition Style While Preserving Tool/Tab Bar

Is there a way to present a modal view controller that doesn't cover the tab bar of a UITabBarController?
Specifically I want to use the UIModalTransitionStylePartialCurl, but preserve the bottom bar, a la the iPhone maps app.
Have two view controllers
In the first have the second as a subview
Add your toolbar as a subview to the first and call bringSubviewToFront:
Present the modal in the second
UIModalTransitionStylePartialCurl
When the view controller is presented,
one corner of the current view curls
up to reveal the modal view
underneath. On dismissal, the curled
up page unfurls itself back on top of
the modal view. A modal view presented
using this transition is itself
prevented from presenting any
additional modal views.
And
hidesBottomBarWhenPushed A
Boolean value indicating whether the
bar at the bottom of the screen is
hidden when the view controller is
pushed on to a navigation controller.
#property(nonatomic) BOOL
hidesBottomBarWhenPushed
Discussion
If
YES, the bar at the bottom of the
screen is hidden; otherwise, NO. If
YES, the bottom bar remains hidden
until the view controller is popped
from the stack.
There are discussions around this topic on stackoverflow in the past

Non-Modal view without NavigationController

I have an app built from the UITabBarController starter project. The first tab is part of the main.xib that contains the tab bar. I would like to slide a view up from the bottom on top of that tab's view that only covers part of the screen. My understanding is that you can only cover part of the screen if you make the top view non-modal, but I don't see a way to do that without a NavigationController.
How can I do this?
you can add a UIView as a subview to the current view, and then animate its appearance into the screen using animation blocks, or Quartz or however you would like.
presentModalViewController: is actually a method that belongs to UIViewController, the superclass of UINavigationController, so you can use it from any view controller, not just a navigation controller.
Have you tried using a UIActionSheet? That's an easy way to get a view with a few buttons for user input to slide up and only cover the bottom portion of the current view.