如果'包含'而不是isEqual,有没有办法使用?
这个问题在这里已经有了答案:
希望这对你有所帮助
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/73989.html
上一篇: Is there a way to use if 'contains' instead of isEqual?
下一篇: IOS: Convert a NSDate object into a string to get the current time