title: Determine if image picker media type is video
body: <p>I've seen various methods for checking whether the returned media type in <code>-imagePickerController:didFinishPickingMediaWithInfo:</code> is video. For example, my way:</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)imagePicker
  didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
      if (UTTypeEqual(kUTTypeMovie, 
      (__bridge CFStringRef)[info objectForKey:UIImagePickerControllerMediaType])) 
      {
          // ...
      }
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];
  if ([mediaType isEqualToString:(NSString *)kUTTypeMovie]) {
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if ([mediaType isEqualToString:(NSString *)kUTTypeVideo] || 
      [mediaType isEqualToString:(NSString *)kUTTypeMovie])
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if (CFStringCompare ((__bridge CFStringRef) mediaType, kUTTypeMovie, 0)
          == kCFCompareEqualTo) 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if ([mediaType isEqualToString:@"public.movie"]
  </code></pre>
  
  <p>Everyone seems to have a different way of doing this. What's the recommended method for checking the media type? Preferably with a way to include "all image types" or "all video types".</p>