Norway


func loadItems(with request: NSFetchRequest<Item> = Item.fetchRequest()) {

This is from a Udemy tutorial about Core from Angela Yu. The example has internal , external and . The question is, how do you control what the is?

Lets̵;s say I want the default to be:

    request.predicate = NSPredicate(format: "title CONTAINS[cd] default")
    request.sortDescriptors = [NSSortDescriptor(: "title", ascending: true)]

How do I make that the default and how do I determine what the current default is?

I do a print() and default is null for predicate and sortDescriptors.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here