fixed bug for ButtonGroupPositionLayout - take the min between collectionViewWidth and button width
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
ba63562445
commit
ba33824576
@ -229,7 +229,7 @@ class ButtonGroupPositionLayout: UICollectionViewLayout {
|
||||
|
||||
// create the custom layout attribute
|
||||
let attributes = ButtonLayoutAttributes(spacing: itemSpacing, button: itemButtonBase, forCellWith: indexPath)
|
||||
attributes.frame = CGRect(x: 0, y: 0, width: itemSize.width, height: itemSize.height)
|
||||
attributes.frame = CGRect(x: 0, y: 0, width: min(itemSize.width, collectionViewWidth), height: itemSize.height)
|
||||
|
||||
// add it to the array
|
||||
rows.last?.add(attribute: attributes)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user