title: SMS option not working properly
body: <p>I am using xcode 4.2 and i am developing an  iphone APP , part of this app is sending SMSs</p>
  
  <p>here is the code that I typed:</p>
  
  <pre><code>-(IBAction)SMSbutton{
      MFMessageComposeViewController *sms = [[MFMessageComposeViewController alloc] init];
          if ([MFMessageComposeViewController canSendText]) {
              sms.body= [NSString stringWithFormat: @"text"];
              sms.messageComposeDelegate = self;
              [self presentModalViewController:sms animated:YES];
  }
  </code></pre>
  
  <p>I can open the SMS application and send SMS but the problem is whether I click on the "cancel" or the "send" button the message application does not go away . how to do that ?</p>
  
  <p>thanks</p>