홍승욱
홍승욱

Reputation: 137

How to detect the row of the cell which has been touched

I have a UITableViewController, and of course a UITableView cell in my application. And I have a push segue(to another UIViewController) for the cell. How to detect the row of the cell which has been touched?

Upvotes: 0

Views: 31

Answers (2)

gabbler
gabbler

Reputation: 13766

You can do this:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    NSLog(@"Selected row is %d",[[self.tableView indexPathForSelectedRow] row]);
}

Upvotes: 1

Stack Over
Stack Over

Reputation: 7

you can check the table rows state and you put your instructions in the cellValueChanged block

Upvotes: 1

Related Questions