I have an UIImageView in the self.view (the main View) and inside it there is a UIButton. I want to know what\'s the frame of UI
There are four UIView methods which can help you, converting CGPoints and CGRects from one UIView coordinate reference to another:
– convertPoint:toView:
– convertPoint:fromView:
– convertRect:toView:
– convertRect:fromView:
so you can try
CGRect f = [imageView convertRect:button.frame toView:self.view];
or
CGRect f = [self.view convertRect:button.frame fromView:imageView];