2 Commits

Author SHA1 Message Date
Tosin Afolabi 7f07cdff27 Initial SPM Support 2019-11-11 10:52:18 -08:00
Nikita Nikitsky 45f8dfcf19 Add support for Swift Package Manager (#55) 2019-11-11 10:49:59 -08:00
15 changed files with 56 additions and 0 deletions
+22
View File
@@ -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("5.0")]
)
+2
View File
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -36,3 +37,4 @@ struct PanModalAnimator {
completion: completion)
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -168,3 +169,4 @@ extension PanModalPresentationAnimator: UIViewControllerAnimatedTransitioning {
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -890,3 +891,4 @@ private extension UIScrollView {
return isDragging && !isDecelerating || isTracking
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -77,3 +78,4 @@ extension PanModalPresentationDelegate: UIAdaptivePresentationControllerDelegate
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -40,3 +41,4 @@ public enum PanModalHeight: Equatable {
*/
case intrinsicHeight
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -124,3 +125,4 @@ public extension PanModalPresentable where Self: UIViewController {
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -100,3 +101,4 @@ extension PanModalPresentable where Self: UIViewController {
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -59,3 +60,4 @@ public extension PanModalPresentable where Self: UIViewController {
}
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2017 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -233,3 +234,4 @@ public protocol PanModalPresentable: AnyObject {
*/
func panModalDidDismiss()
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -31,3 +32,4 @@ protocol PanModalPresenter: AnyObject {
func presentPanModal(_ viewControllerToPresent: PanModalPresentable.LayoutType, sourceView: UIView?, sourceRect: CGRect)
}
#endif
@@ -5,6 +5,7 @@
// Copyright © 2019 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -58,3 +59,4 @@ extension UIViewController: PanModalPresenter {
}
}
#endif
+2
View File
@@ -5,6 +5,7 @@
// Copyright © 2017 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -72,3 +73,4 @@ public class DimmedView: UIView {
}
}
#endif
+2
View File
@@ -5,6 +5,7 @@
// Copyright © 2018 Tiny Speck, Inc. All rights reserved.
//
#if os(iOS)
import UIKit
/**
@@ -40,3 +41,4 @@ extension UIView {
}
}
#endif
+8
View File
@@ -54,6 +54,14 @@ pod 'PanModal'
github "slackhq/PanModal"
```
* Swift Package Manager, add the following line to your Package.swift:
```swift
dependencies: [
.package(url: "https://github.com/slackhq/PanModal.git", .exact("1.2.6")),
],
```
## Usage
PanModal was designed to be used effortlessly. Simply call `presentPanModal` in the same way you would expect to present a `UIViewController`