I have a bunch of horizontal UITableView which is put inside a UIViewController1. I wanted to find the position of the UITableViewCell that is tapped, I wanted to get the position in terms of the UIViewController1. So here’s what I did in didSelectRowAtIndexPath:
MyCell *cell = (MyCell *)[tableView cellForRowAtIndexPath:indexPath];
UIView *animatedView = [[UIView alloc] initWithFrame:cell.frame];
[animatedView setFrame:[animatedView convertRect:animatedView.frame toView:self.newsRackController.view]];
However it seems that this doesn’t convert it correctly. What am I doing wrong?
You need to convert the CGRect of the UITableViewCell from the UITableView’s view and then convert it again to your view controllers view.
But instead of all that, perhaps you could just use UITableView’s method
Get this CGRect and convert it to your UIViewController’s View.