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
defaultBoldFontName | |
defaultDimmedTextColor | |
defaultEmphasizedFontName | |
defaultFontName | |
defaultSelectedTextShadowColor@1x | |
defaultSelectedTextShadowColor@2x | |
defaultShadowOffset | |
defaultTextColor | |
defaultTextShadowColor | |
defaultTextShadowColor@2x |
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
// Avoids the keyboard in a UIKit app by leveraging additionalSafeAreaInsets. | |
// You can put this in the root view controller so the whole app will avoid the keyboard. | |
// Only tested on iOS 13.3. | |
// Made for https://douglashill.co/reading-app/ | |
@objc func updateSafeAreaForKeyboardFromNotification(_ notification: Notification) { | |
guard let endFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { | |
return | |
} | |
// Please consider whether the force unwrap here is safe for your own use case. |