xcode - Value of type 'CollectionViewCell' has no member 'imageView' -
my build fails due following 2 errors
- value of type explorecollectionviewcell has no member 'imageview'
- value of type explorecollectionviewcell has no member 'titlelabel'
i can't figure out change causing failure or how fix without redoing whole project.
func collectionview(collectionview: uicollectionview, cellforitematindexpath indexpath: nsindexpath) -> uicollectionviewcell { let cellapt = collectionview.dequeuereusablecellwithreuseidentifier("cellapt", forindexpath: indexpath) as! explorecollectionviewcell cellapt.imageview?.image = self.imagearray[indexpath.row] cellapt.titlelabel?.text = self.condocells[indexpath.row] cellapt.setneedslayout() return cellapt }
explorecollectionviewcell should have properties codes below:
class explorecollectionviewcell: uicollectionviewcell { @iboutlet weak var imageview: uiimageview! @iboutlet weak var titlelabel: uilabel! ... }
Comments
Post a Comment