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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -