I applied CATransform3D
to a view. How can I find its approximate new frame after it?
I mean I applied a complex transform: rotation, translation, scale and perspective. And I need to find something like approximate minimal rect. I need it because this view is added to UIScrollView
(to know the contentSize
I need and of course to implement "scrollToItem:")
If you want to get the
CGRect
that completely contains this transformed view, you can useconvertRect:toView:
. For example:For example, the gray view is some transformed
UIView
, and the black border is the result ofconvertRect:toView:
shown above: