using parse.com v1.4 (installed cocoa pods) swift 2 +
i've setup pfquerytableviewcontroller (parseui) custom cell. believe hooked fine, can't cell display value parse.com though receive , can print (i've debugged it).
i dequeueing this:
override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath, object: pfobject?) -> pftableviewcell { let cellidentifier = "cell" let cell = tableview.dequeuereusablecellwithidentifier(cellidentifier, forindexpath: indexpath) as! ordertableviewcell // extract values pfobject display in table cell if let pfobject = object { // prints expected value, e.g. 1, 2, 3 print(pfobject["table"]) // shows "label" label's default text on sb!! let table = pfobject["table"] as? string cell.lbltable.text = table } return cell }
the rest of pfquerytableviewcontroller seems load data ok parse:
my custom cell ordertableviewcell (with label ibactions):
sb set-up:
and result:
how can label display actual text? missing? don't want revert standard uitableview due additional features parse ui.
turns out simple changing
let table = pfobject["table"] as? string
to
let table = string(pfobject["table"])
Comments
Post a Comment