title: Formatting NSPredicate for Photokit Fetch
body: <p>I'm having a lot of trouble understanding how to formulate filers for photokit queries, specifically, how to formulate an NSPredicate when you only want to retrieve certain mediaTypes. In my case, I'm trying to retrieve all albums (i.e. PHCollectionAssets), though I only want the photos in those albums. I'm confused as to how to formulate my NSPredicate to do this. I found the code below in the docs that filters certain mediaSubtypes, but I just want to filter by the PHAssetMediaTypeImage mediaType. Would someone be able to explain the syntax of the NSPredicate code below and how I could set up a predicate along the lines of <code>@"mediaType == %@, PHAssetMediaTypeImage"</code>, that doesn't cause my PHFetchRequest to crash, as it does now? </p>
  
  <pre><code>PHFetchOptions *fetchOptions = [PHFetchOptions new];
  fetchOptions.predicate = 
      [NSPredicate predicateWithFormat:
          @"(mediaSubtype &amp; %d) != 0 || (mediaSubtype &amp; %d) != 0", 
          PHAssetMediaSubtypePhotoPanorama, PHAssetMediaSubtypeVideoHighFrameRate];
  PHFetchResult *fetchResult = [PHAsset fetchAssetsWithOptions:fetchOptions];
  </code></pre>