From ba63562445da2e8c9e1c546800d51756c8c6a9be Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 7 Feb 2024 15:45:56 -0600 Subject: [PATCH] CXTDT-516206 - ButtonGroup iOS 16 issue Signed-off-by: Matt Bruce --- VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift index 1fdbc56d..113d19f5 100644 --- a/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift +++ b/VDS/Components/Buttons/ButtonGroup/ButtonGroup.swift @@ -201,8 +201,8 @@ extension ButtonGroup: UICollectionViewDataSource, UICollectionViewDelegate { public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let button = buttons[indexPath.row] guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath) as? ButtonGroupCollectionViewCell else { return UICollectionViewCell() } - cell.subviews.forEach { $0.removeFromSuperview() } - cell.addSubview(button) + cell.contentView.subviews.forEach { $0.removeFromSuperview() } + cell.contentView.addSubview(button) button.pinToSuperView() if hasDebugBorder { cell.addDebugBorder()