Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created May 12, 2012
Embed
What would you like to do?
How to make a C4 object glow, using shadows
//
// C4WorkSpace.m
// glow
//
// Created by Travis Kirton on 12-04-04.
// Copyright (c) 2012 POSTFL. All rights reserved.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace
-(void)setup {
C4Shape *bg = [C4Shape rect:self.canvas.frame];
bg.lineWidth = 0.0f;
bg.fillColor = [UIColor blackColor];
[self.canvas addShape:bg];
C4Shape *ellipse = [C4Shape ellipse:CGRectMake(284, 412, 200, 200)];
ellipse.lineWidth = 0.0f;
ellipse.shadowOffset = CGSizeZero;
ellipse.shadowColor = [UIColor yellowColor];
ellipse.shadowOpacity = 0.8;
ellipse.shadowRadius = 55.0f;
[self.canvas addShape:ellipse];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment