Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dynamic quick actions example
let firstShortCutIcon = UIApplicationShortcutIcon(templateImageName: "ShortCut01")
let firstFunctionShortCutItem = UIApplicationShortcutItem(type: "com.y8k.touchExample.function01", localizedTitle: "Member Func. 1", localizedSubtitle: "Dynamic short cut item", icon: firstShortCutIcon, userInfo: nil)
let secondShortCutIcon = UIApplicationShortcutIcon(templateImageName: "ShortCut02")
let secondFunctionShortCutItem = UIApplicationShortcutItem(type: "com.y8k.touchExample.function02", localizedTitle: "Member Func. 2", localizedSubtitle: "Dynamic short cut item", icon: secondShortCutIcon, userInfo: nil)
UIApplication.sharedApplication().shortcutItems = [firstFunctionShortCutItem, secondFunctionShortCutItem]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.