This file contains hidden or 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
public class KeyboardManager { | |
public struct KeyboardChange { | |
public let visibleHeight: CGFloat | |
public let endFrame: CGRect | |
public let animationDuration: TimeInterval | |
public let animationOptions: UIViewAnimationOptions | |
} | |
public typealias KeyboardChangeClosure = (KeyboardChange)->Void |
This file contains hidden or 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
public protocol Serializable { | |
func serialize() -> [String: Any] | |
} | |
extension Serializable { | |
public func serialize() -> [String: Any] { | |
return Self.makeSerialized(serializable: self) | |
} | |
This file contains hidden or 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
// This allows you to implement identifiable on any class/struct and automatially make them Equatable | |
protocol Identifiable: Equatable { | |
var id: Int { get } | |
} | |
func == <T: Identifiable>(lhs: T, rhs: T) -> Bool { | |
return lhs.id == rhs.id | |
} |
OlderNewer