Aspen - rotate hardware

Discussion in 'Mac Programming' started by kamo, Mar 21, 2008.

  1. macrumors member

    Joined:
    Mar 21, 2008
    #1
    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
     
  2. macrumors 6502a

    Joined:
    Jul 2, 2006
    Location:
    Scotland
    #2
    It may be one of the features that is not implemented in the Beta yet ***cough***Interface Builder***cough***.
     
  3. macrumors demi-god

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #3
    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?
     
  4. thread starter macrumors member

    Joined:
    Mar 21, 2008
    #4
    Could you pm the code to me?
     
  5. macrumors 6502

    Joined:
    Oct 2, 2003
    Location:
    Sydney, Australia
    #5
    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.
     
  6. thread starter macrumors member

    Joined:
    Mar 21, 2008
    #6
    thanks cazlar
     

Share This Page