2018-09-07 14:34:00

iOS开发-iPhone手机切换应用时屏幕下方为什么会出现应用提示-怎么实现应用提示-使用NSUserActivity的效果-App Switcher Proactive Suggestion using handoff


An NSUserActivity object provides a lightweight way to capture the state of your app and put it to use later. You create user activity objects and use them to capture information about what the user was doing, such as viewing app content, editing a document, viewing a web page, or watching a video. When the system launches your app and an activity object is available, your app can use the information in that object to restore itself to an appropriate state. Spotlight also uses your user activity objects to improve search results for the user.

You create NSUserActivity objects at key moments and register them with the system. For example, you might create a user activity object when the user opens a web page, when your app moves to the background, or when the user performs some other significant task in your app. User activity objects are not intended as a way to track every task in your app, so you should not use them for small edits or other minor changes. Instead, use them for significant checkpoints that the user might want to continue later or on another device. You can also use them to provide better Spotlight search results.





当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »