better table views and collection views on ios using rzcollectionlist
Post on 23-Jun-2015
324 Views
Preview:
DESCRIPTION
TRANSCRIPT
RZCollectionListTransforming and Displaying Data in TableViews and
CollectionViews
Joe Goullaudjoe@raizlabs.com
ADN/Twitter: @jgoullaud
Overview• What does it do?
• How does it help?
• How do you use it?
• ... and of course, Demo!
What is RZCollectionList?
A framework for encapsulating, combining, and transforming data from various sources and
displaying it in Collection-based Views on iOS.
RZCollectionList
RZCollectionList
RZArrayCollectionList
RZFetchedCollectionList
RZCompositeCollectionList
RZFilteredCollectionList
RZSortedCollectionList
Source Lists Transform Lists
Combination Lists
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
RZCollectionListData Sources
• Observe collection lists
• Automatically update views
RZCollectionListTableViewDataSource
RZCollectionListCollectionViewDataSource
NSFetchedResultsController
RZFetchedCollectionList UITableView
Using RZCollectionList
RZCollectionListTableViewDataSource
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{ ...}
RZArrayCollectionList
Transforming Lists
RZCollectionListTableViewDataSource
RZArrayCollectionList
Transforming Lists
RZCollectionListTableViewDataSource
RZFilteredCollectionList
RZArrayCollectionList
Combining Lists
RZFetchedCollectionList
RZCompositeCollectionList
RZCollectionListTableViewDataSource
DEMO
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
top related