开发者

which approach use less memory in iphone sdk, only one nib for several views OR one nib per view ? which approach lead us to a better performance?

which approach use less memory in iphone sdk, only one nib for several views OR one nib per view ? which approach lead us to a better开发者_StackOverflow performance ?


Something that's possibly more of a concern is the load times - if you have multiple views in a NIB, then loading one of those views will require you to load all of the views. This could be a bit of an issue unless all of those views (and/or other objects) are needed (or visible) at the same time. If they are always needed at the same time (since they're all visible on screen together), put them in a single NIB. If some of them will be loaded later, then put them in a different NIB. That way, you optimise your load times.

Incidentally, this will keep your memory footprint down by allowing you to unload views that aren't visible.

Note: total RAM required to load all of the views shouldn't be any different when comparing a single NIB to multiple NIBs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜