Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-30-2010, 11:19 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 8
iabaksardna is on a distinguished road
Smile UITable View help

Hello,
I've been doing a bunch of tutorials from youtube on UITableViews but I could not find any showing how to have each cell go to a different window. Can you guys explain it to me or recommend a good tutorial? Any help is greatly appreciated.
Thanks,
Andy
iabaksardna is offline   Reply With Quote
Old 03-31-2010, 06:30 AM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1,018
Tambourin is on a distinguished road
Default

in the tableview delegate there is a method getting called when a cell of the tableview is selected by the user
Tambourin is offline   Reply With Quote
Old 03-31-2010, 07:03 AM   #3 (permalink)
iPhone SDK helper
 
Join Date: Feb 2010
Location: Austria, near Vienna
Posts: 169
chaoz1337 is on a distinguished road
Default

The delegate method is called didSelectRowAtIndexPath. This is how you can use it:

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
	[tableView deselectRowAtIndexPath:indexPath animated:YES];
	
	//First cell selected
	if(indexPath.row==0){
		StationDetailViewController *sdvc = [[StationDetailViewController alloc] initWithNibName:@"StationDetailViewController" bundle:nil];
		[self.navigationController pushViewController:sdvc animated:TRUE];
		[sdvc release];
	}
	//Second cell selected
	else if (indexPath.row==1) {
		AnotherViewController *avc = .....;
		//and so on, like in the one above.
	}
}
You can find more detailed information on UITableViews here. The link is from BrianSlick's signature. He has some very good articles.
chaoz1337 is offline   Reply With Quote
Reply

Bookmarks

Tags
table, table cell, table view, tutorial, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 320
7 members and 313 guests
checkright, chemistry, heshiming, iAppDeveloper, jbro, kapps11, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,112
Posts: 402,872
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:21 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0