From 62aecb0941b15b903e4d19792ec2bd53b190052a Mon Sep 17 00:00:00 2001 From: Nikita Semenov Date: Wed, 3 Aug 2022 20:28:15 +0300 Subject: [PATCH] fix: layout + collection cell updates --- .../Sources/Filters/Models/FiltersLayoutConfiguration.swift | 5 +++-- .../Sources/Wrappers/ContainerCollectionViewCell.swift | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TIUIElements/Sources/Filters/Models/FiltersLayoutConfiguration.swift b/TIUIElements/Sources/Filters/Models/FiltersLayoutConfiguration.swift index 1d2fbddc..00b47dc9 100644 --- a/TIUIElements/Sources/Filters/Models/FiltersLayoutConfiguration.swift +++ b/TIUIElements/Sources/Filters/Models/FiltersLayoutConfiguration.swift @@ -44,14 +44,15 @@ public struct FiltersLayoutConfiguration { } @available(iOS 13, *) -extension FiltersLayoutConfiguration { +public extension FiltersLayoutConfiguration { static let horizontalScrollConfiguration = FiltersLayoutConfiguration(horizontalItemSpacing: 16, contentInsets: .init(top: .zero, left: 8, bottom: .zero, right: 8)) - static let gridConfiguration = FiltersLayoutConfiguration(verticalItemSpacing: 16, + static let gridConfiguration = FiltersLayoutConfiguration(horizontalItemSpacing: 16, + verticalItemSpacing: 16, contentInsets: .init(top: .zero, left: 8, bottom: .zero, diff --git a/TIUIElements/Sources/Wrappers/ContainerCollectionViewCell.swift b/TIUIElements/Sources/Wrappers/ContainerCollectionViewCell.swift index c9a4dcef..e071af05 100644 --- a/TIUIElements/Sources/Wrappers/ContainerCollectionViewCell.swift +++ b/TIUIElements/Sources/Wrappers/ContainerCollectionViewCell.swift @@ -53,7 +53,7 @@ open class ContainerCollectionViewCell: UICollectionViewCell, Init // MARK: - InitializableView open func addViews() { - addSubview(wrappedView) + contentView.addSubview(wrappedView) } open func bindViews() {