Files
InfiniteCollectionView/Example/Example/ImageCollectionViewCell.swift
T
2016-05-13 17:38:47 +09:00

22 lines
643 B
Swift

//
// ImageCollectionViewCell.swift
// Example
//
// Created by hiroyuki yoshida on 2016/01/04.
// Copyright © 2016 hiroyuki yoshida. All rights reserved.
//
import UIKit
final class ImageCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView!
static let identifier = "ImageCollectionViewCell"
static let nib = UINib(nibName: "ImageCollectionViewCell", bundle: nil)
func configure(dequeueIndexPath dequeueIndexPath: NSIndexPath) {
let image = UIImage(named: String(dequeueIndexPath.item))
imageView.image = image
setNeedsLayout()
layoutIfNeeded()
}
}