ios - Changing a Label depending on the return of another cell -


i want cell.cellmatchstatus.text display string depending on value stored inside cell.cellmatchstatusimage

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     static nsstring *cellidentifier = @"liveident";      liveviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier forindexpath:indexpath];      livematchobject *item = [_tabledatalivematch objectatindex:[indexpath row]];      if ([item iskindofclass:[livematchobject class]]) {      cell.cellhometeamname.text = item.homename;     cell.cellawayteamname.text = item.awayname;     cell.cellhometeam.image = item.hometeamlogo;     cell.cellawayteam.image = item.awayteamlogo;     cell.cellhometeamscore.text = item.homegoals;     cell.cellawayteamscore.text = item.awaygoals;     cell.celldate.text = item.matchdate;     cell.cellmatchstatusimage.image = item.matchstatus; // returns 1 of 3 options, postponed, running or finished          if ([cell.cellmatchstatusimage isequal: @"finished"]) { // not working             cell.cellmatchstatus.text = @"is finished";}          else {             cell.cellmatchstatus.text = @"is not finished"; //         } 

any ideas? how fix if statement.

cheers.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -