Instantiating a nib object to present in a view
<p>I have a LegendViewController that shows a legend.  Originally, I just plopped an UIImageView in there.  However now, we need a few legends and I want to reuse the LegendViewController.  So I created a new initializer:</p>

<pre><code>- (id)initWithView:(UIView *)view withNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    [self initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        [self.view addSubview:view];
    }
    return self;
}
</code></pre>

<p>So now this works assuming I pass in a UIView object.  For one of my legends, I was wondering if I could load a .xib into my view controller without an image or a UIView object.  I have a very simple legend where I just want some color coded squares (UIViews with colors), and some text (UILabels).  I can create this in a standalone .xib file, but I wasn't sure how I could load it into my LegendViewController.  I've got so far as:</p>

<pre><code>UINib *nib = [UINib nibWithNibName:@"HealthLegend" bundle:nil];
</code></pre>

<p>where HealthLegend is my standalone .xib file with my data.  Or can this not be done and I need to either create an image in some drawing program, or draw the code manually in drawRect?  Thanks.</p>
