rptwsthi
rptwsthi

Reputation: 10172

How to check, that row of which section have been tapped?

In a normal table with multiple section, (that I did through the delegate to define section), now in didSelectRowAtIndexPath it starts with initial for every section. Now how can i check row from which section have been tapped?

Upvotes: 0

Views: 56

Answers (3)

TalaT
TalaT

Reputation: 953

in table view delegate you can use

indexPath.section; indexPath.row to find section and row in that section

Upvotes: 1

Praveen S
Praveen S

Reputation: 10395

Indexpath consists of section and row members. So you can use the property and get the section yourindexpath.section for row yourindexpath.row.

Upvotes: 1

WrightsCS
WrightsCS

Reputation: 50697

In your didSelectRowAtIndexPath: simple place the following:

NSLog(@"SECTION: %i ROW: %i",indexPath.section,indexPath.row);

Upvotes: 0

Related Questions