Is there a way to use if 'contains' instead of isEqual?
This question already has an answer here:
希望这对你有所帮助
if ([cell.lblStatus.text rangeOfString:@"Full"].location != NSNotFound) {
NSLog(@"Contain");
cell.lblStatus.backgroundColor = [UIColor redColor];
} else {
NSLog(@"No Contain");
cell.lblStatus.backgroundColor = [UIColor greenColor];
}
链接地址: http://www.djcxy.com/p/73990.html