I've subclassed a UICollectionViewCell
in which there is a UIImageView
. This image view is connected to an image view control on the story board. This is the subclass:
class ProfilesCell: UICollectionViewCell {
@IBOutlet weak var ProfileImage: UIImageView!
func setCell(item:Profile) {
ProfileImage.image = UIImage(named: item.profileThumb)
ProfileImage.layer.borderWidth = 0.5
ProfileImage.layer.borderColor = UIColor.grayColor().CGColor
}
}
I've created an instance of it and it works fine, but what about another instance? how can I choose it as a custom class for another UICollectionViewCell
without reconnecting the ProfileImage
to another control?
Or shall I connect that IBOutlet
to the UIImageView
at the first place?