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)
|
||||
cell.subviews.forEach { $0.removeFromSuperview() }
|
||||
cell.addSubview(button)
|
||||
button.pinToSuperView()
|
||||
// cell.layer.borderColor = UIColor.black.cgColor
|
||||
// cell.layer.borderWidth = 1
|
||||
button.pinLeading()
|
||||
button.pinTrailing()
|
||||
button.centerYAnchor.constraint(equalTo: cell.centerYAnchor).isActive = true
|
||||
//cell.debugBorder()
|
||||
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