diff --git a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift index cc7c54f4..165ac959 100644 --- a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift +++ b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift @@ -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 } diff --git a/VDS/Extensions/UIView.swift b/VDS/Extensions/UIView.swift index 0214c67a..eb041400 100644 --- a/VDS/Extensions/UIView.swift +++ b/VDS/Extensions/UIView.swift @@ -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 + } + } +}