This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: no rule to process file 'REDACTED/Pods/T1Autograph/libT1Autograph.a' of type archive.ar for architecture x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
var length : Integer { | |
get { | |
return countElements(self) | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// LogoPathFactory.swift | |
// LogoFunhouse_Swift | |
// | |
// Created by Collin Ruffenach on 8/25/14. | |
// Copyright (c) 2014 Simple. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Array { | |
func map<U>(function : (index : Int, object : T) -> U) -> [U] { | |
var result = [U]() | |
for i in 0..<self.count { | |
result.append(function(index: i, object: self[i])) | |
} | |
return result | |
} | |
func reduce<U>(initial : U, combine : (product : U, index : Int, object : T) -> U) -> U { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum AnimationType : Printable { | |
case Linear(duration : NSTimeInterval?) | |
case Spring(damping : CGFloat?, velocity : CGFloat?, duration : NSTimeInterval?) | |
case Gravity(magnitude : CGFloat?) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CGRaw { | |
static func rawRect(#uiKitRect : CGRect) -> CGRect { | |
let scale = UIScreen.mainScreen().scale | |
return CGRect( | |
x: CGRectGetMinX(uiKitRect)*scale, | |
y: CGRectGetMinY(uiKitRect)*scale, | |
width: CGRectGetWidth(uiKitRect)*scale, | |
height: CGRectGetHeight(uiKitRect)*scale | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CRWaitMinimumDurationAndExecute(NSTimeInterval start, NSTimeInterval minimumDuration, void(^block)(void)) { | |
double diff = [NSDate date].timeIntervalSince1970-start; | |
double delayInSeconds = MAX(0.0, minimumDuration-diff); | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
if (block) block(); | |
}); | |
} | |
//Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SingleLinkedListNode <T : Printable> : Printable { | |
var next : LinkedListNode? | |
var data : T | |
init(data : T) { | |
self.data = data | |
} | |
var description : String { | |
get { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import Foundation | |
import UIKit | |
//struct Square { | |
// var x, y, width, height : Float | |
//} | |
// | |
//func overlap(start1 : Float, length1 : Float, start2 : Float, length2 : Float) -> Float { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@class Author; | |
@interface BlogPost : NSObject { | |
NSString *_postName; | |
NSDate *_postDate; | |
Author *_author; | |
} |
OlderNewer