1

私は UICollectionViewDataSource に従っていると思いますが、コンパイラはそうではないと言っています。
私は何が欠けていますか?

ここに画像の説明を入力

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
    }
}

ここに画像の説明を入力

必要な API をカバーする関数が 2 つありますが、このコンパイラ エラーが発生します。
なんで?

4

1 に答える 1