What the view controller structure/hierarchy of the iPhone photos app? - iphone

I'm working on an app that requires a pushing a view that is full screen and shows/hides status, navigation and bottom toolbars on tapping of the central image. The app currently has a UITabBarController that has a UINavigationController for each tab. Basically when the full screen view is displayed I want it to to work like the photos app and animate off the tab bar to show my full screen view.
I'm having trouble making the view take up the full screen if I manually animate out (down) or hide the tabbar.
So, in a nutshell, my question is - what is the view hierarchy of the photos app?
It must have a base navigation controller, that contains a tab bar controller. But does each tab contain another navigation controller? But if so, how to they seem to share the navigation bar with the root navigation controller (look at how the back buttons etc are animated in)?
Is there something really obvious I'm missing?
Thanks for any help.

Have you tried using UIViewController's hidesBottomBarWhenPushed property?

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?

UINavigationController similar to Email App on iPhone

I am working on an application that uses a UINavigationController. The root view controller of my navigation controller is performing a search similar to the Email Application. When I press on the Search Bar I hide the NavigationBar. While I display the results, my Navigation Bar is still hidden, and when I tap on one of the results I want to push a new view controller on the stack. The problem is that if I make the Navigation Bar visible it animates really funny, falling from top. I want it to act exactly like in the Email app, to come naturally from the right, already placed on top of my pushed view controller. And, when I press back I want to present my root view controller in the same state:with the search bar "over" the navigation bar. I hope I am making myself as clear as posible.
Thank you!

How to add a navigation bar to a viewController presented using modalView in iPad

I am implementing a facebook integration in my ipad app.I am presenting a veiwController to load facebook URL modally using modalPresentationStyle = UIModalTransitionStyleCrossDissolve. Now I want to implement a navigation bar on the top which will show a title Facebook and a button to close this view.
I tried adding a navigation bar but it didn't show up because my viewController is not tied to any navigationController and tried toolbar as a subview to the viewController's view but it shows up only after the webView is finished loading.
I want to know how should I implement a permanent navigation bar so that I can any time close the modal view.
While the navigation bar doesn't show up automatically, you can always add the navigation bar via IB. I was able to get it working in a sample project. You can take a look and see if it helps you.
Another thing is that you are doing modalPresentationStyle = UIModalTransitionStyleCrossDissolve;. This is incorrect in that you are assigning a transition style to the presentation style property but works because the values are basically enums and UIModalTransitionStyleCrossDissolve ends up with the same value as UIModalPresentationFormSheet.

How to hide an iPhone Tab Bar?

I have a small multiview app. It consists of a UITabBarController with a nav controller in each tab. What I want is to show a UIImageView when a user shakes the device. After I've implemented the loading of the UIImageView, I faced a problem-the image was only 2/3 of the screen because of the tab and nav bars. I managed to hide the nav bar but I'm still stuck with the tab bar. I tried many solutions such as [tabBar setHidden: YES]; but I get errors "tabBar undeclared", although I've imported the AppDelegate, where the tabBar was defined.
Thanks in advance!
Try setting
myViewController.hidesBottomBarWhenPushed = YES;
when you create your UIImageView. When you push it on to the view stack the UITabBar will hide automatically, and it will be restored automatically when you pop or dismiss the controller. No need for the application delegate.
If you want to show a full screen view, it is best to use a modal view controller. This way you do have to worry about hiding/showing navigation items. Take a look at:
http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html
to get started.

Which view should i use to display large photos from a TabBar application

Hi i have used Tab Bar Application with 4 tabs and i have set navigation controller from IB.
Now for my photo view, when user choose photo from list, it should display large photo. For larger photo, which view should i use?. If i will self.view and it will display both tab bar and navigation bar. If i will give tabbarcontroller..view then navigation controller is not displayed. I need navigation controller when user tap on image.
If you want the tab bar to disappear when the user taps on an image, you should probably base the interface on a subclassed UINavigationController and insert a tab bar (without controller) manually. You'll have to handle events from the tab bar in your UINavigationController subclass. When the user taps an image, you can simply set it in a UIImageView controlled by a separate UIViewController and push that controller on the nagigation controller's stack.
(There are tutorials on-line on how to combine a navigation and tab bar interface. You might find other ways of doing what you need).