Skip to content

Instantly share code, notes, and snippets.

@tbatsuur
Created October 16, 2018 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbatsuur/099c807cf3fb9445d0b3171fd93dacd2 to your computer and use it in GitHub Desktop.
Save tbatsuur/099c807cf3fb9445d0b3171fd93dacd2 to your computer and use it in GitHub Desktop.
private func fetchOptions() -> PHFetchOptions {
// 1
let fetchOptions = PHFetchOptions()
// 2
fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
return fetchOptions
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment