It's exactly the opposite of magical: you're simply building objects in IB that are "live" while you're building them and that then are freeze-dried when you save the file, and reconstituted at runtime.
It's certainly magical in the sense that it's a beautiful way to do things. ;-)
I prefer a programming model that is not so complicated that you need an IDE to generate the code for you. Even watching the Apple tutorials on using XCode I was struck by how many magic incantations you have to kearn that seem totally opaque and unmotivated (just hold down command and drag this thing on top of that thing and set this property in the pop up - what?).
I think simple programs should be able to be expressed in one file and created in a simple text editor.
You're missing the point: no code is being generated. Objects are being generated. The real objects you'll have at runtime are being generated. The real objects that will be freeze-dried to a file and reconstituted at runtime.
You're saving creating the hundreds of lines of codes that would be required to do this in a "normal" IDE.
This seems a patently false statement. I would count as code any representation of procedural or configuration information that could be interpreted or executed in the running of an application.
If the underlying systems requires hundreds of lines to represent a simple object (like a button, panel, or toolbar), then maybe as a programming environment designer, you should go back and simplify your underlying representation, rather than add a layer of UI to generate hundreds of lines of code.
...which is a big part of why Interface Builder is handy, because it saves you from trying to figure out exactly how large you want the button to be and where to put it.
Now, when you put together all the objects in a moderately complicated UI, you will end up with hundreds of lines of code. Some people find it easier to work with this visually in Interface Builder. Others find it easier to manually construct the UI in code. Either method works perfectly well. I generally use a mix of both, depending on the nature of the UI element I'm working with.
> Some people find it easier to work with this visually in Interface Builder.
All of our designers use IB to layout the UI. It works really well - as they don't have to touch the code and we don't have to touch the layout.
Unfortunately, if you are doing any kind of custom animation (think sliding/expanding), IB is useless - you'll have to set the frames in code.
In general, IB is great because it helps separate presentation from the code.
When I first started out, I hated IB, but I've come to accept the fact that it really does help productivity (when working with designers closely). If you hate IB, consider going Android - there is nothing like IB on Android. All XML and a simple (nothing like IB) layout editor.
It's certainly magical in the sense that it's a beautiful way to do things. ;-)