从网络端获得的image是透明的,同时得到了一个#35b665(16进制)的值,怎么给image赋上这个值
- (UIColor*) colorWithHex:(NSString *)hexValue alpha:(CGFloat)alphaValue { unsigned int red,green,blue; NSRange range; range.length = 2; range.location = 0; [[NSScanner scannerWithString:[hexValue substringWithRange:range]] scanHexInt:&red]; range.location = 2; [[NSScanner scannerWithString:[hexValue substringWithRange:range]] scanHexInt:&green]; range.location = 4; [[NSScanner scannerWithString:[hexValue substringWithRange:range]] scanHexInt:&blue]; return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green / 255.0f) blue:(float)(blue / 255.0f) alpha:alphaValue]; }