Re: UIView final frame after device rotation
Re: UIView final frame after device rotation
- Subject: Re: UIView final frame after device rotation
- From: Markus Spoettl <email@hidden>
- Date: Wed, 03 Apr 2013 09:16:34 +0200
On 4/3/13 12:47 AM, Quincey Morris wrote:
On Apr 2, 2013, at 14:21 , Markus Spoettl <email@hidden
<mailto:email@hidden>> wrote:
Not sure if I understand what you're saying, but if that was the case, the
view's frame I'm attaching the overlay to would turn out wrong if the device
is rotated.
No, once the rotation is complete (at least), there'd be no transform any more,
and so the frame would then be valid.
Ah, OK you're right.
The only time I get a bogus view frame is when the rotation notification is
delivered.
It would be easy to try examining the "bounds" and "center" properties at the
time of the notification, and see whether *they* are bogus. If not, you should
be able to orient your child view using those two properties, instead of using
"frame".
bounds and center are correct at all times. However, I need the view's frame in
screen coordinates because I'm positioning an independent overlay window, not a
subview. Since the transformation messes with -convertRect:from/toView: in my
view hierarchy, I have no idea how to get to the frame I'm interested in. Any ideas?
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden