mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Create UI in didFinishLaunching.
This commit is contained in:
@@ -20,12 +20,14 @@ var appDelegate: AppDelegate!
|
||||
@UIApplicationMain
|
||||
final class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate, UnreadCountProvider {
|
||||
|
||||
private var window: UIWindow?
|
||||
var window: UIWindow?
|
||||
private var bgTaskDispatchQueue = DispatchQueue.init(label: "BGTaskScheduler")
|
||||
|
||||
private var waitBackgroundUpdateTask = UIBackgroundTaskIdentifier.invalid
|
||||
private var syncBackgroundUpdateTask = UIBackgroundTaskIdentifier.invalid
|
||||
|
||||
private var sceneCoordinator: SceneCoordinator?
|
||||
|
||||
var syncTimer: ArticleStatusSyncTimer?
|
||||
|
||||
var shuttingDown = false {
|
||||
@@ -118,10 +120,18 @@ final class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationC
|
||||
syncTimer!.update()
|
||||
#endif
|
||||
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
|
||||
return true
|
||||
// Create window and UI.
|
||||
let window = UIWindow(frame: UIScreen.main.bounds)
|
||||
self.window = window
|
||||
let storyboard = UIStoryboard(name: "Main", bundle: nil)
|
||||
let rootSplitViewController = storyboard.instantiateInitialViewController() as! RootSplitViewController
|
||||
sceneCoordinator = SceneCoordinator(rootSplitViewController: rootSplitViewController)
|
||||
rootSplitViewController.coordinator = sceneCoordinator
|
||||
|
||||
window.rootViewController = rootSplitViewController
|
||||
window.makeKeyAndVisible()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
||||
|
||||
Reference in New Issue
Block a user