iphone - how to change colour of text after reading details? -


am doing projects using iphone, list number of events in uitableview(masterview) , display details in viewcontroller(detailview). display text in tableview green colour, after reading details data inside cell should turn red colur. notify read , unread. how it? pls me. here cellforrowindexpath

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     static nsstring *cellidentifier = @"newscell1";     uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier forindexpath:indexpath];     if (cell == nil) {         cell = [[[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier] autorelease];     }         mainnews *msglist = [samplearray objectatindex:indexpath.row];         cell.textlabel.text = msglist.newsletters;         cell.textlabel.textcolor = [uicolor greencolor];         cell.accessorytype = uitableviewcellaccessorydisclosureindicator;         return cell; } 

and here didselectatrowindexpath code:

- (void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender {     if ([segue.identifier isequaltostring:@"newsdetails"]) {         nsindexpath *indexpath = [tblview indexpathforselectedrow];         mainnewsdetailcontroller *destviewcontroller = segue.destinationviewcontroller;         mainnews *aevent1 = [samplearray objectatindex:indexpath.row];         destviewcontroller.eveid = aevent1.id;         destviewcontroller.usrid = memberid;      } } 

so how change colour in tableview after reading details . pls me in advance

i don't know how detect whether user has read text or not... can change color of particular cell below.

nsindexpath *cellindex = [nsindexpath indexpathforrow:3 insection:0]; [[yourtable cellforrowatindexpath:cellindex].textlabel settextcolor:[uicolor greencolor]]; 

hope you.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -