SCSCategoryViewControllerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | SCSCategoryViewController.h |
Overview
Delegate protocol to allow the receiver to interact with, and control the experience of, a category view controller.
– categoryController:willLoadCategory:
Informs the delegate when a category is assigned and it begins to load.
- (void)categoryController:(SCSCategoryViewController *)controller willLoadCategory:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
category |
The category that was assigned to the controller. |
Declared In
SCSCategoryViewController.h
– categoryController:didLoadCategory:
Informs the delegate when a category is assigned and it completes loading.
- (void)categoryController:(SCSCategoryViewController *)controller didLoadCategory:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
category |
The category that was assigned to the controller. |
Declared In
SCSCategoryViewController.h
– categoryController:childCategorySelected:
Informs the delegate when a category is selected.
- (BOOL)categoryController:(SCSCategoryViewController *)controller childCategorySelected:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
category |
The category that was selected. |
Return Value
YES
if the built-in default action should be performed, otherwise NO
if no action should be performed.
Declared In
SCSCategoryViewController.h
– categoryController:articleSelected:
Informs the delegate when an article is selected.
- (BOOL)categoryController:(SCSCategoryViewController *)controller articleSelected:(SCSArticle *)article
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
article |
The article that was selected. |
Return Value
YES
if the built-in default action should be performed, otherwise NO
if no action should be performed.
Declared In
SCSCategoryViewController.h
– categoryController:showMoreArticlesSelectedForCategory:
Informs the delegate when the “Show More Articles” row is tapped.
- (BOOL)categoryController:(SCSCategoryViewController *)controller showMoreArticlesSelectedForCategory:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
category |
The category being shown. |
Return Value
YES
if the built-in default action should be performed, otherwise NO
if no action should be performed.
Discussion
This is only supported on controllers that have child categories, and whose display mode is SCSCategoryDisplayModeArticlesAndCategories
.
Declared In
SCSCategoryViewController.h
– categoryController:headerViewForType:forCategory:
Allows the delegate to customize the header view used for the indicated type.
- (nullable __kindof UIView *)categoryController:(SCSCategoryViewController *)controller headerViewForType:(SCSCategoryHeaderType)headerType forCategory:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
headerType |
The type of header view being requested. |
category |
The category being shown. |
Return Value
A UIView to show in the header section of the given type, or nil
if no header should be shown.
Discussion
If nil
is returned, then no header will be used for that section.
If you want to use the default header view, don’t implement this method.
The SCSCategoryHeaderTypeChildCategories
header type is only requested of the delegate when the selected category has child categories, and when the display mode is SCSCategoryDisplayModeArticlesAndCategories
.
Declared In
SCSCategoryViewController.h
– categoryController:heightForHeaderType:forCategory:
Allows the delegate to customize the height of the header view used for the indicated type.
- (CGFloat)categoryController:(SCSCategoryViewController *)controller heightForHeaderType:(SCSCategoryHeaderType)headerType forCategory:(SCSCategory *)category
Parameters
controller |
The SCSCategoryViewController instance. |
---|---|
headerType |
The type of header view being requested. |
category |
The category being shown. |
Return Value
The desired height of the header.
Discussion
If you want to use the default height, don’t implement this method.
Declared In
SCSCategoryViewController.h