iphone - Grouped Table View - Realizing which cell was selected -



iphone - Grouped Table View - Realizing which cell was selected -

i making grouped table view multiple sections (using nsarrays). anyway, normally, if have regular table view no sections able utilize next code realize cell user tapped. no longer works since utilize nsarrays split table , don't place cell names straight table view code ([tblsimpletable addobject:@"cell 1"]; <-- don't that). new code should use? thanks!

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { if ([[tblsimpletable objectatindex: indexpath.row] isequal:@"iphone"]) {

if know row number , section number

try this

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { if(indexpath.section==yoursection) { if(indexpath.row==yourrow) { //do } } }

iphone ios uitableview table nsarray

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -