From ef0a776359e82b03e77eff09f9b7e2f90e1464e3 Mon Sep 17 00:00:00 2001 From: OhKanghoon Date: Tue, 6 Feb 2024 11:49:25 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20UICollectionComponentReusableVi?= =?UTF-8?q?ew=20=EB=B6=88=ED=95=84=EC=9A=94=20=EC=A0=91=EA=B7=BC=EC=A0=9C?= =?UTF-8?q?=EC=96=B4=EC=9E=90=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/UICollectionComponentReusableView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/KarrotListKit/View/UICollectionComponentReusableView.swift b/Sources/KarrotListKit/View/UICollectionComponentReusableView.swift index 93d55d6..f5c884e 100644 --- a/Sources/KarrotListKit/View/UICollectionComponentReusableView.swift +++ b/Sources/KarrotListKit/View/UICollectionComponentReusableView.swift @@ -17,11 +17,11 @@ final class UICollectionComponentReusableView: UICollectionReusableView, Compone // MARK: - Initializing @available(*, unavailable) - public required init?(coder aDecoder: NSCoder) { + required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - public override init(frame: CGRect) { + override init(frame: CGRect) { super.init(frame: frame) backgroundColor = .clear @@ -29,7 +29,7 @@ final class UICollectionComponentReusableView: UICollectionReusableView, Compone // MARK: - Override Methods - public override func preferredLayoutAttributesFitting( + override func preferredLayoutAttributesFitting( _ layoutAttributes: UICollectionViewLayoutAttributes ) -> UICollectionViewLayoutAttributes { let attributes = super.preferredLayoutAttributesFitting(layoutAttributes) From 3dd691aa6324d36ee5a70dccd0e3e32109647362 Mon Sep 17 00:00:00 2001 From: OhKanghoon Date: Tue, 6 Feb 2024 11:49:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20UICollectionViewComponentCell=20?= =?UTF-8?q?=EC=9D=98=20=EC=A0=91=EA=B7=BC=EC=A0=9C=EC=96=B4=EC=9E=90=20?= =?UTF-8?q?=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - renderedContent 접근 public 오픈 --- .../View/UICollectionViewComponentCell.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/KarrotListKit/View/UICollectionViewComponentCell.swift b/Sources/KarrotListKit/View/UICollectionViewComponentCell.swift index ae27eda..8c79be4 100644 --- a/Sources/KarrotListKit/View/UICollectionViewComponentCell.swift +++ b/Sources/KarrotListKit/View/UICollectionViewComponentCell.swift @@ -5,9 +5,9 @@ import Combine import UIKit -final class UICollectionViewComponentCell: UICollectionViewCell, ComponentRenderable { +public final class UICollectionViewComponentCell: UICollectionViewCell, ComponentRenderable { - var renderedContent: UIView? + public internal(set) var renderedContent: UIView? var coordinator: Any? @@ -20,11 +20,11 @@ final class UICollectionViewComponentCell: UICollectionViewCell, ComponentRender // MARK: - Initializing @available(*, unavailable) - public required init?(coder aDecoder: NSCoder) { + required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - public override init(frame: CGRect) { + override init(frame: CGRect) { super.init(frame: frame) backgroundColor = .clear @@ -37,7 +37,7 @@ final class UICollectionViewComponentCell: UICollectionViewCell, ComponentRender // MARK: - Override Methods - override func prepareForReuse() { + public override func prepareForReuse() { super.prepareForReuse() cancellables?.forEach { $0.cancel() }