Commit 159165b9 by Daniel Dahan

development: added a Divider object to a CollectionViewCell

parent 53a2c6ce
......@@ -121,6 +121,6 @@ open class CollectionView: UICollectionView {
open func prepareView() {
contentScaleFactor = Device.scale
backgroundColor = Color.clear
contentInset = UIEdgeInsets.zero
contentInset = .zero
}
}
......@@ -33,6 +33,9 @@ import UIKit
@IBDesignable
@objc(CollectionViewCell)
open class CollectionViewCell: UICollectionViewCell {
/// A reference to the divider.
open internal(set) var divider: Divider!
/**
A CAShapeLayer used to manage elements that would be affected by
the clipToBounds property of the backing layer. For example, this
......@@ -274,6 +277,7 @@ open class CollectionViewCell: UICollectionViewCell {
open func prepareView() {
contentScaleFactor = Device.scale
prepareVisualLayer()
prepareDivider()
}
/// Prepares the visualLayer property.
......@@ -289,4 +293,9 @@ open class CollectionViewCell: UICollectionViewCell {
visualLayer.frame = bounds
visualLayer.cornerRadius = cornerRadius
}
/// Prepares the divider.
private func prepareDivider() {
divider = Divider(view: self)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment