title: UIActivityViewController
body: <p>I have a problem with the UIActivityViewController on iPad</p>
  
  <p>Here is my Code: </p>
  
  <pre><code>NSString* someText = @"Hi, I am using the official iEveryThing Tech app #iEveryTech";
          NSString* Website = [NSURL URLWithString:@"https://itunes.apple.com/us/app/ieverytech/id578148847?l=de&amp;ls=1&amp;mt=8"];
          NSArray* dataToShare = @[someText,Website];
  
          Class activityViewController = NSClassFromString(@"UIActivityViewController");
  
          if(activityViewController) {
              UIActivityViewController* activityViewController =
          [[UIActivityViewController alloc] initWithActivityItems:dataToShare
                                            applicationActivities:nil];
              [self presentViewController:activityViewController animated:YES completion:nil];}
  
  
  
          }
  </code></pre>
  
  <p>On iPhone the Mail composer View will disappear after sending the mail but not the Composer on the iPad here is my Composer: </p>
  
  <pre><code>-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
  
      if (error) {
  
          UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"error"
  
                                                          message:[NSString stringWithFormat:@"error %@", [error description]]
  
                                                         delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil, nil];
  
          [alert show];
  
  
          [self dismissModalViewControllerAnimated:YES];
  
      }
  
      else {
  
          [self dismissModalViewControllerAnimated:YES];
  
      }
  
  }
  </code></pre>