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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -