Instantly share code, notes, and snippets.

View GrabSaveImageUIButton
override func viewDidLoad() {
let fileName = "infoLight.png"
let b = UIButton.buttonWithType(UIButtonType.InfoLight) as! UIButton
let img = b.imageForState(.Normal)
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)
let dir = (paths[0] as! String)+"/"+fileName
UIImagePNGRepresentation(img).writeToFile(dir, atomically: true)
View FirstWorkSpace.m
//
// FirstWorkSpace.m
// tabbed
//
// Created by moi on 12-10-15.
// Copyright (c) 2012 moi. All rights reserved.
//
#import "FirstWorkSpace.h"
View C4IsometricLogo.Swift
//
// C4Logo.swift
// C4Swift
//
// Created by travis on 2014-11-24.
// Copyright (c) 2014 C4. All rights reserved.
//
import Foundation
import C4Core
View MenuButton.swift
//
// ViewController.swift
// C4Swift
//
// Created by travis on 2014-10-28.
// Copyright (c) 2014 C4. All rights reserved.
//
import UIKit
import C4UI
View gist:5ba9f368418bd91d3284
class Rule {
var a: IsometricPoint
var b: IsometricPoint
lazy var targets = [[IsometricPoint]]()
init(_ a: IsometricPoint, _ b: IsometricPoint) {
self.a = a
self.b = b
}
View C4WorkSpace.m
//
// C4WorkSpace.m
// C4Code
//
// Created by Travis Kirton on 11/4/2013.
//
#import "MyWorkSpace.h"
@interface C4WorkSpace ()
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>
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]
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]
View C4WorkSpace.m
//
// C4WorkSpace.m
// david
//
// Created by moi on 13-06-12.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"