Merge branch 'bugfix/carousel_insets' into 'release/11_0_0'
Carousel item width fix. ### Summary Fixes 100% item width given carousel insets. Co-authored-by: Hedden, Kyle Matthew <kyle.hedden@verizonwireless.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1006
This commit is contained in:
commit
3b24c96a03
@ -384,7 +384,7 @@ open class Carousel: View {
|
||||
|
||||
extension Carousel: UICollectionViewDelegateFlowLayout {
|
||||
open func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
let itemWidth = collectionView.bounds.width * itemWidthPercent
|
||||
let itemWidth = (collectionView.bounds.width - collectionView.contentInset.left - collectionView.contentInset.right) * itemWidthPercent
|
||||
return CGSize(width: itemWidth, height: collectionView.bounds.height)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user