Better Table Views and Collection Views on iOS using RZCollectionList

457 views

Published on

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.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
457
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Better Table Views and Collection Views on iOS using RZCollectionList

  1. 1. RZCollectionListTransforming and Displaying Data in TableViews and CollectionViews Joe Goullaud joe@raizlabs.com ADN/Twitter: @jgoullaud
  2. 2. Overview• What does it do?• How does it help?• How do you use it?• ... and of course, Demo!
  3. 3. What is RZCollectionList?A framework for encapsulating, combining, and transforming data from various sources anddisplaying it in Collection-based Views on iOS.
  4. 4. RZCollectionList RZCollectionList Source Lists Transform Lists RZArrayCollectionList RZSortedCollectionListRZFetchedCollectionList RZFilteredCollectionList RZCompositeCollectionList Combination Lists
  5. 5. 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)typecollectionListWillChangeContent:(id<RZCollectionList>)collectionListcollectionListDidChangeContent:(id<RZCollectionList>)collectionList
  6. 6. RZCollectionList Data SourcesRZCollectionListTableViewDataSourceRZCollectionListCollectionViewDataSource• Observe collection lists• Automatically update views
  7. 7. Using RZCollectionListNSFetchedResultsController RZFetchedCollectionList UITableView RZCollectionListTableViewDataSource
  8. 8. 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{ ...}
  9. 9. Transforming Lists RZArrayCollectionList RZCollectionListTableViewDataSource
  10. 10. Transforming Lists RZArrayCollectionList RZFilteredCollectionList RZCollectionListTableViewDataSource
  11. 11. Combining ListsRZArrayCollectionList RZFetchedCollectionList RZCompositeCollectionList RZCollectionListTableViewDataSource
  12. 12. DEMO
  13. 13. RZCollectionList LinksGitHub Project: http://github.com/Raizlabs/RZCollectionListBugs and Feature Requests: http://github.com/Raizlabs/RZCollectionList/issuesMore iOS Frameworks & Components: http://raizlabs.github.com

×