ios - NSCFConstantString objectAtIndex: error in grouped table -
ios - NSCFConstantString objectAtIndex: error in grouped table -
i have dictionary looks (settings page):
logout = logout; social = ( facebook, twitter ); terms = ( "privacy policy", "terms of service" ); then right ordered array:
`social, terms, logout` right have 3 sections. cellforrowatindexpath i'm trying this:
cell.textlabel.text = [[_settingsoptions objectforkey: [_arraykeys objectatindex:indexpath.section]] objectatindex:indexpath.row]; and i'm getting nscfconstantstring error. when manually set in numbers indexes, displays fine. datasource method error. can find error?
example code reply (which isn't) formatting:
nsstring *s1 = [_arraykeys objectatindex:indexpath.section]; nsarray *s2 = [_settingsoptions objectforkey:s1]; nsstring *text = [s2 objectatindex:indexpath.row]; cell.textlabel.text = text; the real code have actual types (i guessed) , descriptive names instead s1 s2, text. giving intermediates types , descriptive names might create error clear.
now each step can independently debugged , if desired nslog'ed.
ios objective-c uitableview nsdictionary
Comments
Post a Comment