Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4WorkSpace.m
Created Mar 18, 2013
Rendering thousands of layers into a cgcontext on a background thread...
View C4WorkSpace.m
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
UIView *v;
@C4Code
C4Code / C4WorkSpace.m
Created Nov 4, 2013
Working with Dictionaries. This example shows how to pass a dictionary between two objects (in this case 2 workspaces). In the main workspace we build the dictionary. In the second workspace we read from the dictionary and build a shape with its variables.
View C4WorkSpace.m
//
// C4WorkSpace.m
// C4Code
//
// Created by Travis Kirton on 11/4/2013.
//
#import "MyWorkSpace.h"
@interface C4WorkSpace ()
@C4Code
C4Code / C4Defines.h
Last active Dec 27, 2015
This example builds on the previous, showing how to create a fake Navigation Bar as its own class. This includes a modified C4Defines.h file that contains the predefined variables that we built in the previous example.
View C4Defines.h
//
// C4Defines.h
// C4iOSDevelopment
//
// Created by Travis Kirton on 11-10-12.
// Copyright (c) 2011 mediart. All rights reserved.
//
#import <Foundation/Foundation.h>
@C4Code
C4Code / C4WorkSpace.m
Created Nov 4, 2013
Example of how to build a fake nav bar. This creates and adds a nav bar to the main canvas, it also shows how to create a complex object by adding subviews to the object itself, and not the canvas.
View C4WorkSpace.m
//
// C4WorkSpace.m
// C4Code
//
// Created by Travis Kirton on 11/4/2013.
//
//Defines set in "stone" a value for a variable
//These are best to put in C4Defines.h, but here they suffice for this example
#define UA_NAV_BAR_COLOR [UIColor colorWithRed:0.96875 green:0.96875 blue:0.96875 alpha:1]
@C4Code
C4Code / C4WorkSpace.m
Created Nov 4, 2013
Defining Colors. This example shows how to define colors and use them in 2 different ways. First, it shows that you can use the newly defined variable in your app. Second, it shows how to set a the default style of an object (i.e. here it is a label) so that all other objects of the same time take the same default color when they are initialized.
View C4WorkSpace.m
//
// C4WorkSpace.m
// C4Code
//
// Created by Travis Kirton on 11/4/2013.
//
//Defines set in "stone" a value for a variable
//These are best to put in C4Defines.h, but here they suffice for this example
#define UA_NAV_BAR_COLOR [UIColor colorWithRed:0.96875 green:0.96875 blue:0.96875 alpha:1]
@C4Code
C4Code / C4WorkSpace.m
Created Jun 13, 2013
Image Scale add Points
View C4WorkSpace.m
//
// C4WorkSpace.m
// david
//
// Created by moi on 13-06-12.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created Jun 12, 2013
embedding objects in another object and rotating them.
View C4WorkSpace.m
//
// C4WorkSpace.m
// centered
//
// Created by moi on 13-06-12.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created Jun 5, 2013
H E L L O, my name is...
View C4WorkSpace.m
//
// C4WorkSpace.m
// test
//
// Created by travis on 2013-05-28.
// Copyright (c) 2013 Slant. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created May 20, 2013
Connecting a Slider, a Stepper and a Label.
View C4WorkSpace.m
#import "C4WorkSpace.h"
@implementation C4WorkSpace
-(void)setup {
[self createAddObjects];
//calibrate the min/max values
self.myStepper.minimumValue = 0.0f;
self.myStepper.maximumValue = 10.0f;
@C4Code
C4Code / C4WorkSpace.m
Created May 17, 2013
Possible Day 1 Code
View C4WorkSpace.m
//
// C4WorkSpace.m
// Possible Day 1 for ITP
//
// Created by Travis Kirton on 12-07-23.
//
#import "C4WorkSpace.h"