Slide 27
Slide 27 text
struct DeepLinkShortcut {
enum ItemType: String {
case main
case camera
case setting
}
static func register() -> [UIApplicationShortcutItem] {
let mainShortcutItem =
UIApplicationShortcutItem(type: ItemType.main.rawValue, localizedTitle: "ϝΠϯը໘")
let cameraShortcutItem =
UIApplicationShortcutItem(type: ItemType.camera.rawValue, localizedTitle: "Χϝϥը໘")
let settingShortcutItem =
UIApplicationShortcutItem(type: ItemType.setting.rawValue, localizedTitle: "ઃఆը໘")
return [mainShortcutItem, cameraShortcutItem, settingShortcutItem]
}
static func handleShortcut(_ shortcut: UIApplicationShortcutItem) -> ItemType? {
return ItemType(rawValue: shortcut.type)
}
}
RootViewControllerͰը໘ભҠΛ·ͱΊͨ 27