Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kamo

macrumors member
Original poster
Mar 21, 2008
34
0
Hello,


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?


Thanks,
kamo
 

fishkorp

macrumors 68030
Apr 10, 2006
2,536
650
Ellicott City, MD
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?
 

cazlar

macrumors 6502
Oct 2, 2003
492
11
Sydney, Australia
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.