SCArrayOfObjectsSection Class Reference
Inherits from | SCArrayOfItemsSection : SCTableViewSection : NSObject |
Declared in | SCTableViewSection.h |
Overview
This class functions as an SCTableViewModel section that is able to represent an array of any kind of objects and automatically generate its cells from these objects. In addition, ‘SCArrayOfObjectsSection’ generates its detail views from the properties of the corresponding object in its items array. Objects in the items array need not all be of the same object type, but they must all decend from NSObject. If more than one type of object is present in the items array, then their respective class definitions should be added to the itemsClassDefinitions set.
Tasks
Creation and Initialization
STVParse Methods
-
+ sectionWithHeaderTitle:parseDefinition:
-
+ sectionWithHeaderTitle:parseDefinition:batchSize:
-
– initWithHeaderTitle:parseDefinition:
-
– initWithHeaderTitle:parseDefinition:batchSize:
STVWebServices Methods
-
+ sectionWithHeaderTitle:webServiceDefinition:
-
+ sectionWithHeaderTitle:webServiceDefinition:batchSize:
-
– initWithHeaderTitle:webServiceDefinition:
-
– initWithHeaderTitle:webServiceDefinition:batchSize:
STVCoreData Methods
Class Methods
sectionWithHeaderTitle:entityDefinition:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an entity definition.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle entityDefinition:(SCEntityDefinition *)definition
Parameters
- sectionHeaderTitle
A header title for the section.
- definition
The entity definition of the objects to fetch.
Discussion
Note: This method creates a section with all the objects that exist in classDefinition’s entity’s managedObjectContext. To create a section with only a subset of these objects, consider using the other section initializers.
Declared In
SCArrayOfObjectsSection+CoreData.h
sectionWithHeaderTitle:entityDefinition:filterPredicate:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title, an entity definition, and an NSPredicate.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle entityDefinition:(SCEntityDefinition *)definition filterPredicate:(NSPredicate *)predicate
Parameters
- sectionHeaderTitle
A header title for the section.
- definition
The entity definition of the objects to fetch.
- perdicate
The predicate that will be used to filter the fetched objects.
Declared In
SCArrayOfObjectsSection+CoreData.h
sectionWithHeaderTitle:items:itemsDefinition:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an array of objects.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle items:(NSMutableArray *)sectionItems itemsDefinition:(SCDataDefinition *)definition
Parameters
- sectionHeaderTitle
A header title for the section.
- sectionItems
A mutable array of objects that the section will use to generate its cells.
- definition
The definition of the objects in the objects array. If the array contains more than one type of object, then their respective definitions must be added to the itemsDefinitions dictionary after initialization.
Declared In
SCTableViewSection.h
sectionWithHeaderTitle:parseDefinition:
Allocates and returns an initialized SCArrayOfObjectsSection given a header title and a Parse definition. * * @param sectionHeaderTitle A header title for the section. * @param definition The Parse definition of the objects to fetch.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle parseDefinition:(SCParseDefinition *)definition
Declared In
SCArrayOfObjectsSection+Parse.h
sectionWithHeaderTitle:parseDefinition:batchSize:
Allocates and returns an initialized SCArrayOfObjectsSection given a header title, a Parse definition and a batch size for the fetched objects. * * @param sectionHeaderTitle A header title for the section. * @param definition The Parse definition of the objects to fetch. * @param batchSize The size of the batch to be fetched.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle parseDefinition:(SCParseDefinition *)definition batchSize:(NSUInteger)batchSize
Declared In
SCArrayOfObjectsSection+Parse.h
sectionWithHeaderTitle:webServiceDefinition:
Allocates and returns an initialized SCArrayOfObjectsSection given a header title and a web service definition. * * @param sectionHeaderTitle A header title for the section. * @param definition The web service definition of the objects to fetch.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle webServiceDefinition:(SCWebServiceDefinition *)definition
Declared In
SCArrayOfObjectsSection+WebServices.h
sectionWithHeaderTitle:webServiceDefinition:batchSize:
Allocates and returns an initialized SCArrayOfObjectsSection given a header title, a web service definition and a batch size for the fetched objects. * * @param sectionHeaderTitle A header title for the section. * @param definition The web service definition of the objects to fetch. * @param batchSize The size of the batch to be fetched.
+ (instancetype)sectionWithHeaderTitle:(NSString *)sectionHeaderTitle webServiceDefinition:(SCWebServiceDefinition *)definition batchSize:(NSUInteger)batchSize
Declared In
SCArrayOfObjectsSection+WebServices.h
Instance Methods
initWithHeaderTitle:entityDefinition:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an entity definition.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle entityDefinition:(SCEntityDefinition *)definition
Parameters
- sectionHeaderTitle
A header title for the section.
- definition
The entity definition of the objects to fetch.
Discussion
Note: This method creates a section with all the objects that exist in classDefinition’s entity’s managedObjectContext. To create a section with only a subset of these objects, consider using the other section initializers.
Declared In
SCArrayOfObjectsSection+CoreData.h
initWithHeaderTitle:entityDefinition:filterPredicate:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title, an entity definition, and an NSPredicate.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle entityDefinition:(SCEntityDefinition *)definition filterPredicate:(NSPredicate *)predicate
Parameters
- sectionHeaderTitle
A header title for the section.
- definition
The entity definition of the objects to fetch.
- perdicate
The predicate that will be used to filter the fetched objects.
Declared In
SCArrayOfObjectsSection+CoreData.h
initWithHeaderTitle:items:itemsDefinition:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an array of objects.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle items:(NSMutableArray *)sectionItems itemsDefinition:(SCDataDefinition *)definition
Parameters
- sectionHeaderTitle
A header title for the section.
- sectionItems
A mutable array of objects that the section will use to generate its cells.
- definition
The definition of the objects in the objects array. If the array contains more than one type of object, then their respective definitions must be added to the itemsDefinitions dictionary after initialization.
Declared In
SCTableViewSection.h
initWithHeaderTitle:parseDefinition:
Returns an initialized SCArrayOfObjectsSection given a header title and a Parse definition. * * @param sectionHeaderTitle A header title for the section. * @param definition The Parse definition of the objects to fetch.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle parseDefinition:(SCParseDefinition *)definition
Declared In
SCArrayOfObjectsSection+Parse.h
initWithHeaderTitle:parseDefinition:batchSize:
Returns an initialized SCArrayOfObjectsSection given a header title, a Parse definition and a batch size for the fetched objects. * * @param sectionHeaderTitle A header title for the section. * @param definition The Parse definition of the objects to fetch. * @param batchSize The size of the batch to be fetched.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle parseDefinition:(SCParseDefinition *)definition batchSize:(NSUInteger)batchSize
Declared In
SCArrayOfObjectsSection+Parse.h
initWithHeaderTitle:webServiceDefinition:
Returns an initialized SCArrayOfObjectsSection given a header title and a web service definition. * * @param sectionHeaderTitle A header title for the section. * @param definition The web service definition of the objects to fetch.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle webServiceDefinition:(SCWebServiceDefinition *)definition
Declared In
SCArrayOfObjectsSection+WebServices.h
initWithHeaderTitle:webServiceDefinition:batchSize:
Returns an initialized SCArrayOfObjectsSection given a header title, a web service definition and a batch size for the fetched objects. * * @param sectionHeaderTitle A header title for the section. * @param definition The web service definition of the objects to fetch. * @param batchSize The size of the batch to be fetched.
- (instancetype)initWithHeaderTitle:(NSString *)sectionHeaderTitle webServiceDefinition:(SCWebServiceDefinition *)definition batchSize:(NSUInteger)batchSize
Declared In
SCArrayOfObjectsSection+WebServices.h