Skip to content

Commit

Permalink
Add support for Swift Package Manager (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitskynikita authored and TosinAF committed Nov 11, 2019
1 parent 5d2b097 commit 45f8dfc
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Package.swift
@@ -0,0 +1,22 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "PanModal",
platforms: [.iOS(.v10)],
products: [
.library(
name: "PanModal",
targets: ["PanModal"]),
],
dependencies: [],
targets: [
.target(
name: "PanModal",
dependencies: [],
path: "PanModal")
],
swiftLanguageVersions: [.version("4.2")]
)
2 changes: 2 additions & 0 deletions PanModal/Animator/PanModalAnimator.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -36,3 +37,4 @@ struct PanModalAnimator {
completion: completion)
}
}
#endif
2 changes: 2 additions & 0 deletions PanModal/Animator/PanModalPresentationAnimator.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -168,3 +169,4 @@ extension PanModalPresentationAnimator: UIViewControllerAnimatedTransitioning {
}

}
#endif
2 changes: 2 additions & 0 deletions PanModal/Controller/PanModalPresentationController.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -890,3 +891,4 @@ private extension UIScrollView {
return isDragging && !isDecelerating || isTracking
}
}
#endif
2 changes: 2 additions & 0 deletions PanModal/Delegate/PanModalPresentationDelegate.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -77,3 +78,4 @@ extension PanModalPresentationDelegate: UIAdaptivePresentationControllerDelegate
}

}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presentable/PanModalHeight.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -40,3 +41,4 @@ public enum PanModalHeight: Equatable {
*/
case intrinsicHeight
}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presentable/PanModalPresentable+Defaults.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -124,3 +125,4 @@ public extension PanModalPresentable where Self: UIViewController {

}
}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presentable/PanModalPresentable+LayoutHelpers.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -100,3 +101,4 @@ extension PanModalPresentable where Self: UIViewController {
}

}
#endif
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -59,3 +60,4 @@ public extension PanModalPresentable where Self: UIViewController {
}

}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presentable/PanModalPresentable.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2017 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -233,3 +234,4 @@ public protocol PanModalPresentable: AnyObject {
*/
func panModalDidDismiss()
}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presenter/PanModalPresenter.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand All @@ -31,3 +32,4 @@ protocol PanModalPresenter: AnyObject {
func presentPanModal(_ viewControllerToPresent: PanModalPresentable.LayoutType, sourceView: UIView?, sourceRect: CGRect)

}
#endif
2 changes: 2 additions & 0 deletions PanModal/Presenter/UIViewController+PanModalPresenter.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -58,3 +59,4 @@ extension UIViewController: PanModalPresenter {
}

}
#endif
2 changes: 2 additions & 0 deletions PanModal/View/DimmedView.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2017 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -72,3 +73,4 @@ public class DimmedView: UIView {
}

}
#endif
2 changes: 2 additions & 0 deletions PanModal/View/PanContainerView.swift
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//

#if os(iOS)
import UIKit

/**
Expand Down Expand Up @@ -40,3 +41,4 @@ extension UIView {
}

}
#endif

0 comments on commit 45f8dfc

Please sign in to comment.