开发者

Does using the interface builder for iPhone development considered a good practice?

I am coming from the .net world where 开发者_如何学JAVAtoo much use of the Forms designer in WinForms (not to mention WebForms) can cause your code to be an unmaintainable ball of mud.

I wanted know how the Interface Builder is considered in the iPhone world in that manner.

Can someone please save me the time and point me to the best practices of iPhone development?

Thanks


Interface builder is the standard way to go for a lot of your application's UI. Using IB does not auto-generate any code so you don't end up with a mess of #region'd out code. Back in the day most programmers would shy away from using a visual UI editor because they lose control and the generated code would often suck. This isn't the case with IB.

There are still situations where creating views in code is easier or quicker, and there is nothing wrong with doing that. One particular situation where I don't use IB is with table view cells. You can create custom cells using IB but I find that I am almost always laying out the cell contents in code so creating it in IB doesn't offer many advantages.


IB is a really good tool and it doesn't generate much code, or not the code that you have to maintain. Then, I think in terms of code maintain, you don't have to worry much.

IB has some problems for sure. Those problems that I can see may be File IO to load the nib to memory. It can also be code reusing when you have some similar UI elements but you can overcome by extracting and creating common components.

Generally, I think for beginners, you should use IB to reduce your burden.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜