Skip to content

Commit

Permalink
Fix closure call
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed Jun 1, 2015
1 parent 7da998c commit 1ea7e25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Agrume/Agrume.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public class Agrume: UIViewController {
let collectionView = UICollectionView(frame: self.view.bounds, collectionViewLayout: layout)
collectionView.registerClass(AgrumeCell.self, forCellWithReuseIdentifier: Agrume.ReuseIdentifier)
collectionView.dataSource = self
collectionView.delegate = self
collectionView.pagingEnabled = true
collectionView.backgroundColor = UIColor.clearColor()
collectionView.delaysContentTouches = false
Expand Down Expand Up @@ -339,3 +340,11 @@ extension Agrume: UICollectionViewDataSource {
}

}

extension Agrume: UICollectionViewDelegate {

public func collectionView(collectionView: UICollectionView, willDisplayCell cell: UICollectionViewCell, forItemAtIndexPath indexPath: NSIndexPath) {
didScroll?(index: indexPath.row)
}

}
4 changes: 2 additions & 2 deletions Example/Agrume Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -412,7 +412,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down

0 comments on commit 1ea7e25

Please sign in to comment.