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.