You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
966 B
26 lines
966 B
//
|
|
// Delegates.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 22/02/2024.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class AppDelegate: NSObject, UIApplicationDelegate {
|
|
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
|
if let selectedAction = options.shortcutItem {
|
|
QuickAction.selectedAction = selectedAction
|
|
}
|
|
let sceneConfiguration = UISceneConfiguration(name: "Quick Action Scene", sessionRole: connectingSceneSession.role)
|
|
sceneConfiguration.delegateClass = QuickActionSceneDelegate.self
|
|
return sceneConfiguration
|
|
}
|
|
}
|
|
|
|
class QuickActionSceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
func windowScene(_ windowScene: UIWindowScene, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
|
|
QuickAction.selectedAction = shortcutItem
|
|
}
|
|
}
|