Using a Tab Bar App with a Navigation Controller - objective-c

I want to use a Tab Bar App with a UINavigationController.
I followed this video tutorial. It looked nice and easy, but I am new to Objective-C.
When I do the what is shown at 2:50 in the video, I get these results: http://img4.hostingpics.net/pics/761392Capturede769cran20110515a768024124.png
http://img4.hostingpics.net/pics/461473Capturede769cran20110515a768024130.png
The other thing in the video is he made an example for one item. What if I want two items in the navigation bar? Is it correct to have a separate navigation controller for each item?

If I understand correctly, you're asking whether if you have a tab-bar-based UI with navigation possible in each tab, you should have a UINavigationController under each tab.
Yes.

It is correct and required that you make a separate UINavigationController for each tab.

Related

Error displaying Tab ios

I'm trying to create an app with two tabs. When I get to the scene where I can choose between tabs, the first one (the one which is loaded automatically) is showing as desired. But, when I click the second tab, it goes behind the Navigation Bar. Both Controllers have the same configuration, as far as I know. I can't find the problem here.
If I swap the order of the tabs the issue is the same. It looks like that the problem is with the Tab Bar Controller.
What can I do to fix it? Thanks.
you can do
self.edgesForExtendedLayout = UIRectEdgeNone;
on your -ViewDidLoad Method of the 2nd view

ios 7 navigation bar too small

I am trying to update my iPhone app to iOS7.
I am having major issues with the navigation bar. I would like it to have the new navigation bar.
As you can see from my image it has squashed the title to the top near the status bar.
I dont want to remove the status bar.
Surely it cant be that difficult to change.
I also noticed on some apps its changed automatically and on other apps it hasn't?
Did you try to add:
self.edgesForExtendedLayout = UIRectEdgeNone;
in the viewDidLoad method?
You should try and do it the correct way by adding your view controller to a UINavigationController and use its UINavigationBar. This will handle most layout issues for you and will also be backwards compatible. If you post the code where you bring your ViewController on screen, we will gladly help to wrap it in a navigation controller.

How to customize tab bar controller so that tabs appear on the top of the screen?

How to customize tab bar controller so that tabs appear on the top of the screen?Tabs should not appear at bottem of the screen.
Try this,
self.tabBarController.tabBar.frame=CGRectMake(0, 0, 320, 70);
You will need to create a custom control. The standard UITabBar does not offer the option to place tabs at the top unfortunately.
Tabs should not appear at bottem of the screen.
Actually, according to the iOS human interface guidelines, they should:
A tab bar appears at the bottom edge of the screen and should be accessible from every location in the application.
If you really wanted to do what you are asking, you could use a UITabBar directly (not touching UITabBarController). That handles drawing the tab bar itself, but doesn't do any view swapping for you. You should then write a custom container view controller using the view controller containment APIs (iOS 5 only) which you set as a delegate method on your tab bar, and then when the user changes tab, you swap in and out the relevant views.
Or you could use this open source version.
Don't make your top tab bar look like a standard Apple tab bar though, because they'll probably reject it from review. If you use a completely custom look you should be fine.

Pushing TabBar Controller on Navigation Controller

I am building an app in which at some point I have to show TabBar Controller but my app allready has Navigation Controller, so the most obvious sollution would be to push TabBar onto Navigation.
Apple in it's developer documentation states following:
"You never want to push a tab bar controller onto the navigation stack of a
navigation controller. Doing so creates an unusual situation whereby the tab bar appears only while a specific view controller
is at the top of the navigation stack.
Tab bars are designed to be persistent, and so this transient approach can be confusing to users."
Well I made it this way not knowing about this recomendation :). Now I am wondering if my app could me rejected because of this. Do you have any experiences with this? What do you think aboute this?
I don't think they're going to reject your app (not sure about it, but I don't think anyone can be), but your structure seems very confusing.
have a look at this: iOs Human Interface Guideline
For example:
"Use a tab bar to give users access to different perspectives on the same set of data or different subtasks related to the overall function of your app. When you use a tab bar, follow these guidelines:
Don’t use a tab bar to give users controls that act on elements in the current mode or screen. If you need to provide controls for your users, use a toolbar instead (for usage guidelines, see “Toolbar”).
In general, use a tab bar to organize information at the application level. A tab bar is well-suited for use in the main app view because it’s a good way to flatten your information hierarchy and provide access to several peer information categories or modes at one time."
I think you should transform your tab bar in a tool bar.

Tab Bar application with a Navigation Controller but different tab bar on detail page

I've seen lots of tutorials on how to build a simple app with 2 tabs and a navigation controller - especially when there is a table view where you click a row to see details (and have built this myself). But most apps I've seen have the detail view such that either the tab bar disappears or there is another type of nav bar at the bottom. Does anybody know how to extend the basic navigation controller and tab bar to get it to work to get it to work like this?
Here is the answer to my question
How to hide parent tabbar when pushing controller in navigationController