title: if iOS 6 [do this] else iOS 5 [do that]? - UIActivityViewController
body: <p>I've got a <strong>UIActivityViewController</strong> that shares Text and Image on Facebook/Twitter/Email, but it only works on iOS 6+.. Is it possible to pick up the iOS version running on the device and do an IF Statement to avoid crashing in iOS 5 ? If iOS6, do the following code, else do something else...?</p>
  
  <pre><code>-(void)shareMenu
  {
      NSString *textToShare = @"Text that will be shared";
      UIImage *imageToShare = [UIImage imageNamed:@"share_picture.png"];
      NSArray *itemsToShare = [[NSArray alloc] initWithObjects:textToShare, imageToShare, nil];
      UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
      activityVC.excludedActivityTypes = [[NSArray alloc] initWithObjects: UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, UIActivityTypeMessage, UIActivityTypePostToWeibo, nil];
      [self presentViewController:activityVC animated:YES completion:nil];
  }
  </code></pre>