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: Tue, 02 Apr 2013 23:21:22 +0200
On 4/2/13 10:53 PM, Quincey Morris wrote:
On Apr 2, 2013, at 13:25 , Markus Spoettl <email@hidden
<mailto:email@hidden>> wrote:
I'm displaying an overlay window which is "attached" to the view in question.
When the rotation takes place, it needs to realign itself so that it's new
location agrees with what the view displays (in my context).
Isn't it a mistake to tie this to rotation? IIRC there are other reasons the
root view might be resized (e.g. squished to make room for the status bar or
not? notifications?). You probably want to adjust your child view location in
those cases too.
IAC you might be safer to avoid using the frame. If there's a transform involved
in the view's rotation, then the frame property will be meaningless. (But IDK if
there's actually a transform applied to the view during rotation, or whether
there's just a rotating animation.)
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.
The only time I get a bogus view frame is when the rotation notification is
delivered. If I wait for the rotation to complete and get the frame then, it's
correct (no matter which orientation the device has been rotated to). Only, it's
useless as I have to rotate the overlay alongside the main window, so before the
rotation is complete.
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