Amir
Amir

Reputation: 455

UITableView cell coordinates

There is any way to get cell coordinates when pressing on cell?

I have UITableView and i want to show the activityIndicatorView on the cell that was pressed and for that i need the cell coordinates.

the didSelectRowAtIndexPath method dont provide this information.

one more thing , when i show the activityIndicatorView i want from the UITableView to be darker (like in UIAlertView )and when i finished to do some stuff i want to bring the light back . how can i do it?

Upvotes: 1

Views: 419

Answers (1)

Dexter
Dexter

Reputation: 5736

[tableView cellForRowAtIndexPath:indexPath] Should let you directly access the cell from the didSelectRowAtIndexPath.

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[cell addSubview:myIndicator];
[myIndicator startAnimating];

Also, in this method, do all your manipulations to the rest of the table.

You don't need to bother with coordinates.

Upvotes: 3

Related Questions