Last active
January 15, 2016 14:59
-
-
Save qnoid/0187f23be222bef7f109 to your computer and use it in GitHub Desktop.
Workaround to http://www.openradar.me/21404408. See related post at http://stackoverflow.com/questions/34813889/replacing-the-uiwindows-rootviewcontroller-while-using-a-transition-appears-to
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
class FooViewController: UIViewController | |
{ | |
} | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
let fooViewController = FooViewController() | |
let view = self.window!.snapshotViewAfterScreenUpdates(false) | |
let viewController = UIViewController() | |
viewController.view.addSubview(view) | |
self.window!.rootViewController = viewController | |
self.window!.rootViewController?.presentViewController(dashboardViewController!, animated: true){ unowned let window = self.window! | |
window.rootViewController = fooViewController | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment