Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit 2351cb4

Browse files
committed
Call super.prepareForReuse() as appropriate.
1 parent bf03b41 commit 2351cb4

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Sources/ASCollectionView/Cells/ASCollectionViewCell.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ASCollectionViewCell: UICollectionViewCell, ASDataSourceConfigurableCell
4040

4141
override func prepareForReuse()
4242
{
43+
super.prepareForReuse()
4344
itemID = nil
4445
isSelected = false
4546
alpha = 1.0

Sources/ASCollectionView/Cells/ASCollectionViewDecoration.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,4 @@ class ASCollectionViewDecoration<Content: Decoration>: ASCollectionViewSupplemen
1818
super.init(frame: frame)
1919
setContent(supplementaryID: ASSupplementaryCellID(sectionIDHash: 0, supplementaryKind: "Decoration"), content: Content())
2020
}
21-
22-
override func prepareForReuse()
23-
{
24-
// Don't call super, we don't want any changes
25-
}
2621
}

Sources/ASCollectionView/Cells/ASCollectionViewSupplementaryView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ASCollectionViewSupplementaryView: UICollectionReusableView, ASDataSourceC
4040

4141
override func prepareForReuse()
4242
{
43+
super.prepareForReuse()
4344
supplementaryID = nil
4445
}
4546

Sources/ASCollectionView/Cells/ASTableViewCell.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class ASTableViewCell: UITableViewCell, ASDataSourceConfigurableCell
4545

4646
override func prepareForReuse()
4747
{
48+
super.prepareForReuse()
49+
4850
itemID = nil
4951
isSelected = false
5052
backgroundColor = nil

Sources/ASCollectionView/Cells/ASTableViewSupplementaryView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class ASTableViewSupplementaryView: UITableViewHeaderFooterView, ASDataSourceCon
3939

4040
override func prepareForReuse()
4141
{
42+
super.prepareForReuse()
4243
supplementaryID = nil
4344
}
4445

0 commit comments

Comments
 (0)