Created
June 18, 2019 10:20
-
-
Save ashour/5907c486f52d66b0b6ccd27de8f4ff37 to your computer and use it in GitHub Desktop.
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
| import UIKit | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
| OTATranslations.shared.updateTranslations() { | |
| AppDelegate.reloadRootViewController() | |
| } | |
| return true | |
| } | |
| static func reloadRootViewController() { | |
| DispatchQueue.main.async { | |
| let storyboard = UIStoryboard.init(name: "Main", bundle: nil) | |
| let appDelegate = UIApplication.shared.delegate as! AppDelegate | |
| appDelegate.window?.rootViewController = | |
| storyboard.instantiateInitialViewController() | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment