Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableViewCell Won't Highlight

For some reason, none of my UITableViewCells are highlighting blue. In IB, I have it set to highlight blue, and I have no code that is overriding IB.

Do you notice anything that might be causing this?

enter image description here

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    int showID = [[[singleton.programs objectAtIndex:indexPath.row]objectForKey:@"id"]intValue];
    //creates the url and loads the list of products
    //NSLog(@"showID: %d", showID);
    URLCreator * productsURL = [[URLCreator alloc] initStandard:@"getProgramProductsForList"];
    [productsURL addParam:@"id" stringValue:[NSString stringWithFormat:@"%d", showID]];
    WebManager *productsWM = [[WebManager alloc]init];
    [productsWM load:[productsURL finalURL] withSelector:@selector(parseProducts) object:[NSNumber numberWithInt:showID]];
}

My custom cell has nothing in it at the moment besides the `@property/@synthesize@, but here it is.

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
like image 801
Baub Avatar asked Dec 27 '22 05:12

Baub


1 Answers

Your case is simple enough that the best way to solve it is probably making an minimal example which works properly (default table view cell with blue selection) and add to it step by step (or in binary search steps) until it breaks.

If the minimal code breaks after some addition then you pinpointed the problem. If it doesn't, and you have actually reached the same thing that you appear to be using in your project, compare and see where the difference is which you haven't noticed.

like image 198
Danra Avatar answered Dec 29 '22 18:12

Danra