Created
November 27, 2023 21:11
-
-
Save hasanalisiseci/de101a8405d9cd50e36ad9c9e7e88a3f to your computer and use it in GitHub Desktop.
This file contains 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 QuickActionsManager: ObservableObject { | |
static let instance = QuickActionsManager() | |
@Published var quickAction: QuickAction? = nil | |
func handleQaItem(_ item: UIApplicationShortcutItem) { | |
print(item) | |
if item.type == "SearchAction" { | |
quickAction = .search | |
} else if item.type == "Home" { | |
quickAction = .home | |
} | |
} | |
} | |
enum QuickAction: Hashable { | |
case search | |
case home | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment