uiapplicationshortcutitem

Use SF Symbols system image for static UIApplicationShortcutItem

早过忘川 提交于 2020-08-02 06:14:26
问题 When specifying home screen quick actions, UIApplicationShortcutItems , in your Info.plist, is there a way to use a system image from SF Symbols? The docs noting the available iOS keys doesn't specify a key to do this, besides specifying one of the predefined enum cases from UIApplicationShortcutItemIconType such as UIApplicationShortcutIconTypeSearch . It is possible to use a system image when creating dynamic quick actions via a new initializer UIApplicationShortcutIcon.init(systemImageName

UIImage from UIApplicationShortcutIcon

笑着哭i 提交于 2019-12-22 04:54:08
问题 There are some great "Quick Action Icons" available at https://developer.apple.com/ios/human-interface-guidelines/graphics/system-icons/. Is it possible to make a UIImage from one of these UIApplicationShortcutIcon s to use on, say, a UIButton . For example, the mail icon: let mailIcon = UIApplicationShortcutIcon(type: .mail) let mailImage = UIImage( ... ) Any help would be appreciated. Thanks. 回答1: You cannot use Quick Action Icons as an normal image or cannot set in a button image. These

Share App application shortcut [UIApplicationShortcutIconTypeShare]

爷,独闯天下 提交于 2019-12-19 05:22:25
问题 I've seen a lot of apps use the UIApplicationShortcutIconTypeShare application shortcut to share their app right from the home screen. It launches a UIActivityViewController right from the home screen without opening the app. How do you do that? 回答1: The OS adds the sharing menu item automatically to all apps downloaded from the App Store. Note that it doesn't add it to apps installed via Xcode or any third party distribution systems such as Buddybuild. (Edit: the TestFlight version of your

Update UIApplicationShortcutItem from extension

送分小仙女□ 提交于 2019-12-11 00:15:12
问题 I am building a Today Extension to an app, and it works great to modify my application data. But now my dynamic UIApplicationShortcutItems are out of sync. I can't access UIApplication.shared from my extension. Is there a way to ask the app to update UIApplication.shared.shortcutItems without bringing it to the foreground? 回答1: I have found that MMWormhole is a good solution to this problem. It acts somewhat like an NSNotificationCenter notification between the app extension and its host

UIImage from UIApplicationShortcutIcon

时光总嘲笑我的痴心妄想 提交于 2019-12-05 05:42:50
There are some great "Quick Action Icons" available at https://developer.apple.com/ios/human-interface-guidelines/graphics/system-icons/ . Is it possible to make a UIImage from one of these UIApplicationShortcutIcon s to use on, say, a UIButton . For example, the mail icon: let mailIcon = UIApplicationShortcutIcon(type: .mail) let mailImage = UIImage( ... ) Any help would be appreciated. Thanks. VRAwesome You cannot use Quick Action Icons as an normal image or cannot set in a button image. These are only for 3D touch shortcuts. When you press on application icon and it display shortcut menu

Share App application shortcut [UIApplicationShortcutIconTypeShare]

我只是一个虾纸丫 提交于 2019-12-01 03:06:31
I've seen a lot of apps use the UIApplicationShortcutIconTypeShare application shortcut to share their app right from the home screen. It launches a UIActivityViewController right from the home screen without opening the app. How do you do that? The OS adds the sharing menu item automatically to all apps downloaded from the App Store. Note that it doesn't add it to apps installed via Xcode or any third party distribution systems such as Buddybuild. (Edit: the TestFlight version of your app will have "Send Beta Feedback" menu item instead of "Share...") To address your question directly though,