Merge branch 'feature/textLink' into 'develop'
fixed bugs See merge request BPHV_MIPS/vds_ios!14
This commit is contained in:
commit
c2f39f1e0d
@ -87,7 +87,6 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -148,7 +147,6 @@ open class ButtonGroup: View, UICollectionViewDataSource, UICollectionViewDelega
|
|||||||
let button = buttons[indexPath.row]
|
let button = buttons[indexPath.row]
|
||||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath)
|
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionViewCell", for: indexPath)
|
||||||
cell.subviews.forEach { $0.removeFromSuperview() }
|
cell.subviews.forEach { $0.removeFromSuperview() }
|
||||||
cell.subviews.forEach { $0.removeFromSuperview() }
|
|
||||||
cell.addSubview(button)
|
cell.addSubview(button)
|
||||||
button.pinToSuperView()
|
button.pinToSuperView()
|
||||||
return cell
|
return cell
|
||||||
|
|||||||
@ -68,7 +68,8 @@ class ButtonGroupPositionLayout: UICollectionViewLayout {
|
|||||||
super.prepare()
|
super.prepare()
|
||||||
|
|
||||||
itemCache.removeAll()
|
itemCache.removeAll()
|
||||||
|
layoutHeight = 0.0
|
||||||
|
|
||||||
guard let collectionView = collectionView else {
|
guard let collectionView = collectionView else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -129,8 +130,6 @@ class ButtonGroupPositionLayout: UICollectionViewLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func layoutAttributesForElements(in rect: CGRect)-> [UICollectionViewLayoutAttributes]? {
|
override func layoutAttributesForElements(in rect: CGRect)-> [UICollectionViewLayoutAttributes]? {
|
||||||
super.layoutAttributesForElements(in: rect)
|
|
||||||
|
|
||||||
var visibleLayoutAttributes: [UICollectionViewLayoutAttributes] = []
|
var visibleLayoutAttributes: [UICollectionViewLayoutAttributes] = []
|
||||||
|
|
||||||
for attributes in itemCache {
|
for attributes in itemCache {
|
||||||
@ -143,7 +142,6 @@ class ButtonGroupPositionLayout: UICollectionViewLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
|
||||||
super.layoutAttributesForItem(at: indexPath)
|
|
||||||
return itemCache[indexPath.row]
|
return itemCache[indexPath.row]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,10 +156,5 @@ class ButtonGroupPositionLayout: UICollectionViewLayout {
|
|||||||
let insets = collectionView.contentInset
|
let insets = collectionView.contentInset
|
||||||
return collectionView.bounds.width - (insets.left + insets.right)
|
return collectionView.bounds.width - (insets.left + insets.right)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
|
|
||||||
layoutHeight = 0.0
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user