View Full Version : Aspen - rotate hardware
Mar 21, 2008, 08:23 AM
I can't figure out how to enable hardware rotation for my app in Aspen. I looked though all the examples, none of those you can rotate either (in Aspen -> Hardware / Rotate Left or Right.)
Does anyone know how to enable this?
Mar 21, 2008, 08:39 AM
It may be one of the features that is not implemented in the Beta yet ***cough***Interface Builder***cough***.
Mar 21, 2008, 09:07 AM
The app has to specifically allow for rotation. For example, the simulator will rotate in Safari, but not in most of the sample apps. There's code for that. I don't think we're allowed to post actual examples, are we? Doesn't that violate the terms you agreed to when downloading the SDK?
Mar 21, 2008, 09:12 PM
Could you pm the code to me?
Mar 21, 2008, 10:45 PM
I've played with this. You need to implement shouldRotateBlahBlahBlah: (sorry, no docs on this computer to get the proper name) in your view controller. All you need to do is add the method and return YES. One thing I found (and it took me a while to work this out) is that if you have a toolbar, you need to implement this in all view controllers run by that toolbar. Until I did that, nothing would rotate at all.
BTW, there's a WhichWayIsUp sample which shows a simple rotating view.
Mar 22, 2008, 11:00 AM