How to set image of navigation item (like send button) in MFMailComposer Controller
<p>I want to set image of navigation item (send button) in MFMailComposer Controller,and i write code this..</p>

<p>[picker.navigationItem.rightBarButtonItem setImage:[UIImage imageNamed:@"sendbutton.png"]];</p>

<p>but it's not change it.I change becoz my send button not working using this code..</p>

<pre><code>   UIBarButtonItem *sendBtn=picker.navigationBar.topItem.rightBarButtonItem;
   UIButton *btn2=[UIButton buttonWithType:UIButtonTypeCustom];
   btn2.frame=CGRectMake(280, 2, 55, 30);
   [btn2 setImage:[UIImage imageNamed:@"images (2).jpeg"]forState:UIControlStateNormal];
   btn2.backgroundColor=[UIColor clearColor];
   [btn2 addTarget:sendBtn.target action:sendBtn.action forControlEvents:UIControlEventTouchUpInside];
   UIBarButtonItem *btnTemp2=[[UIBarButtonItem alloc]initWithCustomView:btn2];
   [[[[picker viewControllers]lastObject] navigationItem] setRightBarButtonItem:btnTemp2];
</code></pre>

<p>But my cancel button have code</p>

<p><code>UIBarButtonItem *cancelBtn= picker.navigationBar.topItem.leftBarButtonItem;
     UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
     btn1.frame = CGRectMake(20, 2, 60, 30);
   [btn1 setImage:[UIImage imageNamed:@"btn_tellAFriend_cancel@2x.png"]forState:UIControlStateNormal];<br>
    btn1.backgroundColor=[UIColor clearColor];
    [btn1 addTarget:cancelBtn.target action:cancelBtn.action forControlEvents:UIControlEventTouchUpInside];<br>
    UIBarButtonItem *btnTemp = [[UIBarButtonItem alloc] initWithCustomView:btn1];<br>
    [[[[picker viewControllers] lastObject] navigationItem] setLeftBarButtonItem:btnTemp];
    [btnTemp release];</code></p>

<p>It work fine</p>
