Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4Shape+touchSetAccess.h
Created May 13, 2012 03:34
using a category on C4Shape to access the touches of a shape via the notification center
//
// C4Shape+touchSetAccess.h
// accessTouches
//
// Created by Travis Kirton on 12-05-12.
// Copyright (c) 2012 POSTFL. All rights reserved.
//
#import "C4Shape.h"
@C4Code
C4Code / C4WorkSpace.m
Created May 12, 2012 16:43
how to rotate shapes using the shape.transform property (uses CGAffineTransform)
//
// C4WorkSpace.m
// rotate
//
// Created by Travis Kirton on 12-04-04.
// Copyright (c) 2012 POSTFL. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created May 12, 2012 16:39
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"
@C4Code
C4Code / C4WorkSpace.m
Created May 12, 2012 16:37
daisy chaining animations with timers
//
// C4WorkSpace.m
// daisyChaining
//
// Created by Travis Kirton on 12-04-04.
// Copyright (c) 2012 POSTFL. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created May 12, 2012 16:33
how to structure the init method of a custom shape class
//
// C4WorkSpace.m
// customShapeInit
//
// Created by Travis Kirton on 12-04-30.
// Copyright (c) 2012 POSTFL. All rights reserved.
//
#import "C4WorkSpace.h"
#import "MyShape.h"
@C4Code
C4Code / C4WorkSpace.m
Created May 12, 2012 16:26
how to make a C4Image animate to black and white
#import "C4WorkSpace.h"
C4Image *myImage;
@implementation C4WorkSpace
-(void)setup {
myImage = [C4Image imageNamed:@"C4Sky.png"];
myImage.center = CGPointMake(384, 512);
[self.canvas addImage:myImage];