Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Critchley fareast555

View GitHub Profile
@mayoff
mayoff / Arrow.swift
Last active Sep 28, 2020
UIBezierPath category to create an arrow (now with a Swift version!)
View Arrow.swift
// Swift 2.2 syntax / API
import UIKit
extension UIBezierPath {
class func arrow(from start: CGPoint, to end: CGPoint, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat) -> Self {
let length = hypot(end.x - start.x, end.y - start.y)
let tailLength = length - headLength
@terhechte
terhechte / slow_kvo_dictionary_example1.m
Created Dec 7, 2011
Example 1 of slow and fast NSDictionary access
View slow_kvo_dictionary_example1.m
//
// slow_kvo_dictionary_example.m
//
// Created by Benedikt Terhechte on 07.12.11.
// appventure.me
//
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])