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 UIKit | |
typealias KeyboardHeightDuration = (height: CGFloat, duration: Double) | |
// New notification type | |
let RemoveKeyboardNotifications = "RemoveKeyboardNotifications" | |
protocol KeyboardAvoidable: class { | |
var layoutConstraintsForKeyboard: [NSLayoutConstraint] { get } | |
func addKeyboardObservers() |
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
@IBDesignable class PLToggleControl: UIControl { | |
var items = [String]() | |
var labels = [UILabel]() | |
var activeLineView = UIView() | |
@IBInsepctable var activeTextColor: UIColor = .whiteColor() | |
@IBInspectable var inactiveTextColor: UIColor = .grayColor() | |
@IBInspectable var buttonColor: UIColor = .blackColor() | |
@IBInspectable var activeLineColor: UIColor = .blackColor() |
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
// KeyboardAvoidable | |
// Roy McKenzie | |
protocol KeyboardAvoidable: class { | |
func addKeyboardObservers(customBlock: ((CGFloat) -> Void)?) | |
func removeKeyboardObservers() | |
var layoutConstraintsToAdjust: [NSLayoutConstraint] { get } | |
} | |
var KeyboardShowObserverObjectKey: UInt8 = 1 |
NewerOlder