Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4WorkSpace.m
Created March 18, 2013 13:32
Rendering thousands of layers into a cgcontext on a background thread...
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
UIView *v;
@C4Code
C4Code / C4WorkSpace.m
Created November 4, 2013 18:55
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.
//
// C4WorkSpace.m
// C4Code
//
// Created by Travis Kirton on 11/4/2013.
//
#import "MyWorkSpace.h"
@interface C4WorkSpace ()
@C4Code
C4Code / C4Defines.h
Last active December 27, 2015 09:49
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.
//
// 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 November 4, 2013 17:55
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.
//
// 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 November 4, 2013 17:36
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.
//
// 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 June 13, 2013 01:35
Image Scale add Points
//
// 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 June 12, 2013 17:53
embedding objects in another object and rotating them.
//
// 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 June 5, 2013 19:30
H E L L O, my name is...
//
// 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 19:30
Connecting a Slider, a Stepper and a Label.
#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 08:04
Possible Day 1 Code
//
// C4WorkSpace.m
// Possible Day 1 for ITP
//
// Created by Travis Kirton on 12-07-23.
//
#import "C4WorkSpace.h"