Más contenido relacionado Better Table Views and Collection Views on iOS using RZCollectionList2. Overview
• What does it do?
• How does it help?
• How do you use it?
• ... and of course, Demo!
3. What is RZCollectionList?
A framework for encapsulating, combining, and
transforming data from various sources and
displaying it in Collection-based Views on iOS.
4. RZCollectionList
RZCollectionList
Source Lists Transform Lists
RZArrayCollectionList RZSortedCollectionList
RZFetchedCollectionList RZFilteredCollectionList
RZCompositeCollectionList
Combination Lists
5. RZCollectionListObserver
collectionList:(id<RZCollectionList>)collectionList
didChangeObject:(id)object
atIndexPath:(NSIndexPath*)indexPath
forChangeType:(RZCollectionListChangeType)type
newIndexPath:(NSIndexPath*)newIndexPath
collectionList:(id<RZCollectionList>)collectionList
didChangeSection:(id<RZCollectionListSectionInfo>)sectionInfo
atIndex:(NSUInteger)sectionIndex
forChangeType:(RZCollectionListChangeType)type
collectionListWillChangeContent:(id<RZCollectionList>)collectionList
collectionListDidChangeContent:(id<RZCollectionList>)collectionList
6. RZCollectionList
Data Sources
RZCollectionListTableViewDataSource
RZCollectionListCollectionViewDataSource
• Observe collection lists
• Automatically update views
8. 3 OBJs and 1 IMP
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"ListItem"
sortDescriptorKey:@"itemName"
ascending:YES];
RZFetchedCollectionList *fetchedList = [[RZFetchedCollectionList alloc]
initWithFetchRequest:request
managedObjectContext:moc
sectionNameKeyPath:@"subtitle"
cacheName:nil];
RZCollectionListTableViewDataSource *listDataSource =
[[RZCollectionListTableViewDataSource alloc] initWithTableView:tableView
collectionList:fetchedList
delegate:self];
...
- (UITableViewCell*)tableView:(UITableView *)tableView
cellForObject:(id)object
atIndexPath:(NSIndexPath *)indexPath
{
...
}
10. Transforming Lists
RZArrayCollectionList
RZFilteredCollectionList
RZCollectionListTableViewDataSource
13. RZCollectionList Links
GitHub Project:
http://github.com/Raizlabs/RZCollectionList
Bugs and Feature Requests:
http://github.com/Raizlabs/RZCollectionList/issues
More iOS Frameworks & Components:
http://raizlabs.github.com