open iphone Mail from Actionsheet
<p>I want to open Mail app from my app when the one button in actionsheet is pressed, I know this way :</p>

<pre><code> -(IBAtion)openClick:(id)sender
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:foo@example.com"]];
}
</code></pre>

<p>but can I write this method inside <em>if statement</em> or <em>switch case</em>?(in ControlView class NOT NSObject class , because I use actionsheet for this propose)</p>

<p>like this:</p>

<pre><code>     - (void)actionSheet:(UIActionSheet *)modalView clickedButtonAtIndex:(NSInteger)buttonIndex
{


switch (buttonIndex)
{
    case 0:
    {

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:foo@example.com”]];
        break;
    }
</code></pre>

<p>I can't test my code because simulator doesn't have the Mail app..
So I need to know is this will work in controlView or must write it in NSObject class ?</p>

<p>+
seconde question :
I want to open Mail app from my app and copy the content in the view to mail body,then the user choice the contact from his contacts list ! Is this way achieve my goal?</p>
