Partial Curl Modal Transition Style While Preserving Tool/Tab Bar - iphone

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

Related

iOS - iPhone app consists of tab bars containing navigation bars.. overlaying a modal view makes area over tabset hard to hit

I have an iphone app consisting of a tabbar controller in the main.xib, where the tab bar controller contains navigation controllers, which are associated with corresponding view controllers. I assume this is pretty standard.
If I present a modal view controllers view from a navigation controller contained in this hierarchy, the view owned by this view controller pops up as you would expect. However, Ive noticed if I have controls (such as a button) at the very bottom of this 'modally presented' view it is rarely detecting taps. It seems as though the tabset underneath is blocking the touches. Note that when I present the modal view controllers view it fills the visible screen, it isn't sliding up from underneath the tab set.
I thought this tababar controller->navigation controller hierarchy was pretty standard, shouldn't I be able to present a modal view controller from a navigation controller in this set up without issue? I have also tried to present the modal view controller from the tab bar controller, with the same effect.
How do I present a modal view controller in an app with the tabbar controller->navigation controller hierarchy such that the lowest portion of that view can detect touches?
thanks for any help!
Check out the first answer by Harry, I believe this set-up is related to your situation. Post an update and let us know if this helps: UIView doesn't resize to full screen when hiding the nav bar & tab bar
Also, what code are you using to present the modal view?

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.

Return to main view from navigation view and modal view

I have views created in the way
main view -> modal view (navigation controller) -> navigation view root -> navigation view A
The modal view presentation style is default (coming up from the bottom), when modal view is dismissed (cancel action), it goes back to the bottom.
When navigation view A is pushed, it slides from right hand side as usual. When I dismiss the modal view from navigation view A, it also goes back to the bottom.
My question is, how can I dismiss modal view from navigation view A by sliding back to right?
The behave I am trying to achieve can be found on Microsoft bing app. When entering the setting page, it's presented as modal view. But for next levels in details (bookmarks, history ..), they are shown by navigation. Whenever done button in detail is pressed, the view slides (instead of going to bottom) and return to the home page.
In the docs there are these possible styles available:
typedef enum {
UIModalTransitionStyleCoverVertical = 0,
UIModalTransitionStyleFlipHorizontal,
UIModalTransitionStyleCrossDissolve,
UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;
I think if these styles doesn't match your needs you have to create your animation yourself. Maybe this correct link can help.
I found the effect I am looking for can be achieved by using CATransition. The link has more details, http://www.iphonedevsdk.com/forum/iphone-sdk-development/13427-uiview-slide-transition.html

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.

Transition between a standard view and UITabBarController view?

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.