This project includes solutions to the challenges.
- Make it accept a string parameter that controls which predicate is applied. You can use Swift’s string interpolation to place this in the predicate.
- Modify the predicate string parameter to be an enum such as
.beginsWith
, then make that enum get resolved to a string inside the initializer. - Make
FilteredList
accept an array ofSortDescriptor
objects to get used in its fetch request.