in tableviewcontroller have line of code
override func tableview(tableview: uitableview,cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { in block try list of objects
let list = frc.objectatindexpath(indexpath) as! list but warning:
use of undeclared type "list" anybody knows how deal it?
this full code:
var frc: nsfetchedresultscontroller = nsfetchedresultscontroller() override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("cell", forindexpath: indexpath) as! uitableviewcell // configure cell... let list = frc.objectatindexpath(indexpath) as! list cell.textlabel?.text = list.name cell.detailtextlabel?.text = list.url return cell } any welcome!!
greetings , thanks
in tutorial, jason creates entity called "list" in data model file , creates class called list.
the following link starts video after creates file. https://youtu.be/gem7zw12wbm?t=5m30s
may have named entity differently.
i named mine record, since i'm storing records.
code following:
var frc: nsfetchedresultscontroller = nsfetchedresultscontroller() override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier("cell", forindexpath: indexpath) as! uitableviewcell // configure cell... // occurrences of "list" instead "record" // occurrences of "list" instead "record" let record = frc.objectatindexpath(indexpath) as! record cell.textlabel?.text = record.name cell.detailtextlabel?.text = record.url return cell }
Comments
Post a Comment