Top "Cgcolor" questions

CGColorRef is a type from the CoreGraphics API of Apple (also known as Quartz 2D), a graphics-related API for all OS X application environments.

Extracting rgb from UIColor

Seen this asked before but my example does not seem to work. const CGFloat *toCol = CGColorGetComponents([[UIColor greenColor] CGColor]); The …

iphone core-graphics uicolor cgcolor
how can i obtain a cgcolor from RGB values?

I'm trying to create a custom RGB CGColor using swift to use as a border color for a UIButton. I've …

ios swift rgb uicolor cgcolor
How to access the CGColor property of UIColor in CGContextSetFillColorWithColor?

CGContextSetFillColorWithColor(g, [UIColor greyColor].CGColor); I'm trying to follow O'Reilly's book, iPhone Game Development, but on page 73 Chapter 3 I get …

iphone objective-c uicolor cgcolor
iOS - Setting UIButton background color only colors the corners

I'm trying to customize my button by changing their colors, but when I use either: self.loginButton.layer.backgroundColor = [UIColor …

ios uibutton uicolor cgcolor
How to convert colors from one color space to another?

Is there a Cocoa Touch way to convert colors from one color space to another? At the end of this …

iphone core-graphics uicolor cgcolor cgcolorspace
UIImageView Border Color

I have the following code: UIColor *borderColor = [UIColor colorWithRed:182 green:10 blue:96 alpha:1.0]; [viewImage.layer setBorderColor:borderColor.CGColor]; [viewImage.layer setBorderWidth:3.0]; […

iphone objective-c ios xcode cgcolor
How to get color components of a CGColor correctly

I have a UILabel with black color; i am writing the following code to get black color's components. UIColor *aColor = […

iphone quartz-graphics cgcolor cgcolorspace
Odd Conversion between UIColor and CGColor

So here are the colors I am trying to convert from UIColor to CGColor: 001385 - R:0 G:19 B:133 ca000b …

ios objective-c uicolor cgcolor
Swift how can we convert lightBluecolor.CGColor to corresponding UIColor

I am using a CGColor lightbluecolor and now I want to use the exact color as background of a uiButton. …

swift background uibutton uicolor cgcolor
What does CGColorGetComponents() return?

CGFloat* colors = CGColorGetComponents(hsbaColor.CGColor); Does this return a float, or an array of floats? It looks like the asterisk …

iphone cocoa-touch core-graphics uicolor cgcolor