Skip to content

Instantly share code, notes, and snippets.

@hasanalisiseci
Created November 27, 2023 21:11
Show Gist options
  • Save hasanalisiseci/de101a8405d9cd50e36ad9c9e7e88a3f to your computer and use it in GitHub Desktop.
Save hasanalisiseci/de101a8405d9cd50e36ad9c9e7e88a3f to your computer and use it in GitHub Desktop.
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