Assigning an existing CGColor to a CGColor property works in iOS Simulator, not iOS device. Why?
Because of ARC the color is released too early in the end of the method. i use: CGColorRetain CGColorRef whiteColor = CGColorRetain([UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0].CGColor);