views:

110

answers:

0

Hi,

I have a CATextLayer as a sublayer for a UITableViewCell's contentView's backing layer. I set the foregroundColor of this layer to [[UIColor blackColor] CGColor]. I also have this:

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    [CATransaction begin];
    [CATransaction setDisableActions:YES];
    _textLayer.foregroundColor = selected ? [[UIColor whiteColor] CGColor] : [[UIColor blackColor] CGColor];
    [CATransaction commit];
}

However, this change still animates. Am I missing something?