Reputation: 16051
I have a view which contains multiple subviews. Each of them contain subviews, and so on. A few layers down is a subview that I have as an object. I want to find out it's frame position inside a view a few layers up. How can i find this out?
Upvotes: 3
Views: 1181
Reputation: 6432
I thought you meant the (x,y) position of the view with respect to the superview. If that's the case you can use UIView
's method – convertPoint:toView:
[yourView convertPoint:yourView.frame.origin toView:yourSuperView];
Hope this helps!
Upvotes: 2