IPhone app without using Interface Builder

Is there a reason for not writing iphone apps without using an interface constructor?

(or, in other words, is it ok to write applications without a builder?)

+6
iphone interface-builder
source share
4 answers

Personally, my applications do not use NIB inside them, but it depends more on how I started developing than anything else. I have moved from developing Macs (where I use Interface Builder almost every day) to iPhone since the release of the first beta SDKs. Initially, there was no Interface Builder, and even when it arrived, you couldnโ€™t do much with it, so I never took the time to really find out about it on the iPhone. It depends more on how I do what I know.

Jeff LaMarche makes a convincing argument in his article โ€œ Don't Be Afraid of an Interface Designerโ€ so you can use Interface Builder wherever you can, and I encourage new developers to learn how to use it before moving on to creating a software interface. This saves you a huge amount of time for interfaces using standard elements.

Some people claim that there is a performance advantage that can be used using purely software interfaces, but Matt Gallagher has conducted a series of tests and that this acceleration is usually around 5-10%. If you really want to shave this last bit from the time your application starts, you can have the best of both worlds with Adrian Kosmachevsky nib2objc , which generates Objective-C from your NIB files.

However, there are many times that you will need to manipulate the interfaces programmatically, for example, for custom views and animations. This code can exist in parallel with Interface Builder without any confusion. Again, this is a matter of personal preference at the moment, but my recommendation is to use Interface Builder because it can save you.

+9
source share

I never wrote an iPhone app that uses Interface Builder (.xib files), but it's just a personal taste: I like apps 100%.

The reason is that I don't like applications that require development-time tools if you need to change anything later. It creates addiction, which may not be a problem today or next month, but it can become a problem in 3 years.

So the answer is yes, it's great to write iPhone apps without using Interface Builder.

+4
source share

Of course, it is absolutely normal to write applications without IB. It takes a bit more tweaking (I believe there are some changes you should make to your Info.plist file), but this is certainly possible, and people do this all the time.

Personally, I prefer to use Interface Builder for most tasks, but usually just to get a basic layout (so I donโ€™t have to deal with error calculation, etc.). Any additional customization that I prefer to do in code.

+1
source share

You can edit .XIB files manually if you wish. After all, this is XML. It is impossible to help at least one of them in the project. In addition, you can create all of your controls from code. As far as I can tell, the latter takes up less text.

Then there are some applications in which the XIB file is useless. I'm talking about games where art / design considerations outperform the convenience of having your own widgets.

So, yes, this is normal both at the development level (without its own widgets) and at the implementation level (yes native widgets, but sans IB).

0
source share

All Articles