¡@

Home 

2014/10/15 ¤U¤È 10:15:16

iphone Programming Glossary: uicolorfromrgb

Is Macro Better Than UIColor for Setting RGB Color?

http://stackoverflow.com/questions/1243201/is-macro-better-than-uicolor-for-setting-rgb-color

Macro Better Than UIColor for Setting RGB Color I have this macro in my header file #define UIColorFromRGB rgbValue UIColor colorWithRed float rgbValue & 0xFF0000 16 255.0 green float rgbValue & 0xFF00 8 255.0 blue float rgbValue.. blue float rgbValue & 0xFF 255.0 alpha 1.0 And I am using this as something like this in my .m file cell.textColor UIColorFromRGB 0x663333 So I want to ask everyone is this better or should I use this approach cell.textColor UIColor colorWithRed 66 255.0.. You could define either a regular C or objective C function to do what your macro is doing now As a C function UIColor UIColorFromRGB NSInteger rgbValue return UIColor colorWithRed float rgbValue & 0xFF0000 16 255.0 green float rgbValue & 0xFF00 8 255.0..

How can I create a UIColor from a hex string?

http://stackoverflow.com/questions/1560081/how-can-i-create-a-uicolor-from-a-hex-string

way to do this is with a macro. Just include it in your header and it's available throughout your project. #define UIColorFromRGB rgbValue UIColor colorWithRed float rgbValue 0xFF0000 16 255.0 green float rgbValue 0xFF00 8 255.0 blue float rgbValue 0xFF..

MKOverlay not resizing smoothly

http://stackoverflow.com/questions/4876035/mkoverlay-not-resizing-smoothly

alloc initWithCircle overlay autorelease if circle.title isEqualToString @ background circleView.fillColor UIColorFromRGB 0x598DD3 circleView.alpha 0.25 else circleView.strokeColor UIColorFromRGB 0x5C8AC7 circleView.lineWidth 2.0 return circleView.. @ background circleView.fillColor UIColorFromRGB 0x598DD3 circleView.alpha 0.25 else circleView.strokeColor UIColorFromRGB 0x5C8AC7 circleView.lineWidth 2.0 return circleView Does anybody have any suggestions on how I can smoothen this Best regards..

CALayer with rotation animation

http://stackoverflow.com/questions/6690780/calayer-with-rotation-animation

animation I have masked an image like this UIView maskImage maskImage UIView alloc init maskImage.backgroundColor UIColorFromRGB FTRMaskColor maskImage.frame newFrame CALayer theLayer CALayer layer theLayer.contents id UIImage imageNamed @ image.png..