Wednesday, 15 June 2011

ios - Tap UIButton and to call its action next view table cell row selected state? -



ios - Tap UIButton and to call its action next view table cell row selected state? -

i have button in mainview when click mainview button(id 1) actions phone call nextview [secondview have tableview] tableview cell first row selected or highlighted state.its state set selected.

-(ibaction)btnoneclicked:(id)sender { secondview *nextview = [[secondview alloc] initwithnibname:@"secondview" bundle:nil]; [self.navigationcontroller pushviewcontroller:secondview animated:yes]; nsindexpath* selectedcellindexpath= [nsindexpath indexpathforrow:0 insection:0]; [nextview tableview:nextview.firsttable didselectrowatindexpath:selectedcellindexpath]; }

you can @ button action method. have tried many options no success. please help on this.

tableview:didselectrowatindex: delegate method called when select row.

to select row, need call

[nextview.firsttable selectrowatindexpath:selectedcellindexpath animated:yes scrollposition:uitableviewscrollpositiontop]

ios objective-c xcode4.2

No comments:

Post a Comment