Skip to content

Commit

Permalink
backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunon committed Oct 28, 2018
1 parent 7608e79 commit dd27b41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Mew/Protocols/CellProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public enum SizeConstraint: Equatable {
let direction = (layout as? UICollectionViewFlowLayout)?.scrollDirection
let inset = (layout as? UICollectionViewFlowLayout)?.sectionInset ?? UIEdgeInsets.zero
var result: Calculated = (nil, nil)
if direction != UICollectionViewScrollDirection.vertical {
if direction != UICollectionView.ScrollDirection.vertical {
result.height = frame.height - inset.top - inset.bottom
}
if direction != UICollectionViewScrollDirection.horizontal {
if direction != UICollectionView.ScrollDirection.horizontal {
result.width = frame.width - inset.left - inset.right
}
return result
Expand Down
2 changes: 2 additions & 0 deletions Sources/Mew/Utils/BackwardCompatibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ extension UICollectionView {
static var elementKindSectionFooter: String {
return UICollectionElementKindSectionFooter
}

typealias ScrollDirection = UICollectionViewScrollDirection
}

#endif

0 comments on commit dd27b41

Please sign in to comment.