This is most def something very simple, but it is driving me crazy, cant figure it out.
It was very simple, see solution below
My app does not auto rotate. It is just stuck in portrait.
My AppDelegate creates a viewController witch has shouldAutorotate uncommented an simply returns yes.
My viewController sets up a scrollview(x) as it's view and adds a subclassed custom scrollview(y) as its subview.
Than scrollview(y) adds UIView as it's subview. This UIView acts as a content view and has 1 or multiple other UIViews as subview.
So: AppDelegate -> scrollView(x) -> scrollView(y) -> UIView -> 1 or more UIView's
I have a line displayed when shouldAutorotate is called. This happens 2x when the application has finished loading. When I rotate the simulator, nothing happens, shouldAutorotate is not called apparently because I don't see a line displayed in my log.
Is there a property on the UIScrollview which prevents it from rotating?
Update: I've just changed my plist.info to start the app in landscape. Now the app is stuck in landscape and does not rotate to portrait.
FYI: I'm not using interface builder, all done in code.
Solution: Turns out I was a bit to memory conservative. In my app delegate I would create an instance of a viewController, add it to the window, and than called release on it, figuring it was added to the window so I wouldn't need it anymore. Bad idea. The shouldAutorotate messages is therefore sent to an object that does not exist anymore. I did get a message in my console about a message being sent to a released object, but only multiple seconds (20 or so) after I rotated the simulator.
I've learned that you should always keep a reference to your "main/root viewController" as an instance variable in appDelegate