Skip to content

Instantly share code, notes, and snippets.

View alexkent's full-sized avatar

alex kent alexkent

  • Bontouch
  • Östersund
View GitHub Profile
//
// UIView+RSKeyboardLayoutGuide.swift
// RSTouchUIKit
//
// Created by Daniel Jalkut on 12/23/18.
//
import UIKit
// Extends UIView to expose a keyboardLayoutGuide property that can be used to tie a view controller's content
@westerlund
westerlund / RubberBand.md
Created May 25, 2017 14:25 — forked from originell/RubberBand.md
This is a straight copy of – to avoid this ever going dark http://squareb.wordpress.com/2013/01/06/31/

Analysis of Apple’s rubber band scrolling

January 6, 2013

I recently saw a post on Twitter from @chpwn that described the alogorithm that Apple uses for its “rubber band” or “bungee” scrolling.

b = (1.0 – (1.0 / ((x * c / d) + 1.0))) * d
@niklassaers
niklassaers / gist:f18eabb67f3547573064
Created October 13, 2015 05:00
Make TODO and FIXME into Warnings
TAGS="TODO:|FIXME:|\/\/TODO"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
@steventroughtonsmith
steventroughtonsmith / NanoCompanion.m
Last active September 19, 2015 17:00
Load the Apple Watch Companion Settings Bundles into an app
//
// AppDelegate.m
// NanoCompanion
//
// Created by Steven Troughton-Smith on 13/01/2015.
// Copyright (c) 2015 High Caffeine Content. All rights reserved.
//
#import "AppDelegate.h"
/**
Provides the ability to verify key paths at compile time.
If "keyPath" does not exist, a compile-time error will be generated.
Example:
// Verifies "isFinished" exists on "operation".
NSString *key = SQKeyPath(operation, isFinished);
// Verifies "isFinished" exists on self.
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)