Sorting Shared Albums with the Apple IOS Photokit -


before lot of fruitless experimenting, know if can sort shared albums using apple photokit. know native photos app not able to.

as far understand question, want sort based on timestamp @ asset added. try this:

_assets = [[nsarray alloc] init];  phfetchoptions *options = [[phfetchoptions alloc] init]; //sort according date options.sortdescriptors = @[[nssortdescriptor sortdescriptorwithkey:@"creationdate" ascending:no]]; //if want images options.predicate = [nspredicate predicatewithformat:@"mediatype == %d", phassetmediatypeimage]; //each album assetcollection phfetchresult *fetchresult = [phasset fetchassetsinassetcollection:self.assetscollection options:options]; _assets = fetchresult; 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -