Add support for Swift Package Manager (#55)

This commit is contained in:
Nikita Nikitsky 2019-11-11 22:49:59 +04:00 committed by Tosin Afolabi
parent 5d2b0977bd
commit 45f8dfcf19
14 changed files with 48 additions and 0 deletions

22
Package.swift Normal file
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("4.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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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

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