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
// MARK: - View Resizer when Keyboard Appears | |
extension UIViewController { | |
// This implementation was taken from: https://newfivefour.com/swift-ios-xcode-resizing-on-keyboard.html | |
// to improve the user experience the view updates will happen with the same animation as the keyboard's | |
func setupViewResizerOnKeyboardShown() { | |
NotificationCenter.default.addObserver(self, |
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
enum NetworkFailureCode: Int { | |
case unknown = -1 | |
case cancelled = -999 | |
case badURL = -1000 | |
case timedOut = -1001 | |
case unsupportedURL = -1002 | |
case cannotFindHost = -1003 | |
case cannotConnectToHost = -1004 |
NewerOlder