CXTDT-516206 - ButtonGroup iOS 16 issue
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
329793721f
commit
bbc36c72d3
@ -190,8 +190,8 @@ extension ButtonGroup: UICollectionViewDataSource, UICollectionViewDelegate {
|
|||||||
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||||
let button = buttons[indexPath.row]
|
let button = buttons[indexPath.row]
|
||||||
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath) as? ButtonGroupCollectionViewCell else { return UICollectionViewCell() }
|
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath) as? ButtonGroupCollectionViewCell else { return UICollectionViewCell() }
|
||||||
cell.subviews.forEach { $0.removeFromSuperview() }
|
cell.contentView.subviews.forEach { $0.removeFromSuperview() }
|
||||||
cell.addSubview(button)
|
cell.contentView.addSubview(button)
|
||||||
button.pinToSuperView()
|
button.pinToSuperView()
|
||||||
if hasDebugBorder {
|
if hasDebugBorder {
|
||||||
cell.addDebugBorder()
|
cell.addDebugBorder()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user