ios - Populate TableView from Parse -
i'm trying populate tableview list of strings stored in parse.com. did 3 steps not returning anything, not same normal array? thanks!
- (void)viewdidload { [super viewdidload]; [self pfquerynotes]; } //pfquery notes - (void)pfquerynotes { // using pfquery pfquery *notesquery = [pfquery querywithclassname:@"notes"]; self.notesarray = [notesquery findobjects]; } //returns number of cells display in tableview - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { return [self.notesarray count]; } //fills cells array values - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[uitableviewcell alloc]initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier]; } cell.textlabel.text = [self.notesarray objectatindex:indexpath.row]; cell.accessorytype = uitableviewcellaccessorydisclosureindicator; return cell; }
Comments
Post a Comment