Skip to content

Commit

Permalink
Added overridable prepare for reuse (#19)
Browse files Browse the repository at this point in the history
* Added overridable prepare for reuse

* updated pods
  • Loading branch information
MaherKSantina authored Dec 20, 2018
1 parent 3f21d6e commit c0919aa
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 245 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- MSAutoView (3.0.0)
- MSAutoView (3.1.0)

DEPENDENCIES:
- MSAutoView (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
MSAutoView: f9d86e3e532c39fd3824e6338a42041aa3ed73af
MSAutoView: 2860485090037c6ed1f047f70c47380ad99ace75

PODFILE CHECKSUM: 706747bd031deee93b9c3b1183d1ca2b073305ba

Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/MSAutoView.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

433 changes: 201 additions & 232 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Example/Pods/Target Support Files/MSAutoView/Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MSAutoView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'MSAutoView'
s.version = '3.0.0'
s.version = '3.1.0'
s.summary = 'An easy way to create reusable xibs.'
s.swift_version = '4.2'

Expand Down
4 changes: 4 additions & 0 deletions MSAutoView/Classes/MSAutoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,9 @@ open class MSAutoView: UIView, MSXibEmbedding {
//Override
}

open func prepareForReuse() {
//Override
}

}

5 changes: 5 additions & 0 deletions MSAutoView/Classes/MSCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ open class MSCollectionViewCell<T: MSAutoView>: UICollectionViewCell {
backgroundColor = mainView.backgroundColor
mainView.collectionViewCell = self
}

open override func prepareForReuse() {
super.prepareForReuse()
mainView.prepareForReuse()
}
}

public protocol CollectionViewCellContainable {
Expand Down
5 changes: 5 additions & 0 deletions MSAutoView/Classes/MSTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ open class MSTableViewCell<T: MSAutoView>: UITableViewCell {
backgroundColor = mainView.backgroundColor
mainView.tableViewCell = self
}

open override func prepareForReuse() {
super.prepareForReuse()
mainView.prepareForReuse()
}
}


Expand Down

0 comments on commit c0919aa

Please sign in to comment.