Skip to content

Instantly share code, notes, and snippets.

View brunoguerios's full-sized avatar

Bruno brunoguerios

View GitHub Profile
@brunoguerios
brunoguerios / KeyboardController.swift
Last active February 16, 2017 17:30
KeyboardController handles the most common case of UI update required when the keyboard is presented on iOS, which is updating the bottom constraint to match the top of the keyboard frame. Simply create an instance of the KeyboardController in your view controller by providing the view controller itself and it's view bottom constraint as input.
//
// KeyboardController.swift
//
// Created by Bruno Guerios on 2017-02-13.
//
import Foundation
import UIKit
class KeyboardController: NSObject {
@brunoguerios
brunoguerios / KeyboardController.swift
Created February 14, 2017 17:01
KeyboardController handles the most common case of UI update required when the keyboard is presented on iOS. It updates the view's bottom constraint to match the top of the keyboard frame.
//
// KeyboardController.swift
//
// Created by Bruno Guerios on 2017-02-13.
//
import Foundation
import UIKit
class KeyboardController: NSObject {