ios - Multiple methods named 'location' found with mismatched result, parameter type, or attributes -
i have read other questions concerning multiple methods still not know how fix code. grateful this. have put * around statement error occurs.
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath: (nsindexpath *)indexpath { static nsstring *cellidentifier = @"eventcell"; eqcalendarcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[eqcalendarcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier]; } cell.titlelabel.text = [[self.eventslist objectatindex:indexpath.row] title];
cell.locationlabel.text = [[self.eventslist objectatindex:indexpath.row] location];
nsdateformatter *df = [[nsdateformatter alloc] init]; [df setdateformat: @"dd-mm-yy hh:mm"]; nsstring *startdatestring = [df stringfromdate:[[self.eventslist objectatindex:indexpath.row] startdate]]; cell.startdatelabel.text = startdatestring; nsstring *enddatestring = [df stringfromdate:[[self.eventslist objectatindex:indexpath.row] enddate]]; cell.enddatelabel.text = enddatestring; return cell; }
thanking in advance help.
casting result of retrieving object self.eventslist
collection should solve problem. e.g.:
cell.locationlabel.text = [((myclassname *)[self.eventslist objectatindex:indexpath.row]) location];
replacing myclassname
name of class in collection.
Comments
Post a Comment