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
-
+ sectionWithHeaderTitle:items:itemsDefinition:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an array of objects.
-
– initWithHeaderTitle:items:itemsDefinition:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an array of objects.
WebServices Methods
-
+ 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.
-
+ 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.
-
– 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.
-
– 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.
CoreData Methods
-
+ sectionWithHeaderTitle:entityDefinition:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an entity definition.
-
+ sectionWithHeaderTitle:entityDefinition:filterPredicate:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title, an entity definition, and an NSPredicate.
-
– initWithHeaderTitle:entityDefinition:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an entity definition.
-
– initWithHeaderTitle:entityDefinition:filterPredicate:
Returns an initialized ‘SCArrayOfObjectsSection’ given a header title, an entity definition, and an NSPredicate.
Class Methods
sectionWithHeaderTitle:entityDefinition:
Allocates and returns an initialized ‘SCArrayOfObjectsSection’ given a header title and an entity definition.
+ (id)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.
+ (id)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.
+ (id)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: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.
+ (id)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.
+ (id)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.
- (id)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.
- (id)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.
- (id)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: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.
- (id)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.
- (id)initWithHeaderTitle:(NSString *)sectionHeaderTitle webServiceDefinition:(SCWebServiceDefinition *)definition batchSize:(NSUInteger)batchSize
Declared In
SCArrayOfObjectsSection+WebServices.h