
Development with the iPhone SDK - Initial Observations - InkweaverReview
http://experimentgarden.blogspot.com/2009/06/development-with-iphone-sdk-first.html
======
yangyang
Doesn't really say a lot.

Xcode is nice, there's a simulator, Interface Builder has lots of windows, and
you need to program in Objective C. Nothing very insightful.

~~~
InkweaverReview
These are initial observations from the first day of using the iPhone SDK.
Basically, I'm just sharing my first thoughts and impressions on the tools
involved and how they work and appear.

I'll share some insight later, after I explore the SDK and Objective C code
interfaces in more detail.

------
mitchellh
I always dislike "initial observation" posts because everyone seems to see
things through rose-tinted glasses when they first come upon a new programming
toy (or new programming tool).

Its always more interesting to see the blog posts making observations after a
person/company has released a serious project. This way, these people have
been using the tools in their daily workflow for weeks/months and know most of
the ins and outs of it.

~~~
dkarl
Plus, with a free download like the iPhone SDK, it's more fun to get one's own
first impressions than to read somebody else's.

------
colinprince
I tried to comment on the story but it is broken.

To the author:

I think where you say "require that I learn an entirely new language" and go
on to mention interfaces and handlers, you mean instead Cocoa (Cocoa Touch in
this case)

Nice write up and good luck

------
allenbrunson
from the article: "The only shortcomings that I have noticed so far is that
the simulator doesn't seem to respond to orientation changes of the iPhone
simulator. There is a menu option to rotate the iPhone, but the orientation of
the programs, even the built-in ones, doesn't change when the simulator
rotates."

I just tried this on my own iPhone simulator, and it's not true. The
simulator's version of Safari does indeed rotate sideways when the simulator
does.

~~~
InkweaverReview
You are correct.

Safari does indeed rotate, but other applications such as Photo Album, etc
don't. And it doesn't work on other Apple sample code programs either. Safari
and Contacts seem to be the only two apps that rotate.

Perhaps I just need to add the right code to my apps to make them rotate, but
even the sample code applications from Apple don't rotate.

I'm still looking into this issue. There has to be something that I'm missing.

~~~
allenbrunson
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:

~~~
ROFISH
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.

~~~
InkweaverReview
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?

~~~
allenbrunson
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.

