• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Programmatic View Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Programmatic View Question
      • From: Richard Somers <email@hidden>
References: 
 >Programmatic View Question (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: merging instances of an entity
  • Next by Date: Re: Programmatic View Question
  • Previous by thread: Re: Programmatic View Question
  • Next by thread: Re: Programmatic View Question
  • Index(es):
    • Date
    • Thread