From d1a74ea3870cb7814305b075a7b4d96f08daf78e Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 15 Aug 2023 13:48:51 -0500 Subject: [PATCH] added self Signed-off-by: Matt Bruce --- VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift index 99aef7f5..ed3a2c15 100644 --- a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift +++ b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift @@ -130,12 +130,13 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega //-------------------------------------------------- // MARK: - Public Functions //-------------------------------------------------- + open override func setup() { super.setup() addSubview(collectionView) collectionView.pinToSuperView() } - + //-------------------------------------------------- // MARK: - Overrides //-------------------------------------------------- @@ -149,10 +150,11 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega open override func layoutSubviews() { super.layoutSubviews() - // Accounts for any collection size changes - DispatchQueue.main.async { - self.collectionView.collectionViewLayout.invalidateLayout() - } +// // Accounts for any collection size changes +// DispatchQueue.main.async { [weak self] in +// guard let self else { return } +// self.collectionView.collectionViewLayout.invalidateLayout() +// } } //--------------------------------------------------