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
| struct MyUserDefaults { | |
| // UserDefault value to check if user is logged in | |
| static var isUserLoggedIn: Bool { | |
| get { | |
| return UserDefaults.standard.bool(forKey: MyUserDefaults.Keys.isUserLoggedIn) | |
| } | |
| set { | |
| UserDefaults.standard.set(newValue, forKey: MyUserDefaults.Keys.isUserLoggedIn) | |
| } | |
| } |
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
| // Do not forget to add this to your Info.plist file | |
| // <key>UIViewControllerBasedStatusBarAppearance</key> | |
| // <true/> | |
| // Without UINavigationController | |
| // Use this if you use ViewController as root without a UINavigationController | |
| class ViewController: UIViewController { | |
| override var prefersStatusBarHidden: Bool { |