better table views and collection views on ios using rzcollectionlist
DESCRIPTION
A presentation given at CocoaHeads Boston on a framework for encapsulating, combining, and transforming data from various sources (Core Data, WebService, etc.) and easily displaying it in UITableViews and UICollectionViews on iOS.TRANSCRIPT
![Page 1: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/1.jpg)
RZCollectionListTransforming and Displaying Data in TableViews and
CollectionViews
ADN/Twitter: @jgoullaud
![Page 2: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/2.jpg)
Overview• What does it do?
• How does it help?
• How do you use it?
• ... and of course, Demo!
![Page 3: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/3.jpg)
What is RZCollectionList?
A framework for encapsulating, combining, and transforming data from various sources and
displaying it in Collection-based Views on iOS.
![Page 4: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/4.jpg)
RZCollectionList
RZCollectionList
RZArrayCollectionList
RZFetchedCollectionList
RZCompositeCollectionList
RZFilteredCollectionList
RZSortedCollectionList
Source Lists Transform Lists
Combination Lists
![Page 5: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/5.jpg)
RZCollectionListObserver
collectionList:(id<RZCollectionList>)collectionListdidChangeObject:(id)object atIndexPath:(NSIndexPath*)indexPath forChangeType:(RZCollectionListChangeType)type newIndexPath:(NSIndexPath*)newIndexPath
collectionList:(id<RZCollectionList>)collectionListdidChangeSection:(id<RZCollectionListSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(RZCollectionListChangeType)type
collectionListWillChangeContent:(id<RZCollectionList>)collectionList
collectionListDidChangeContent:(id<RZCollectionList>)collectionList
![Page 6: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/6.jpg)
RZCollectionListData Sources
• Observe collection lists
• Automatically update views
RZCollectionListTableViewDataSource
RZCollectionListCollectionViewDataSource
![Page 7: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/7.jpg)
NSFetchedResultsController
RZFetchedCollectionList UITableView
Using RZCollectionList
RZCollectionListTableViewDataSource
![Page 8: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/8.jpg)
3 OBJs and 1 IMPNSFetchRequest *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{ ...}
![Page 9: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/9.jpg)
RZArrayCollectionList
Transforming Lists
RZCollectionListTableViewDataSource
![Page 10: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/10.jpg)
RZArrayCollectionList
Transforming Lists
RZCollectionListTableViewDataSource
RZFilteredCollectionList
![Page 11: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/11.jpg)
RZArrayCollectionList
Combining Lists
RZFetchedCollectionList
RZCompositeCollectionList
RZCollectionListTableViewDataSource
![Page 12: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/12.jpg)
DEMO
![Page 13: Better Table Views and Collection Views on iOS using RZCollectionList](https://reader036.vdocuments.us/reader036/viewer/2022081401/5588ff7cd8b42aaa3f8b4790/html5/thumbnails/13.jpg)
RZCollectionList Links
GitHub Project: http://github.com/Raizlabs/RZCollectionList
More iOS Frameworks & Components: http://raizlabs.github.com
Bugs and Feature Requests: http://github.com/Raizlabs/RZCollectionList/issues