Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
Construye un `NSFetchRequest` que enlazará directamente
con la vista.
*/
func fetchRequestFavoriteSessions() -> NSFetchRequest<Favorite>
{
let request: NSFetchRequest<Favorite> = Favorite.fetchRequest()
let sortDate = NSSortDescriptor(key: "createdAt", ascending: false)
let sortName = NSSortDescriptor(key: "name", ascending: true)
request.sortDescriptors = [ sortDate, sortName ]
return request
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.