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
public enum PathElement { | |
case MoveToPoint(CGPoint) | |
case AddLineToPoint(CGPoint) | |
case AddQuadCurveToPoint(CGPoint, CGPoint) | |
case AddCurveToPoint(CGPoint, CGPoint, CGPoint) | |
case CloseSubpath | |
init(element: CGPathElement) { | |
switch element.type { | |
case .MoveToPoint: |
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 UIKit | |
import Foundation | |
import AudioToolbox | |
import AVFoundation | |
import XCPlayground | |
func CheckError(error:OSStatus) { | |
if error == 0 {return} |
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 PHImageRequestOptions { | |
convenience init(deliveryMode: PHImageRequestOptionsDeliveryMode, resizeMode: PHImageRequestOptionsResizeMode){ | |
self.init() | |
self.deliveryMode = deliveryMode | |
self.resizeMode = resizeMode | |
} |
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
// | |
// Swift-KVO | |
// | |
// Created by Jim Correia on 6/5/14. | |
// Copyright (c) 2014-2015 Jim Correia. All rights reserved. | |
// | |
// Update: 6/17/2014 | |
// | |
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context | |
// |
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 | |
// ============================================ | |
// MARK: - KVObserver Helper | |
// Modified from Source : https://stackoverflow.com/questions/27292918 | |
class KVObserver: NSObject { | |
private let keyPath: String | |
private let block: () -> Void | |
private weak var object: AnyObject? |
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
// | |
// RBResizer.swift | |
// Locker | |
// | |
// Created by Hampton Catlin on 6/20/14. | |
// Copyright (c) 2014 rarebit. All rights reserved. | |
// Updated by Justin Winter on 11/29/15. | |
// | |
extension UIImage { |
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
In order to $Value$ | |
As a $Role$ | |
I need to $Description$ | |
$END$ |
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
# {A} - the benefit or value of the feature | |
# - In order to achieve -> Business Value | |
# {B} - the role (or person) who will benefit | |
# - as a person who benefits; The "author" of this feature | |
# {C} - short feature description: | |
# - Description of the feature, the action the person will take | |
$END$ |
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
Scenario: $Title$ | |
Given $given$ | |
When $when$ | |
And $and$ | |
Then $then$ |
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
# Given: Defines the inital state of the system for the scenario | |
# When: Describes the action taken by the person/role | |
# Then: Describes the obeservable system state after the action has been performed | |
$END$ |
OlderNewer