From f7da5cfa1a0aacaf8f533682fe11db0926581a3b Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Wed, 3 Jul 2024 15:21:44 +0800 Subject: [PATCH] feat: Adjust the base class configuration --- Sources/Base/View/BaseView.swift | 2 ++ Sources/Epoxy/CollectionView/CollectionView.swift | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Sources/Base/View/BaseView.swift b/Sources/Base/View/BaseView.swift index ad54cad..79b47a2 100644 --- a/Sources/Base/View/BaseView.swift +++ b/Sources/Base/View/BaseView.swift @@ -28,6 +28,8 @@ open class BaseView: UIView { /// *Must* call super if override @objc open dynamic func config() { + translatesAutoresizingMaskIntoConstraints = false + addSubviews() addInitialLayout() } diff --git a/Sources/Epoxy/CollectionView/CollectionView.swift b/Sources/Epoxy/CollectionView/CollectionView.swift index ea09f47..9a2bb21 100644 --- a/Sources/Epoxy/CollectionView/CollectionView.swift +++ b/Sources/Epoxy/CollectionView/CollectionView.swift @@ -17,6 +17,13 @@ import EpoxyCollectionView open class CollectionView: EpoxyCollectionView.CollectionView { /// Proxy events related to context menu in `CollectionView`. public weak var contextMenuDelegate: CollectionViewContextMenuDelegate? = nil + + override public init(layout: UICollectionViewLayout, configuration: CollectionViewConfiguration = .shared) { + super.init(layout: layout, configuration: configuration) + + showsVerticalScrollIndicator = false + showsHorizontalScrollIndicator = false + } } // MARK: - UICollectionViewDelegate