ios - IB Color Issues -
i noticed when setting uiview background in xcode 6, colors different. setting 1st view hex of #414042 in interface builder. , second view 0x414042
in code following hex rgb macro.
#define rgb(hexvalue) [uicolor colorwithred:((float)((hexvalue & 0xff0000) >> 16))/255.0 green:((float)((hexvalue & 0xff00) >> 8))/255.0 blue:((float)(hexvalue & 0xff))/255.0 alpha:1.0]
and can see there difference.
in ib there gear setting change rgb type, after changing , trying set rgb, resets srgb.
anyone know way around hex colors in code match hex color in ib?
is ios version 10+ ? see apple document, apple changed default color space, if want xib using same color code,on xib ,you need choose device rgb
or srgb
, different generic rgb
Comments
Post a Comment