To set the main window in Swift, you need to do the following:
Main.storyboard
file in your Xcode project.Alternatively, you can do this programmatically by setting the window
property of your UIApplication
object to a new window that contains your view controller:
main.swift402 chars10 lines
This creates a new window, sets its root view controller to your desired view controller, and then makes it visible.
gistlibby LogSnag