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

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -