Slide 36
Slide 36 text
CSSearchableItemAttributeSet *attributeSet =
[[CSSearchableItemAttributeSet alloc] initWithItemContentType:…];
attributeSet.title = program.title;
attributeSet.contentDescription = [NSString stringWithFormat:@"%@ %@\n%@", ...];
attributeSet.startDate = program.startDate;
attributeSet.endDate = program.endDate;
CSSearchableItem *item = [[CSSearchableItem alloc] initWithUniqueIdentifier:program.identifier
domainIdentifier:@“programs"
attributeSet:attributeSet];
[searchableItems addObject:item];
CSSearchableIndex *searchableIndex = [CSSearchableIndex defaultSearchableIndex];
[searchableIndex indexSearchableItems:@[searchableItem] completionHandler:...]
ݕࡧΠϯσοΫεʹՃɾߋ৽