SCSCategoryViewController
@interface SCSCategoryViewController : UIViewController
View controller capable of showing the contents of a category, whether it be child categories, articles, or both. It can be controlled through assigning a containing category to the category
property, and implementing the SCSCategoryViewControllerDelegate
methods.
-
The display mode used to create this category controller. This value cannot be changed at runtime.
Declaration
Objective-C
@property (nonatomic, readonly) SCSCategoryDisplayMode displayMode;
Swift
var displayMode: SCSCategoryDisplayMode { get }
-
Indicates the knowledge manager instance that will be used within this controller.
Declaration
Objective-C
@property (nonatomic, strong, null_resettable) SCSKnowledgeManager *knowledgeManager;
Swift
var knowledgeManager: SCSKnowledgeManager! { get set }
-
The category this controller is displaying the contents of.
Declaration
Objective-C
@property (nonatomic, strong, nullable) SCSCategory *category;
Swift
var category: SCSCategory? { get set }
-
Delegate property to use to interact with the category view controller.
Declaration
Objective-C
@property (nonatomic, weak, nullable) NSObject<SCSCategoryViewControllerDelegate> *delegate;
Swift
weak var delegate: SCSCategoryViewControllerDelegate? { get set }
-
Indicates whether or not searching is allowed within this controller.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSearchEnabled) BOOL searchEnabled;
Swift
var isSearchEnabled: Bool { get set }
-
Indicates whether or not the content of this controller is empty.
Note
This will returntrue
if the content is still being loaded, since its unclear at that point whether or not the controller will be empty.Declaration
Objective-C
@property (nonatomic, readonly, getter=isEmpty) BOOL empty;
Swift
var isEmpty: Bool { get }
-
Template to use when composing a search to show per-article. This template object is used for the current category as the basis to find articles.
Note
Thecategories
property is overwritten with the appropriate category being displayed, or will omit the category from the article query if the category property isnil
. Furthermore, it is advisable to avoid setting thearticleId
orsearchTerm
properties, as these may produce unexpected results.Declaration
Objective-C
@property (nonatomic, copy, null_resettable) SCSArticleQuery *articleQueryTemplate;
Swift
@NSCopying var articleQueryTemplate: SCSArticle! { get set }
-
Designated initializer.
Declaration
Objective-C
- (nonnull instancetype)initWithCategory:(nullable SCSCategory *)category displayMode:(SCSCategoryDisplayMode)displayMode;
Swift
init(category: SCSCategory?, displayMode: SCSCategoryDisplayMode)
Parameters
category
Category to show.
displayMode
The type of contents to show within the category controller.
Return Value
Initialized view controller.