Swift 4: Using Core Data - NSSortDescriptor and NSPredicate

Published: 10 November 2017
on channel: Swift Almanac
2,304
14

When conducting an NS Fetch Request, you most likely do not want every record in your database, but a subset of the date. NSPredicate allows you to select a subset of your data, which is returned as an Array by NSFetchRequest, and thus can be ordered, with an NSSortDescriptor.

Multiple NSSortDestriptors can be supplied to sort date in multiple columnts, such as age, followed by gender, followed by name.


Watch video Swift 4: Using Core Data - NSSortDescriptor and NSPredicate online, duration hours minute second in high quality that is uploaded to the channel Swift Almanac 10 November 2017. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,304 times and liked it 14 visitors.