Skip to content

Commit ba2a8d6

Browse files
author
Egor Lindberg
committed
migrated to Swift 4.2
1 parent 1f7d9d8 commit ba2a8d6

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ Carthage
3131
# `pod install` in .travis.yml
3232
#
3333
# Pods/
34+
contents.xcworkspacedata
35+
IDEWorkspaceChecks.plist

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 31 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ORCarousel/Classes/ORCarousel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class ORCarousel: UIView, UICollectionViewDataSource, UICollectionViewDel
2929

3030
// MARK: - Config Properties
3131

32-
public var scrollDirection: UICollectionViewScrollDirection = .horizontal {
32+
public var scrollDirection: UICollectionView.ScrollDirection = .horizontal {
3333
didSet {
3434
if let flowLayout = containerView.collectionViewLayout as? UICollectionViewFlowLayout {
3535
flowLayout.scrollDirection = scrollDirection
@@ -105,7 +105,7 @@ public class ORCarousel: UIView, UICollectionViewDataSource, UICollectionViewDel
105105
return containerView.frame.size
106106
}
107107

108-
var scrollPosition: UICollectionViewScrollPosition {
108+
var scrollPosition: UICollectionView.ScrollPosition {
109109
let flowLayout = containerView.collectionViewLayout as! UICollectionViewFlowLayout
110110

111111
return flowLayout.scrollDirection == .horizontal ? .centeredHorizontally : .centeredVertically
@@ -288,7 +288,7 @@ public class ORCarousel: UIView, UICollectionViewDataSource, UICollectionViewDel
288288

289289
let scrollSem: DispatchSemaphore = DispatchSemaphore(value: 1)
290290

291-
private func scrollToItem(at indexPath: IndexPath, at pos: UICollectionViewScrollPosition, animated: Bool, completion: (() -> Void)? = nil) {
291+
private func scrollToItem(at indexPath: IndexPath, at pos: UICollectionView.ScrollPosition, animated: Bool, completion: (() -> Void)? = nil) {
292292
DispatchQueue.global().async { [weak self] in
293293
self?.scrollSem.wait()
294294

0 commit comments

Comments
 (0)