Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

frostshoxx

macrumors newbie
Original poster
Nov 12, 2008
3
0
Hi everyone,

I've been working on a personal project, which starts with one view controller.

I have add multiple views into it and call each view by using this method
self.view = self.newView;

It seems to work fine and I don't have to worry much about sharing data since all the views are in the same controllers.

Recently, I just become interested in using Navigation Controller or Tab Bar Controllers to navigate the views.

However, from most of the tutorials and the books I found, they all seem to have a view controller for each view that needs to be hooked to the navigation controller.

So I'm just wondering if it is possible to use either navigation or tab bar controller with just one view controller that contains multiple views in it?

Thank you for the guidance.
 
That would be quite hard. You see, tab bar controllers are just basically placeholder for two or more view controllers (which will be called when you press the tabs).

If I were you I would create separate classes for each one of your view controllers, then call each one of them from your ui tab bar controller. Do you understand what I mean?

Look around, there's quite a lot of tutorials on this topic on youtube and stackoverflow. A lot of people (including me) were very confused about this before.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.