Two buttons needed at navigationItem.rightBarButtonItem. Image not getting displayed
<p>I have to have two buttons on the right side of the navigation bar. So i created a tool bar and added two bar button items to its content view. Like below.</p>

<pre><code>UIBarButtonItem *shareButton = [[UIBarButtonItem alloc]
         initWithImage:[UIImage imageNamed:@"share-icon-32x32.png"]
         style:UIBarButtonItemStyleBordered
         target:self action:@selector(showShare)];

 shareButton.width = 30.0f;
 [buttons addObject:shareButton];
 [shareButton release];
</code></pre>

<p>where buttons is an array holding the button objects.</p>

<p>Like wise i have another barbutton item like below</p>

<pre><code>UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
           initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
           target:self
           action:@selector(addDescription)];

  addButton.style = UIBarButtonItemStyleBordered;
  [buttons addObject:addButton];
  [addButton release];
</code></pre>

<p>Now add the array to the toolbar like below</p>

<pre><code>[toolbar setItems:buttons animated:YES];
 [buttons release];
</code></pre>

<p>and add it to the rightBarButton like below</p>

<pre><code>self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
             initWithCustomView:toolbar];
 [toolbar release];
</code></pre>

<p>I am getting two bar button items on the right bar but i am not able to get the image displayed on to the share button item. Its just a white patch. Can any body tell me what am i doing wrong or how to get the image displayed.</p>

<p>Regards,</p>

<p>Syed Yusuf</p>
