views:

38

answers:

1

i have a customcell in which i have a label.now i want the text on the selected cell's label in the nextview's navigation bar? how do i get it???

+1  A: 
//in the main controller didSelectRowAtIndexPath method:

MyViewController *controller = [[MyViewController alloc] initWithTitle:label.text];

//in the 2nd controller:

-(id)initWithTitle:(NSString *)theTitle {
    if(![super init]) return nil;
    self.title = theTitle;
}
Ben Scheirman