From 2f54f168e6c53208ed52bf9715965aae5ac0e427 Mon Sep 17 00:00:00 2001 From: c-scalcucci Date: Mon, 21 Oct 2019 12:03:14 -0400 Subject: [PATCH] Added Package.swift for SPM support and updated the README.md to include installtion instructions for SPM. --- Package.swift | 18 ++++++++++++++++++ README.md | 20 +++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8580cf3 --- /dev/null +++ b/Package.swift @@ -0,0 +1,18 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "Spring", + platforms: [ + .iOS(.v8), .tvOS(.v11) + ], + products: [ + .library(name: "Spring", targets: ["Spring"]) + ], + targets: [ + .target(name: "Spring", path: "Spring" + ) + ], + swiftLanguageVersions: [.v5] +) diff --git a/README.md b/README.md index 34f1430..a8d289e 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,32 @@ Requires Xcode 10 and Swift 4.2. ## Installation + +Spring can be installed through the following options. + +### Manual + Drop in the Spring folder to your Xcode project (make sure to enable "Copy items if needed" and "Create groups"). -Or via CocoaPods: +### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) + ``` use_frameworks! pod 'Spring', :git => 'https://github.com/MengTo/Spring.git' ``` +### [Swift Package Manager](https://github.com/apple/swift-package-manager) + +From inside Xode go to File -> Swift Packages -> Add Package Dependency and paste 'https://github.com/MengTo/Spring.git' into the top field. + +Alternatively you can add the following inside your Package.swift file: + +``` +dependencies: [ + .package(url: "https://github.com/MengTo/Spring.git", from: "1.0.6") +] +``` + ## Usage with Storyboard In Identity Inspector, connect the UIView to SpringView Class and set the animation properties in Attribute Inspector.