I have a UIImageView in a UITableView Header. How can I get the exact y/x coordinates of that UIImageView at any time?
I need to know the exact x/y points on the screen, even as a user scrolls up and down within the tableview. If this is possible, can someone point me to some sample code?
Just calling this does not work:
itemImageView.frame.origin.x, itemImageView.frame.origin.y
It just gives me the coordinates as they relate to the tableView itself, regardless of it’s actual position on the window.
Thanks.
I believe what you want is the UIView convertPoint view. You can convert the point you get to the table view’s space.
http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/instm/UIView/convertPoint:toView: