question about init and load from xib for a custom UIView
<p>I am trying to create a custom UIView class which loads from a xim file that contains the interface for that view. I am trying to encapsulate the [NSBundle mainBundle] loadNibNamed...] within the init method of my custom view as follows:</p>

<pre><code>- (id)init 
{    
    self = [super init];
    if (self) 
    {
        NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"LoadingV" owner:self options:nil];
        self = [(LoadingV*)[nibViews objectAtIndex: 0] retain];
    }
    return self;
}
</code></pre>

<p>I want to know:</p>

<ol>
<li>Is this an acceptable way of doing so? And is there any better way?</li>
<li>Should i keep the "retain" given that i do not call [self release] in dealloc?</li>
</ol>

<p>Cheers
AF</p>
