/生成采样对照颜色(黑色)
UIColor* sampleColor = [UIColor colorWithRed:(0/255.0f) green:(0/255.0f) blue:(0/255.0f) alpha:(255/255.0f)];
//比较 if (CGColorEqualToColor(detectedColor.CGColor, sampleColor.CGColor))
{
//处理
}
2022-09-23 17:36:25
/生成采样对照颜色(黑色)
UIColor* sampleColor = [UIColor colorWithRed:(0/255.0f) green:(0/255.0f) blue:(0/255.0f) alpha:(255/255.0f)];
//比较 if (CGColorEqualToColor(detectedColor.CGColor, sampleColor.CGColor))
{
//处理
}