Need an ideal way to handle tab bar in app

I want to create an app where there is a login screen, and when user logs in open up home page with tab bar controller.

I have created a single view application and have created login screen, home screen and a tab bar on it.

In tab bar delegate, I am adding screens to tab bar by [self.view addSubView firstView.view]

My problem is if I open up 4th tab, and switch to 2nd tab and I have to go back to home screen, so I press home btw on nav bar, it shows view 4 which is already on stack of uiviews.

How do I switch between all tab bar views and add navigation to them ? Which ideal method is to be used?

Answers


I've created app that is doing what you need (I guess). You can find it in app store for iphone using name Torchoo. It is free and there is test account so you can see how it works and if its really what you need. If yes, ping me here I will show you the sources and how I did it.

In couple of words, you need normal tabbar controller that has number of navigation controllers and each of them has number of view controllers. And login screen is just a modal view that shows/hides when you need it. Most of things may be done in storyboard.


I don't get it actually but i think you want to attach all the view by navigation controller.

But it's useless. if you want to use navigation bar then it ll navigate in another view but tabbar will give you different views on every tab.

so, first see the use of both of them then ask....


Need Your Help

CTRL shortcut persist error

javascript hotkeys shortcuts ctrl

I have been coding a couple of shortcuts for my web application, one of them saves the page i am working on, the other closes the page.

loading both jquery and jquery-mobile javascript files in Vaadin fails

jquery jquery-mobile vaadin

I have simple Jquery-mobile app that works just fine as plain html page.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.