Loading multiple nibs in the same controller

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

  1. abushnaq macrumors newbie

    Joined:
    Aug 12, 2008
    #1
    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.

    Thanks,
    Ahmad
     
  2. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    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