3lvis / DATASource

Core Data's NSFetchedResultsController wrapper for UITableView and UICollectionView
Other
106 stars 27 forks source link

sortDescriptors proposal #116

Closed dneykov closed 5 years ago

dneykov commented 5 years ago

Hello everyone,

may I suggest computed property just like predicate but sortDescriptors so you can easily sort your data source. What do you think?

Best regards, Daniel

JpegDev commented 5 years ago

I'm not sure to understand. sortDescriptors already exist on NSFetchRequest

Ex: let request: NSFetchRequest = NSFetchRequest(entityName: "Entity") request.sortDescriptors = [NSSortDescriptor(key: "title", ascending: true)] request.predicate = NSPredicate(format: "selected == true") ......

dneykov commented 5 years ago

I'm not talking about NSFetchRequest but for DATASource so you can sort your tableView for example when data is already loaded.

rlester commented 5 years ago

I ran into this issue as well and opened a PR to fix it: #119

3lvis commented 5 years ago

Great job @rlester 👏 🔥