UIBarButtonItem losing their custom view image
<p>I'm using iphone sdk 3.1.2.</p>

<p>I have 3 root view controllers each on separate tabs. Their left nav bar button has a custom view assigned as follows in each of their <code>viewDidLoad</code> methods. The master custom view is held by the <code>AppDelegate</code>. Each <code>regView</code> is a retained property. In the <code>appDidFinishlaunching</code> method I alloc an <code>imageView</code> (instance of <code>AppDelegate</code>) and assign it an image:</p>

<pre><code>UImageView* regView;
@property (nonatomic,retain) UIImageView* regView;

-(void) viewDidLoad
{
 ....

self.regView = appDelegate.regView;

    UIBarButtonItem* regButton = [[UIBarButtonItem alloc] initWithCustomView:self.regView];
    self.navigationItem.leftBarButtonItem = regButton;
    [regButton release];
}
</code></pre>

<p>However when I swap between the tab bar items the previous selected view controller loses its <code>leftBarButton</code> custom view until only the very last selected holds onto it.The other 2 can never get their leftbutton custom view back!</p>

<p>Anyone know what I'm doing wrong?</p>
