March 2012
Intermediate to advanced
590 pages
22h 48m
English
There are a number of Foundation and UIKit classes that can work with a CGContextRef. One such class is UIColor. An instance of UIColor represents a color and can be used to set the current drawing color of the context. In HypnosisView.m, replace the line of code that changes the stroke color with one that uses UIColor’s colorWithRed:green:blue:alpha: method.
CGContextSetLineWidth(ctx, 10);CGContextSetRGBStrokeColor(ctx, 0.6, 0.6, 0.6, 1.0);[[UIColor colorWithRed:0.6 green:0.6 blue:0.6 alpha:1] setStroke];
Build and run the application again. The HypnosisView will look ...
Read now
Unlock full access