Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. @UIApplicationMain
  2. class AppDelegate: UIResponder, UIApplicationDelegate {
  3. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
  4. // Moved window creation to the SceneDelegate below
  5. return true
  6. }
  7. // Added this method:
  8. // Here we tell iOS what scene configuration to use
  9. func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
  10. connectingSceneSession.userInfo?["activity"] = options.userActivities.first?.activityType
  11. // Based on the name of the configuration iOS will initialize the correct SceneDelegate
  12. return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement