I believe I'm following the UICollectionViewDataSource, but the compiler says otherwise.
What am I missing?
import Foundation
import UIKit
class InviteFriendsViewController:UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
@IBOutlet weak var collectionView: UICollectionView!
@IBAction func navButtonAction(sender: UIBarButtonItem) {
}
@IBAction func segmentedControlAction(sender: UISegmentedControl) {
}
// -----------------------------------------------------------------------------------------------------
// MARK: UICollectionViewDataSource
func collectionView(collectionView: UICollectionView, section: Int) -> Int {
return 1
}
func collectionView(collectionView: UICollectionView, indexPath: NSIndexPath) -> UICollectionViewCell {
let cell: AnyObject = collectionView.dequeueReusableCellWithReuseIdentifier("InviteFriendsVC", forIndexPath:indexPath)
return cell as UICollectionViewCell
}
}
I have two (2) func that covers the required APIs... but I'm getting this compiler error.
Why?