ios - PHFetchOptions mediaSubtype predicate -


following predicate should fetch screenshots only, work fine.

options.predicate = [nspredicate predicatewithformat:@"(mediasubtype & %d) != 0", phassetmediasubtypephotoscreenshot]; 

however if try exclude screenshots using follwing predicate, of images excluded

options.predicate = [nspredicate predicatewithformat:@"(mediasubtype & %d) = 0", phassetmediasubtypephotoscreenshot];     

all im trying exlude screeshots asset fetch.

is known bug or missing ?

i made quick check , seems work me:

 phfetchoptions *options = [[phfetchoptions alloc] init];  options.predicate = [nspredicate predicatewithformat:@"(mediasubtype & %d) == 0", phassetmediasubtypephotoscreenshot]; 

note double equal in predicate comparison instead of single one.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -