I recently became interested in iPhone app development, so I’ve been looking at online tutorials, and also reading a book, trying out the examples as I go along.
I’m getting better, but one of the things I still find quite annoying about the usual development model is that I really have no idea what the SDK is really doing behind the scenes to make the app “work” because Apple protects me from this. For example, when I make connections on interface builder, this presumably corresponds to code being generated somewhere… Where that code is and what it does and how it works are not obvious (to me).
So I’m wondering, is it possible to create an iPhone app entirely programmatically? That is, have execution start in some main method, which will then programmatically create any views, register event listeners, etc. And if yes, what are some good resources for something like this?
There is no generated code. It’s serialization. Interface Builder serializes the object tree to the .xib file, your app deserializes it back.
Of course, you can also build your UI in the code, it’s just more code. In early versions of the SDK this was even necessary, since Interface Builder was not available yet.