jjzjj

CSSearchableItemAttributeSet

全部标签

ios - CSSearchableItemAttributeSet 上的 title 和 displayName 属性

我正在构建一个使用CSSearchableItemAttributeSet和NSUserActivity的应用程序,以便将项目添加到Spotlight搜索索引。我索引的项目是表情符号,它由表情符号字符本身、描述和显示表情符号的图像组成。我注意到CSSearchableItemAttributeSet上有一个title属性,还有一个名为displayName的属性。它们之间有什么区别,它们出现在最终用户的什么地方,除非提供displayName,否则title是否出现,或者这两者如何交互并呈现给用户?我试图弄清楚我需要在我的场景中使用哪个,或者我是否需要两者。displayName的文档

ios - 如何在 appDelegate 中获取 CSSearchableItemAttributeSet

NSMutableArray*searchableItems=[NSMutableArrayarray];for(inti=1;i我已经用customKey设置了一些searchableItems,如何在AppDelegate中获取customKeyValue?-(BOOL)application:(UIApplication*)applicationcontinueUserActivity:(NSUserActivity*)userActivityrestorationHandler:(void(^)(NSArray*_Nullable))restorationHandler

ios - CSSearchableItemAttributeSet 的 contentDescription 属性不支持换行格式

我有一个CSSearchableItem和CSSearchableItemAttributeSet,CSSearchableItemAttributeSet*attributes=[[CSSearchableItemAttributeSetalloc]initWithItemContentType:(__bridgeNSString*)kUTTypeContact];attributes.keywords=@[keywords];attributes.title=@"ContactDetails";attributes.displayName=@"RamGandhi";attribut