@@ -36,7 +36,7 @@ class PlaceholderDataSourceDelegate: NSObject {
3636 /// - tintColor: the tint color to apply
3737 func fill( cell: CellPlaceholding , to placeholder: Placeholder , tintColor: UIColor ? ) {
3838
39- /** if the the placeholder created by xib and data/style are nil, we should keep the xib data/style * */
39+ /* if the the placeholder created by xib and data/style are nil, we should keep the xib data/style */
4040
4141 // apply style
4242 if let style = placeholder. style {
@@ -85,6 +85,7 @@ class PlaceholderDataSourceDelegate: NSObject {
8585 }
8686 return height
8787 }
88+
8889}
8990
9091// MARK: table view data source methods
@@ -110,7 +111,7 @@ extension PlaceholderDataSourceDelegate: UITableViewDataSource {
110111
111112 cell. selectionStyle = . none
112113 // If the cell does not inherit from PlaceholderTableViewCell, the data and the style can't be applied
113- guard let placeholderTableViewCell = ( cell as? PlaceholderTableViewCell ) else {
114+ guard let placeholderTableViewCell = cell as? PlaceholderTableViewCell else {
114115 return cell
115116 }
116117
@@ -157,7 +158,10 @@ extension PlaceholderDataSourceDelegate: UITableViewDelegate {
157158 // animate the cell
158159 func tableView( _ tableView: UITableView , willDisplay cell: UITableViewCell , forRowAt indexPath: IndexPath ) {
159160
160- if placeholder. style? . isAnimated == false { return }
161+ if placeholder. style? . isAnimated == false {
162+ return
163+ }
164+
161165 guard let placeholderTableViewCell = cell as? PlaceholderTableViewCell else { return }
162166 animate ( cell: placeholderTableViewCell)
163167 }
@@ -177,15 +181,15 @@ extension PlaceholderDataSourceDelegate: UICollectionViewDataSource {
177181 let cell = collectionView. dequeueReusableCell ( withReuseIdentifier: reuseIdentifier, for: indexPath)
178182
179183 // If the cell does not inherit from PlaceholderTableViewCell, the data and the style can't be applied
180- guard let placeholderCollectionViewCell = ( cell as? PlaceholderCollectionViewCell ) else {
184+ guard let placeholderCollectionViewCell = cell as? PlaceholderCollectionViewCell else {
181185 return cell
182186 }
183187
184188 fill ( cell: placeholderCollectionViewCell, to: placeholder, tintColor: collectionView. tintColor)
185189
186190 // forward action to placeholder delegate
187191 placeholderCollectionViewCell. onActionButtonTap = { [ unowned self] in
188- guard let placeholderCollectionView = ( collectionView as? CollectionView ) else { return }
192+ guard let placeholderCollectionView = collectionView as? CollectionView else { return }
189193 placeholderCollectionView. placeholderDelegate? . view ( collectionView, actionButtonTappedFor: self . placeholder)
190194 }
191195 return cell
0 commit comments