     
 }
 
+// MARK: - Helpers
+extension NumPad {
+    
+    func positionForIndexPath(indexPath: NSIndexPath) -> Position {
+        let row = rowForIndexPath(indexPath)
+        return (row: row, column: 0)
+    }
+    
+    func rowForIndexPath(indexPath: NSIndexPath) -> Int {
+        
+        return 0
+    }
 
+    func numberOfRows() -> Int {
+        return delegate?.numberOfRowsInNumberPad(self) ?? 0
+    }
+    
+    func numberOfColumnsInRow(row: Int) -> Int {
+        return delegate?.numPad(self, numberOfColumnsInRow: row) ?? 0
+    }
+    
+}
 
 // MARK: - CollectionViewCell
 class CollectionViewCell: UICollectionViewCell, ReusableView {

extension NumPad: UICollectionViewDataSource {
    
    public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        var items = 0
        
        
        
        return items
    }
    
    public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell: CollectionViewCell = collectionView.dequeueReusableCell(forIndexPath: indexPath)
        
        
        
        return cell
    }


import UIKit

public typealias Position = (row: Int, column: Int)

public protocol NumPadDataSource: class {
    
    func numberOfRowsInNumberPad(numPad: NumPad) -> Int
    func numPad(numPad: NumPad, numberOfColumnsInRow row: Int) -> Int
    func numPad(numPad: NumPad, titleForButtonAtPosition position: Position) -> String
    
}

