ios - How to populate this nsdictionary data onto the uitableview -


how populate nsdictionary data onto uitableview want

- (uitableviewcell *)tableview:(uitableview *)tableview      cellforrowatindexpath:(nsindexpath *)indexpath   

methods getting data out dict

2015-07-11 13:19:50.972 demo[1226:23659] { posts =     (             {         post =             {             id = 1;             "school_id" = 1;             subject = math;         };     },             {         post =             {             id = 2;             "school_id" = 1;             subject = science;         };     },             {         post =             {             id = 3;             "school_id" = 1;             subject = english;         };     },             {         post =             {             id = 5;             "school_id" = 1;             subject = hindi;         };     },             {         post =             {             id = 29;             "school_id" = 1;             subject = biology;         };     } ); } 

try way data dictionary

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {    // if use custom cell use way code     friendselectioncell *cell = [tableview dequeuereusablecellwithidentifier:@"friendselectioncell"];     // value dictionary      cell.yourlabel.text=[[[[self.dict objectforkey:@"posts"] objectatindex:indexpath.row] objectforkey:@"post"] objectforkey:@"id"];     return cell; } 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -