خرید بک لینک

Vote count: 0

I would like to set the text color of a selected table view cell when the delegate has passed the information back to the Parent View Controller.

Here is what I have:

-(void)reSelectTableRow:(NSUInteger)index{
    if(index < albumTracksArrayForTVC.count){
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:index inSection:0];
        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:
         UITableViewScrollPositionNone];
        UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
        cell.textLabel.highlightedTextColor = [UIColor greenColor];
        cell.textLabel.textColor = [UIColor redColor];
    }
    NSLog(@"Delegate reSelectTableRow was called");
    [self.tableView reloadData];
}

However, neither of my attempts (cell.textLabel.highlightedTextColor = [UIColor greenColor]; or cell.textLabel.textColor = [UIColor redColor];) seem to work.

Any ideas?

asked 1 min ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: شنبه 26 تير 1395 ساعت: 5:27

صفحه بندی