@@ -188,50 +188,50 @@ extension UICollectionViewFlexLayout {
188
188
return self . collectionView? . delegate as? UICollectionViewDelegateFlexLayout
189
189
}
190
190
191
- func size( forItemAt indexPath: IndexPath ) -> CGSize {
191
+ public func size( forItemAt indexPath: IndexPath ) -> CGSize {
192
192
guard let collectionView = self . collectionView, let delegate = self . delegate else { return . zero }
193
193
return delegate. collectionView ? ( collectionView, layout: self , sizeForItemAt: indexPath) ?? . zero
194
194
}
195
195
196
- func verticalSpacing( betweenSectionAt section: Int , and nextSection: Int ) -> CGFloat {
196
+ public func verticalSpacing( betweenSectionAt section: Int , and nextSection: Int ) -> CGFloat {
197
197
guard section != nextSection else { return 0 }
198
198
guard let collectionView = self . collectionView, let delegate = self . delegate else { return 0 }
199
199
return delegate. collectionView ? ( collectionView, layout: self , verticalSpacingBetweenSectionAt: section, and: nextSection) ?? 0
200
200
}
201
201
202
- func margin( forSectionAt section: Int ) -> UIEdgeInsets {
202
+ public func margin( forSectionAt section: Int ) -> UIEdgeInsets {
203
203
guard let collectionView = self . collectionView, let delegate = self . delegate else { return . zero }
204
204
return delegate. collectionView ? ( collectionView, layout: self , marginForSectionAt: section) ?? . zero
205
205
}
206
206
207
- func padding( forSectionAt section: Int ) -> UIEdgeInsets {
207
+ public func padding( forSectionAt section: Int ) -> UIEdgeInsets {
208
208
guard let collectionView = self . collectionView, let delegate = self . delegate else { return . zero }
209
209
return delegate. collectionView ? ( collectionView, layout: self , paddingForSectionAt: section) ?? . zero
210
210
}
211
211
212
- func horizontalSpacing( betweenItemAt indexPath: IndexPath , and nextIndexPath: IndexPath ) -> CGFloat {
212
+ public func horizontalSpacing( betweenItemAt indexPath: IndexPath , and nextIndexPath: IndexPath ) -> CGFloat {
213
213
guard indexPath != nextIndexPath else { return 0 }
214
214
guard let collectionView = self . collectionView, let delegate = self . delegate else { return 0 }
215
215
return delegate. collectionView ? ( collectionView, layout: self , horizontalSpacingBetweenItemAt: indexPath, and: nextIndexPath) ?? 0
216
216
}
217
217
218
- func verticalSpacing( betweenItemAt indexPath: IndexPath , and nextIndexPath: IndexPath ) -> CGFloat {
218
+ public func verticalSpacing( betweenItemAt indexPath: IndexPath , and nextIndexPath: IndexPath ) -> CGFloat {
219
219
guard indexPath != nextIndexPath else { return 0 }
220
220
guard let collectionView = self . collectionView, let delegate = self . delegate else { return 0 }
221
221
return delegate. collectionView ? ( collectionView, layout: self , verticalSpacingBetweenItemAt: indexPath, and: nextIndexPath) ?? 0
222
222
}
223
223
224
- func margin( forItemAt indexPath: IndexPath ) -> UIEdgeInsets {
224
+ public func margin( forItemAt indexPath: IndexPath ) -> UIEdgeInsets {
225
225
guard let collectionView = self . collectionView, let delegate = self . delegate else { return . zero }
226
226
return delegate. collectionView ? ( collectionView, layout: self , marginForItemAt: indexPath) ?? . zero
227
227
}
228
228
229
- func padding( forItemAt indexPath: IndexPath ) -> UIEdgeInsets {
229
+ public func padding( forItemAt indexPath: IndexPath ) -> UIEdgeInsets {
230
230
guard let collectionView = self . collectionView, let delegate = self . delegate else { return . zero }
231
231
return delegate. collectionView ? ( collectionView, layout: self , paddingForItemAt: indexPath) ?? . zero
232
232
}
233
233
234
- func zIndex( forItemAt indexPath: IndexPath ) -> Int {
234
+ public func zIndex( forItemAt indexPath: IndexPath ) -> Int {
235
235
guard let collectionView = self . collectionView, let delegate = self . delegate else { return 0 }
236
236
return delegate. collectionView ? ( collectionView, layout: self , zIndexForItemAt: indexPath) ?? 0
237
237
}
0 commit comments