Skip to content

Commit

Permalink
Merge pull request #48 from kastiglione/patch-2
Browse files Browse the repository at this point in the history
Fix documentation referencing CKComponentCollectionViewDataSource, to CKCollectionViewDataSource
  • Loading branch information
benlodotcom committed Mar 30, 2015
2 parents 3a18ab6 + 7126529 commit d0207a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _docs/datasource-basics.md
Expand Up @@ -49,7 +49,7 @@ Don't access global state inside a Component. Use the context to pass this infor

#### Create a `CKCollectionViewDataSource`

Ok, so now we have our view controller as the component provider, let's create our `CKComponentCollectionViewDataSource` and attach the collection view to it.
Ok, so now we have our view controller as the component provider, let's create our `CKCollectionViewDataSource` and attach the collection view to it.

```objc++
- (void)viewDidLoad {
Expand Down Expand Up @@ -129,7 +129,7 @@ Pretty simple right ? And this logic can apply to any `UICollectionViewLayout` :
Time to interact with those items now; nothing special here the regular selection APIs can be used. Let's say the models have a url that should be opened when the user tap on an item.

```objc++
- (void)dataSource:(CKComponentCollectionViewDataSource *)dataSource didSelectItemAtIndexPath:(NSIndexPath *)indexPath
- (void)dataSource:(CKCollectionViewDataSource *)dataSource didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
MyModel *model = (MyModel *)[self.dataSource modelForItemAtIndexPath:indexPath];
NSURL *navURL = model.url;
Expand Down

0 comments on commit d0207a0

Please sign in to comment.