Skip to content

Instantly share code, notes, and snippets.

View liamnichols's full-sized avatar
💭
I may be slow to respond.

Liam Nichols liamnichols

💭
I may be slow to respond.
View GitHub Profile
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@jrturton
jrturton / Get keyboard frame in local coordinates after receiving notification
Last active September 28, 2016 12:36
Getting the keyboard's frame in local coordinates
CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
keyboardFrame = [self.view.window convertRect:keyboardFrame fromWindow:nil];
keyboardFrame = [self.view convertRect:keyboardFrame fromView:nil];