SCSArticleQueryResultsControllerDelegate
@protocol SCSArticleQueryResultsControllerDelegate <NSObject>
Delegate protocol for interacting with a SCSArticleQueryResultsController.
-
Message sent to the delegate when content changes will be made.
Declaration
Objective-C
- (void)articleQueryWillChangeContent: (nonnull SCSArticleQueryResultsController *)controller;
Swift
optional func articleQueryWillChangeContent(_ controller: SCSArticleQueryResultsController)
Parameters
controller
The article query results controller.
-
Message sent to the delegate when content changes have been completed.
Declaration
Objective-C
- (void)articleQueryDidChangeContent: (nonnull SCSArticleQueryResultsController *)controller;
Swift
optional func articleQueryDidChangeContent(_ controller: SCSArticleQueryResultsController)
Parameters
controller
The article query results controller.
-
Indicates that the controller reloaded its contents entirely. If the error property is nonnull, then it indicates that an error occurred in the process.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller didReloadWithError:(nullable NSError *)error;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, didReloadWithError error: Error?)
Parameters
controller
The article query results controller.
error
The error that occurred, or
nil
if no error was received. -
Sent to the delegate when an article is inserted.
An article may be inserted at an index when it is first found, or when a reload occurs and new articles are found.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller article:(nonnull SCSArticle *)article insertedAtIndex:(NSUInteger)index;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, article: SCSArticle, insertedAt index: UInt)
Parameters
controller
The article query results controller.
article
The article that was inserted.
index
The index where the article was inserted.
-
Sent to the delegate when an article is deleted.
Note that the article itself may not have been deleted; this merely means that the article was removed from the fetched list.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller article:(nonnull SCSArticle *)article deletedAtIndex:(NSUInteger)index;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, article: SCSArticle, deletedAt index: UInt)
Parameters
controller
The article query results controller.
article
The article that was deleted.
index
The index where the article was deleted.
-
Sent to the delegate when an article is updated.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller article:(nonnull SCSArticle *)article updatedAtIndex:(NSUInteger)index;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, article: SCSArticle, updatedAt index: UInt)
Parameters
controller
The article query results controller.
article
The article that was updated.
index
The index of the article.
-
Sent to the delegate when an article is moved.
An article may be moved if something influencing its sort criteria changes after a reload.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller article:(nonnull SCSArticle *)article movedFromIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, article: SCSArticle, movedFrom oldIndex: UInt, to newIndex: UInt)
Parameters
controller
The article query results controller.
article
The article that was moved.
oldIndex
The index where the article existed prior to this update.
newIndex
The new index of the article.
-
Sent to the delegate when a given page of articles beings loading.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller willBeginLoadingPage:(NSUInteger)page;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, willBeginLoadingPage page: UInt)
Parameters
controller
The article query results controller.
page
The page number being loaded.
-
Sent to the delegate when a given page of articles finishes loading.
Declaration
Objective-C
- (void)articleQuery:(nonnull SCSArticleQueryResultsController *)controller didFinishLoadingPage:(NSUInteger)page error:(nullable NSError *)error;
Swift
optional func articleQuery(_ controller: SCSArticleQueryResultsController, didFinishLoadingPage page: UInt, error: Error?)
Parameters
controller
The article query results controller.
page
The page number being loaded.
error
The error that occurred, or
nil
if no error was received.