Skip navigation.
 
mlRe: Conditionally modifying NIBs?
FROM : Mike Fischer
DATE : Wed May 14 20:32:39 2008

Am 14.05.2008 um 20:11 schrieb David Wilson:

> On Wed, May 14, 2008 at 1:37 PM, Mike Fischer 
> <<email_removed>> wrote:

>>
>> Details:
>> Let's say I have a project which includes a nib N1 which builds a 
>> target T1.
>> Now I want to add a new target T2 which builds a variant of of T1 
>> that adds
>> some elements to nib N1 and removes some others (N2).

>
> Given that you don't want to maintain two separate nibs, I would boil
> down the overlap between N1 and N2 into a new nib, N0, that contains
> only those elements that exist in both. Depending on the extent of the
> non-overlapping pieces, they can either be created programmatically
> after N0 is loaded depending on which target is running, or nibs N1
> and N2 can contain the remaining pieces such that they can be loaded
> in and spliced into N0 (adding new views to tab views, etc etc. If you
> design the nib and interface properly to segregate the common and
> target-specific functionality, this should be fairly straightforward.


Yes, I had thought about that possibility. If it is just a view or a 
subview (an area in a view) this is probably easy to do. It gets more 
complicated if there are other objects in the nib that need to be 
connected. Not impossible to do though.

Also it moves the work needed to "do" the target specific 
modification to run-time instead of build-time. Not that this would 
usually be a huge amount of much work, but it is somewhat wasteful. 
In addition to the work special code is also needed for this, 
bloating the app with stuff that should not really be necessary.


Mike
--
Mike Fischer    Softwareentwicklung, EDV-Beratung
                                Schulung, Vertrieb
Note:            I read this list in digest mode!
      Send me a private copy for faster responses.

Related mailsAuthorDate
mlConditionally modifying NIBs? Mike Fischer May 14, 19:37
mlRe: Conditionally modifying NIBs? David Wilson May 14, 20:11
mlRe: Conditionally modifying NIBs? Mike Fischer May 14, 20:32
mlRe: Conditionally modifying NIBs? Hamish Allan May 15, 00:07
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 00:25
mlRe: Conditionally modifying NIBs? Hamish Allan May 15, 01:10
mlRe: Conditionally modifying NIBs? Jonathan Hess May 15, 02:20
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 13:25
mlRe: Conditionally modifying NIBs? Mike Fischer May 15, 13:26
mlRe: Conditionally modifying NIBs? Jonathan Hess May 15, 22:36
mlRe: Conditionally modifying NIBs? Uli Kusterer May 18, 11:14
mlRe: Conditionally modifying NIBs? Mike Fischer May 18, 15:48