refactored to debugBorder
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
178df4ed0a
commit
9387b0cff9
@ -149,9 +149,10 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega
|
|||||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath)
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath)
|
||||||
cell.subviews.forEach { $0.removeFromSuperview() }
|
cell.subviews.forEach { $0.removeFromSuperview() }
|
||||||
cell.addSubview(button)
|
cell.addSubview(button)
|
||||||
button.pinToSuperView()
|
button.pinLeading()
|
||||||
// cell.layer.borderColor = UIColor.black.cgColor
|
button.pinTrailing()
|
||||||
// cell.layer.borderWidth = 1
|
button.centerYAnchor.constraint(equalTo: cell.centerYAnchor).isActive = true
|
||||||
|
//cell.debugBorder()
|
||||||
return cell
|
return cell
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,3 +116,16 @@ extension UIView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extension UIView {
|
||||||
|
public func debugBorder(show shouldShow: Bool = true) {
|
||||||
|
if shouldShow {
|
||||||
|
layer.borderColor = UIColor.red.cgColor
|
||||||
|
layer.borderWidth = 1
|
||||||
|
} else {
|
||||||
|
layer.borderColor = UIColor.clear.cgColor
|
||||||
|
layer.borderWidth = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user