Re: Programmatic View Question
Re: Programmatic View Question
- Subject: Re: Programmatic View Question
- From: Raleigh Ledet <email@hidden>
- Date: Sat, 18 Sep 2010 08:36:02 -0700
On Sep 17, 2010, at 6:09 AM, Richard Somers wrote:
> The reason for the programmatic view is there are lots of similar views with minor variations between them. Having a programmatic view allows the objects in the view and the layout and configuration of those objects to be controlled from a central location.
Define "lots". 10 or 100? Generally, you create a nib for each view and you programmatically load the nib with a view controller. If variations are minor, then you can reduce the number of nibs to just the major layout differences and in your custom viewController class programmatically hide/show/modify just the minor differences. In general, I find doing most of the work in IB and making minor adjustments programmatically is a lot easier than doing everything programatically.
You can even use this tip recursively if that helps. That is, load a custom view that contains another custom view that you must load from another nib.
-raleigh _______________________________________________
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