Re: to NIB or not to NIB
Re: to NIB or not to NIB
- Subject: Re: to NIB or not to NIB
- From: Graham Cox <email@hidden>
- Date: Wed, 17 Jun 2009 12:34:55 +1000
On 17/06/2009, at 12:25 PM, Chunk 1978 wrote:
i also wonder about the disk space or resources required to run and
app with an nib/xib, especially for simple apps on iPhone OS. is it
true that while including a nib/xib is time saving convenience, it's
not as ideal for distribution or even launch time based on size and
resources?
I suspect it makes very little difference. A nib is a bunch of
archived objects. When they are dearchived they occupy memory, just as
the same objects would if you'd instantiated them yourself when
building out your GUI without the nib. Dearchiving may take a little
longer than directly instantiating the objects (does it? Measure it
and let us know), but probably not noticeably, since much of what it's
doing is instantiating objects. It's just two different routes to the
same end result.
Also, if you split your app up into nibs for each distinct window or
dialog, then they'll be loaded lazily, so if the user never invokes a
particular dialog, it stays on disk unread. That takes up neither time
nor memory. All it occupies is disk space but really, the amount of
space is relatively tiny even on the iPhone.
The convenience of nibs far outweighs these trivial considerations, IMO.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden