I would think this is a simple question, but I cannot seem to find a way to do this.
I have a view that is a subview of my uiviewcontroller. Within that view, I have another view. To clarify, this is the architecture:
>UIViewController.view
--->Subview A
------->Subview B
I want to get the frame of subview b
within uiviewcontroller.view
.
Is this possible? subviewB.frame
gives me the frame of the view within Subview A
.
Use the UIView convertRect:toView:
method:
CGRect frameRelativeToViewControllerView = [subviewB convertRect:subviewB.bounds toView:viewController.view];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With