Loading multiple nibs in the same controller

Discussion in 'Mac Programming' started by abushnaq, Aug 12, 2008.

  1. abushnaq macrumors newbie

    Aug 12, 2008
    Hi Everyone,

    I'm trying to create a custom view controller where one component comes in from one nib file and the second comes in from another(reason for this is that one component is inherited from a base class view controller). Is this even possible? If it is possible, are there any good references out there? I'm new to both Objective C and iPhone development.

  2. gnasher729 macrumors P6


    Nov 25, 2005
    iPhone is under NDA.

    For Cocoa, check out initWithNibName:bundle in NSViewController. It looks as if you want to override initWithNibName in your view controller; make it call initWithNibName for the superclass first which will load one nib file, and if the result is not NULL then call initWithNibName to load the view controller for another component from its own nib file.

Share This Page