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
interface
The Knowledge interface instance.
articleId
The unique article number.
traitCollection
Traits that describe the desired image to retrieve.
Return Value
An image to use for the given article, or
nil
if 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
interface
The Knowledge interface instance.
categoryName
The unique developerName of that category.
traitCollection
Traits that describe the desired image to retrieve.
Return Value
An image to use for the given category, or
nil
if no image should be used.