Original Portal: Add IOS 9 ' s Quick Actions shortcut support in the Minutes right now! Apple introduces 3D touch (pressure touch) function on iOS9, API is divided into three modules: fast start, Peek and Pop, pressure sensitive technology. This new feature is valid by default in IOS9, which means that you can now submit apps that support the technology. Now, I'll quickly and directly dive into the fast-start technology, and if you're lucky, you can finish it in 15 minutes. If you want to get a message from an update, then focus on me, if not further, then we will "dive". Quick Start: Quick Start is the Basic Home screen icon shortcut, it has both static and dynamic modes, IOS9 supports up to four quick start modes in your application, based on this limitation, the system will load your static Quick Start mode in priority. If your static mode is not set, you can also customize the dynamic start mode, the last one or more quick start behavior will be presented static start way defined in the Info.plist dictionary array uiapplicationshortcutitems , you need to provide valid values (value): uiapplicationshortcutitemtype (required) in each dictionary for the key (keys): A unique string flag is required for each Item uiapplicationshortcutitemtitle (required): The name of the item displayed on the UI uiapplicationshortcutitemsubtitle (optional) : The subtitle name of the item displayed on the UI uiapplicationshortcutitemicontype (optional): System icon, all support can be in Here to find uiapplicationshortcutitemiconfile (optional): The custom picture name in the assets directory, if provided, uiapplicationshortcutitemicontype will be ignored, the icon should be 35 * 35 monochrome picture (?). Need to be refined here? ), all supported keys (key) can be found in here. When static quick Start modeDefined in Info.plist, we need to make the appropriate proxy method for the application: application (_:performactionforshortcutitem: Completionhandler:) that gets once the user clicks on the Quick Launch, the code method is called. There is a block that you have to call, as long as you do the quick action. What I understand is that it will respond to your behavior by changing your view hierarchy and then callback block. It's not as simple as it looks. There is a problem that needs to be handled depending on whether your application is running or entering the foreground. You must check application:didfinishlaunchingwithoptions: or application: Willfinishlaunchingwithoptions: Whether to start from a shortcut. By checking Uiapplicationlaunchoptionsshortcutitemkey in the launchoptions dictionary, if you really need to start from a shortcut, you need to set it in application: Willfinishlaunchingwithoptions: Sets the appropriate view hierarchy and returns false, which prevents application (_:performactionforshortcutitem: Completionhandler:) is called. There are a few simple routines that demonstrate how I handle it, and all of the app's code is available on GitHub sample. Be downloaded. dynamic behavior can easily create objects by using the Uiapplicationshortcutitem and Uimutableapplicationshortcutitem classes, and then add them to the
UIApplication
' s
shortcutItems
Properties, and then manage these dynamic shortcuts, there are some potentially very complex issues that I will not delve into here. -----------------------------------------------------------------------------------reprint: Please specify the Source:/http www.cnblogs.com/gaox97329498/
3D Touch: Static Quick Start mode