Skip to content

Instantly share code, notes, and snippets.

@C4Code
Created May 12, 2012 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save C4Code/2667516 to your computer and use it in GitHub Desktop.
Save C4Code/2667516 to your computer and use it in GitHub Desktop.
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