Hi,

I have a hard time figuring out how to get the frame (in the window coordinate system) a view will rotate to, when the rotation has just begun.

I'm observing UIApplicationDidChangeStatusBarFrameNotification on NSNotification's defaultCenter. When this notification is delivered, the rotation seems to be in progress. At that point I need to know the final frame the view is being rotated to.

I've tried everything I could think of including these:

r1 = [[view superview] convertRect:[view frame] toView:nil];
r2 = [[view window] convertRect:[view bounds] fromView:view];
r3 = [view convertRect:[view bounds] toView:nil];
r4 = [[view window] convertRect:[[[view layer] modelLayer] frame] fromView:[view superview]];

All get me the same results all the time (expected) but depending on the rotation direction and the previous orientation, I get nonsensical results like

{{52, 0}, {268, 480}}

or

{{-80, 80}, {416, 320}}

for a window-filling view (with a navigation bar visible). This led me to believe that I'm getting coordinates the view is set up to rotate from when the orientation changes. I can't for the life of me find a way to get the new frame that the view will have when the animation is complete.

I feel like I'm missing something obvious, any ideas?

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to