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 -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -