iPhone SDK Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsMobile ProgrammingiPhone SDK Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 13th, 2010, 11:49 AM
mrsarun's Avatar
mrsarun mrsarun is offline
Trying to improve
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Helsingborg, Sweden
Posts: 237 mrsarun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 10 h 4 m 57 sec
Reputation Power: 11
Send a message via MSN to mrsarun
TableViewCell pointing to a specific nib (xib)

Hey!

I'm making a simple tableView app and I'm totally new to objective C.

My question is: How do I setup a single cell to go to a preferred view ?
My code at the moment forwards me to the same nib, no matter what cell I'm pressing/tapping...

Code:
Objective C Code:
Original - Objective C Code
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {          rothTools *tools = [[rothTools alloc] initWithNibName:@"rothTools" bundle:nil];         tools.currentItem = @"Second View";         [self.navigationController pushViewController:tools animated:YES];     [tools release]; }


edit:
Got two views working now but the hierachy is wrong!
The app ends up on "page 3" when clicking a tableCell

Code:
Objective C Code:
Original - Objective C Code
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {         rothTools *tools = [[rothTools alloc] initWithNibName:@"rothTools" bundle:nil];     rothEmployees *employees = [[rothEmployees alloc] initWithNibName:@"rothEmployees" bundle:nil];         tools.currentItem = @"Employees";     employees.currentItem = @"En ny sida";         [self.navigationController pushViewController:tools animated:YES];     [self.navigationController pushViewController:employees animated:YES];     [tools release];     [employees release]; }


I added : self.title in viewDidLoad and that works, but the hierarchy is wrong

Thankful for any answer.
Regards!
__________________
- http://borgweb.se

Last edited by mrsarun : November 13th, 2010 at 12:35 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsMobile ProgrammingiPhone SDK Development > TableViewCell pointing to a specific nib (xib)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap