iOS NSString 转HEX(c)

#define HEXCOLOR(c)                         [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0];

baseView.backgroundColor = HEXCOLOR(strtoul([@"0xf74545" UTF8String],0,16));


你可能感兴趣的:(iOS NSString 转HEX(c))