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

drf1229

macrumors regular
Original poster
Jun 22, 2009
237
0
Hello, I made a basic app with a few different views. I thought it would look cool if I made the main menu a table, but I don't know how to handle when the user clicks different cells the table and I don't know how to name the elements of the table. Any help would be appreciated!
 
I just got through this process. I can recommend a few things

http://vimeo.com/album/97812 and what you're looking for there is Using Tables with Navigation Bars and Tabs - Part 1 and 2 but the others are great as well.

Once you get through that, and understand what is being done, pick apart UICatalog from Apple. Pay attention especially to this block of code in the MainViewController.m

Code:
	// for showing various UIControls:
	ControlsViewController *controlsViewController = [[ControlsViewController alloc]
														initWithNibName:@"ControlsViewController" bundle:nil];
	[self.menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys:
								NSLocalizedString(@"ControlsTitle", @""), kTitleKey,
								controlsViewController, kViewControllerKey,
							  nil]];
	[controlsViewController release];

Pick it apart.

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