News for hackers. Stuff that matters.
Re:Development with the iPhone SDK - Initial Observations by allenbrunson on Thursday June 25, 2009 @09:15AM (#673575)
as for "photo album:" are you sure that app rotates? My guess is that it doesn't, so obviously it won't on the simulator. Not every app rotates, remember. Until very recently, the only one of Apple's apps that did is Safari.

I have gotten my own apps to rotate in the simulator just fine. You have to make that decision at the view controller level. Investigate the UIViewController method shouldAutorotateToInterfaceOrientation:

Re:Development with the iPhone SDK - Initial Observations by ROFISH on Thursday June 25, 2009 @09:37AM (#673596)
In addition, there's a Info.plist key/value, UIInterfaceOrientation with the value UIInterfaceOrientationLandscapeRight or UIInterfaceOrientationLandscapeLeft, that lets you set the default rotation level and the simulator will start the app in the correct rotation.

EDIT: Also the autorotation only works on ViewControllers. If you only have Views without ViewControllers, (such as the default OpenGL app from the wizard) they will not rotate.

Re:Development with the iPhone SDK - Initial Observations by InkweaverReview on Thursday June 25, 2009 @11:09AM (#673765)
Would I have to set up two views within Interface Builder, one for landscape and one for portrait, or do I use the one single view and rotate it using code?
Re:Development with the iPhone SDK - Initial Observations by allenbrunson on Thursday June 25, 2009 @11:26AM (#673806)
you just use one view. implement that view controller method i mentioned, and always return TRUE. you must do this for every view in your app, if you want them to all work in landscape modes.

that's all you have to do, as far as the iphone is concerned. of course you'll have to draw the view contents differently, when you're in landscape mode.

Re:Development with the iPhone SDK - Initial Observations by InkweaverReview on Thursday June 25, 2009 @11:11AM (#673769)
I'm going to look through the Apple sample code and see if I can find an example that changes orientation properly.

So far none of the sample code apps that I have found rotate. Once I find one that does I'll be able to check the code and see how it is done.