I have UICOllectionViewCell and I was using setSelectedMethod to determine which background color I have to show. It is working fine in iOS 14 but in iOS 15 it's not working. Here is the code
- (void)setSelected:(BOOL)selected {
if (selected) {
self.layer.borderColor = [UIColor colorWithWhite:1 alpha:0.5].CGColor;
self.layer.borderWidth = 2.0f;
self.textLabel.textColor = [UIColor whiteColor];
self.backgroundColor = kAppDefaultThemeColor;
}
else{
self.layer.borderColor = kAppDefaultThemeColor.CGColor;
self.layer.borderWidth = 2.0f;
self.textLabel.textColor = [UIColor blackColor];
self.backgroundColor = [UIColor colorWithWhite:1 alpha:0.5];
}
}