Opening AFOpenFlowView already in landscape mode

Posted by justin on Stack Overflow See other posts from Stack Overflow or by justin
Published on 2010-03-22T20:37:33Z Indexed on 2010/03/22 20:41 UTC
Read the original article Hit count: 370

Filed under:

I'm using the open source CoverFlow replacement from here: http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/

When I detect that a certain view has gone from portrait to landscape mode, I instantiate an AFCoverFlowView and push it onto the navigation stack.

If I do so in response to

  • (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

The cover flow view comes up as though the phone were still in portrait mode.

If I push the view in response to

  • (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

it works perfectly - the view comes up in landscape mode with the phone in landscape mode

Unfortunately, the device doesn't reliable get willRotateToInterfaceOrientation messages. I have tried making sure that

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

is in loadView but that doesn't help with the notificiations.

So, my questions are:

  1. Is there a way to reliably get willRotateToInterfactOrientation?

if not

  1. How do I instruct AFCoverFlowView to come up in landscape mode (if the device is already in landscape mode)

© Stack Overflow or respective owner

Related posts about iphone