views:

102

answers:

2

The problem is this:

  • I put the simulator in landscape
  • I start the app
  • The app is unable to detect the correct orientation, always unknown!

I have created a sample project that demonstrates the problem I have. Take it here

How can I solve that?

thanks

+2  A: 

It's a simulator bug. report it to Apple: bugreport.apple.com

Jasarien
I agree. If it works fine on a device I would chalk it up as a simulator bug. I noticed a bunch of quirky orientation behaviors in the simulator that were not repeated on the device.
MrHen
thanks. I've reported the bug.
Digital Robot
I cannot test it on the real device because there's no iPad in Europe. Is there something that can be done to circumvent this problem, so I can continue developing this app?
Digital Robot
+2  A: 

This isn't a bug; just use the interfaceOrientation property of your UIViewController to get the current orientation. That property is always set at app startup.

I recently wrote a blog post on this issue:

http://bynomial.com/blog/?p=25

Tyler
thanks! that is great! you saved my life!!! :-)
Digital Robot