ios - Why I cannot put a nsarray in uitableview cell -
i have error:
[__nsarrayi length]: unrecognized selector sent instance 0x8d06040
when try , set nsarray cell using code:
cell.textlabel.text=[message objectatindex:indexpath.row];
here code starts nsdictionary:
nsdictionary *jsondict = [nsjsonserialization jsonobjectwithdata:loginresponse options:0 error:&error]; nslog(@"responsedataafternsdict: %@", jsondict); //------------------------------------------ keys = [jsondict allkeys]; values = [jsondict objectsforkeys:keys notfoundmarker:[nsnull null]]; message = [values valueforkey:@"fromuser"]; nslog(@"%@", message);
this log nslog(@"%@", message);
2014-01-31 12:52:39.899 arialcraft[16694:70b] ( ( ), ( kyleunrau ), ( fixablemass09 ) )
it works nsarray, doing wrong?
i think need 1 more subscript:
cell.textlabel.text = [[message objectatindex:indexpath.row] firstobject];
cell.textlabel.text looking nsstring object, not nsarray object.
Comments
Post a Comment