Friday 15 January 2010

uitableview - Trouble cellForRowAtIndexPath in multi section tableView in parse.com -



uitableview - Trouble cellForRowAtIndexPath in multi section tableView in parse.com -

i having problem using cellforrowatindexpath in tableview parse.com code running is:

override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { allow cell = tableview.dequeuereusablecellwithidentifier("listadoinventariocell", forindexpath: indexpath) uitableviewcell var sectiontitle:string = timelinedata1.objectatindex(indexpath.section) string var sectionanimals:array = porbodega[sectiontitle]! // line problems var animal:string = sectionanimals.objectatindex(indexpath.row) string cell.textlabel?.text = animal }

problem variable porbodega dictionary of type string: arrayofpfobject , sectionanimals array of pfobjects. if println(porbodega), this:

[oficina: [ <inventarioobjetos:wobhxq98oz:(null)> { bodega = oficina; categoria = "equipo de monta\u00f1a"; descripcion = chalecos; fechadeentrada = "2012-04-01 19:44:00 +0000"; marca = "o'rageous"; modelo = "vm-001"; numerodeinventario = csov002; numerodeserie = na; status = usado; tamano = m; }, <inventarioobjetos:u3yn80lxu8:(null)> { bodega = oficina; categoria = "equipo de monta\u00f1a"; descripcion = chalecos; fechadeentrada = "2012-04-01 19:44:00 +0000"; marca = "o'rageous"; modelo = "vm-001"; numerodeinventario = csov003; numerodeserie = na; status = usado; tamano = m; } ]]

so not know how specific info form 1 of objects, variable modelo , set in cell text label. ideas??

edit:

override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { allow cell = tableview.dequeuereusablecellwithidentifier("listadoinventariocell", forindexpath: indexpath) uitableviewcell var sectiontitle:string = timelinedata1.objectatindex(indexpath.section) string var sectionanimals:array = porbodega[sectiontitle]! allow animal:pfobject = sectionanimals[indexpath.row] pfobject cell.textlabel?.text = animal.objectforkey("modelo") string }

uitableview swift parse.com

No comments:

Post a Comment