swift - how would i skip displaying certain entries when populating cell rows from core data in a tableviewcontroller? -
For an app I'm working, I have saved many items in my coredata model
My intention is to print selectively for those people who are based on the fact that some characteristics are true.
The items given in the CoreData example:
/////////////////////
1 - name, which displays: true
2 - name: Sally, display: false
3 - name: Bob, display: false
4 - Name: Jess, Display: True
/////////////////////
I want only my table scenes To demonstrate where the demonstration is true, only 4 and 4 of the entries will be listed in my table view
So far, I only know that every A item how to print with the table view data source protocol
Thanks for a noob to help!
I will do something like this:
// unit here "user "
var myUsers = [user] () var fetchRequest = NSFetchRequest (called EntityName:" user ") Prvinit to = NSPredicate (format:" display =% @ ", true) FetchRequest.predicate = Probably / sort sort? On sortDescriptor = NSSortDescriptor (key: "user id", ascending: true)! Var sortDescriptors = [sortDescriptor] fetchRequest.sortDescriptors = sortDescriptors myUsers = reference .executeFetchRequest (fetchRequest, error: zero) as the [user] used in // your Tableview (CellForRowAtIndexPath) User as myUser = myUsers [indexPath.row] on
Comments
Post a Comment