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

KingAndrew

macrumors newbie
Original poster
Jan 15, 2010
3
0
Hi All,
I have been developing my first app with a Tabbar controller that has a UIViewController + XIB for each tab.

After implementing 3 out of the 5 tabs I realized that my views are all pretty much the same. 1 image on the top with a table toward the bottom.

Since they have the same basic layout (some images may be bigger than others). I'd like to have one view controllers and then pull in the image and data for the table each time I select a new tab.

So my questions are:
1) How do I know what tab I'm on when they all use the same controller?
2) How to I get to the UIImage and UITableView so I can set the image and the sizes for both?
3) I'll also be adding a varying number of UIButtons to the View that are not in the nib. How do I do that?

Thanks in advance,

Andrew
 
If they're that simple why don't you just do it all in code rather than messing about with xibs?
 
If they're that simple why don't you just do it all in code rather than messing about with xibs?

That sounds reasonable. Do you have any pointers on how to do that?

How do I get the MainWindow?

As I mentioned I'm 3/4 way through my first book and it does (most) everything with IB.

Any pointers would be a big help.

Thanks,

Andrew
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.