Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGFloat BGLocations[2] = { 0.0, 1.0 };
- CGFloat BgComponents[8] = { 1.0, 1.0, 1.0 , 1.0, // Start color
- 0.9, 0.9, 0.9 , 1.0 }; // Mid color and End color
- CGColorSpaceRef BgRGBColorspace = CGColorSpaceCreateDeviceRGB();
- CGGradientRef bgRadialGradient = CGGradientCreateWithColorComponents(BgRGBColorspace, BgComponents, BGLocations, 2);
- //[UIColor colorWithRed:110/255.0 green:12/255.0 blue:15/255.0 alpha:1.0];
- CGPoint startBg = CGPointMake(_gridWidth/2,_gridHeight/2);
- CGFloat endRadius=MAX(_gridWidth/2, _gridHeight/2);
- CGContextDrawRadialGradient(ctx, bgRadialGradient, startBg, 0, startBg, endRadius, kCGGradientDrawsAfterEndLocation);
- CGColorSpaceRelease(BgRGBColorspace);
- CGGradientRelease(bgRadialGradient);
Add Comment
Please, Sign In to add comment