2
我有一个UIImageView作为我的UITableViewCell子类的背景。我在“图像”字段中放置了一个图像,在“突出显示”字段中放置了一个较轻的版本。在我的UITableViewCell子类,我添加代码来设置的ImageView来强调,但没有任何变化......更改UIImageView从正常突出显示不起作用
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
self.backgroundImageView.highlighted = selected;
NSLog(@"selected: %d", selected);
}
我验证过self.backgroundImageView是否正确连接为一个IBOutlet。