SCKnowledgeInterfaceDelegate
@protocol SCKnowledgeInterfaceDelegate <NSObject>
Delegate protocol that defines the methods sent to the Knowledge delegate.
-
Asks the delegate for an article image. Use this method to customize the image for an article header and cell.
Declaration
Objective-C
- (nullable UIImage *)knowledgeInterface:(nonnull SCKnowledgeInterface *)interface imageForArticle:(nonnull NSString *)articleId compatibleWithTraitCollection:(nullable UITraitCollection *)traitCollection;Swift
optional func knowledgeInterface(_ interface: SCKnowledgeInterface, imageForArticle articleId: String, compatibleWithTraitCollection traitCollection: Any!) -> Any!Parameters
interfaceThe Knowledge interface instance.
articleIdThe unique article number.
traitCollectionTraits that describe the desired image to retrieve.
Return Value
An image to use for the given article, or
nilif no image should be used. -
Asks the delegate for a data category image. Use this method to customize the image for a data category header and cell.
Declaration
Objective-C
- (nullable UIImage *)knowledgeInterface:(nonnull SCKnowledgeInterface *)interface imageForDataCategory:(nonnull NSString *)categoryName compatibleWithTraitCollection:(nullable UITraitCollection *)traitCollection;Swift
optional func knowledgeInterface(_ interface: SCKnowledgeInterface, imageForDataCategory categoryName: String, compatibleWithTraitCollection traitCollection: Any!) -> Any!Parameters
interfaceThe Knowledge interface instance.
categoryNameThe unique developerName of that category.
traitCollectionTraits that describe the desired image to retrieve.
Return Value
An image to use for the given category, or
nilif no image should be used.
Install in Dash
SCKnowledgeInterfaceDelegate Protocol Reference