Last active
August 28, 2019 07:26
-
-
Save HassanElDesouky/5237beb600f334bdc3a82f441c699034 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IconChooseColorCell: UICollectionViewCell { | |
let view: UIImageView = { | |
let cv = UIImageView() | |
cv.translatesAutoresizingMaskIntoConstraints = false | |
return cv | |
}() | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
setupView() | |
} | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
fileprivate func setupView() { | |
self.addSubview(view) | |
NSLayoutConstraint.activate([ | |
view.topAnchor.constraint(equalTo: self.topAnchor), | |
view.bottomAnchor.constraint(equalTo: self.bottomAnchor), | |
view.leftAnchor.constraint(equalTo: self.leftAnchor), | |
view.rightAnchor.constraint(equalTo: self.rightAnchor), | |
]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment