Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4WorkSpace.m
Created October 1, 2012 16:09
How to get yourself an interval of time...
//
// C4WorkSpace.m
// timeInterval
//
// Created by moi on 12-09-30.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created October 1, 2012 16:09
Basic debugging (formatting for C4Log / NSLog)
//
// C4WorkSpace.m
// debugging
//
// Created by moi on 12-10-01.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Last active October 11, 2015 05:48
Simple, arbitrary, random, arc, diagrams.
//
// C4WorkSpace.m
// arcDiagrams
//
// Created by moi on 12-09-30.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created October 1, 2012 16:11
Rotating an object with a PAN gesture
//
// C4WorkSpace.m
// rotatingInteraction
//
// Created by moi on 12-09-30.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created October 1, 2012 21:05
Basic Arrays
//
// C4WorkSpace.m
// arrays
//
// Created by moi on 12-10-01.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created October 1, 2012 21:06
NSNumbers and NSStrings
//
// C4WorkSpace.m
// numbersStrings
//
// Created by moi on 12-10-01.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created December 10, 2012 16:24
3 distinct tap gestures
#import "C4WorkSpace.h"
@implementation C4WorkSpace
-(void)setup {
UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(one)];
UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(two)];
tap2.numberOfTapsRequired = 2;
UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(three)];
tap3.numberOfTapsRequired = 3;
@C4Code
C4Code / C4WorkSpace.m
Created December 10, 2012 18:19
hit testing a shape, adding shapes within another shape
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *t;
}
-(void)setup {
t = [C4Shape arcWithCenter:CGPointMake(180, 180) radius:180 startAngle:0
endAngle:PI clockwise:NO];
[self.canvas addShape:t];
@C4Code
C4Code / C4WorkSpace.m
Created January 20, 2013 23:33
Basic example of how to create a CGPath to use for a visible object's shadowPath property
//
// C4WorkSpace.m
// test
//
// Created by moi on 13-01-20.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created January 20, 2013 23:35
Basic example for how to change a visible object's shadow path
//
// C4WorkSpace.m
//
// Created by Travis Kirton.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *s, *c;