خرید بک لینک

Vote count: 0

I am making a collection view, and have made my own custom collectionCell. I have specified so in the identity inspector, and as far as i can tell, i have done everything right.

The code is

import UIKit

class SubjectCollectionViewCell: UICollectionViewCell {
    @IBOutlet weak var imageView: UIImageView!
    @IBOutlet weak var label: UILabel!
}

and in my collectionViewController

override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {

    let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! SubjectCollectionViewCell

    retu cell
}

I get the following error message

"Could not cast value of type 'UICollectionViewCell' (0x110460820) to 'project.SubjectCollectionViewCell' (0x10eceeda0). (lldb)"

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 10 ارديبهشت 1395 ساعت: 23:06

صفحه بندی