diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/SlideOutable/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/SlideOutable/Assets.xcassets/AppIcon.appiconset/Contents.json index 1d060ed..9221b9b 100644 --- a/Example/SlideOutable/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/SlideOutable/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,92 +2,97 @@ "images" : [ { "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" + "scale" : "1x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Example/SlideOutableExample.xcodeproj/project.pbxproj b/Example/SlideOutableExample.xcodeproj/project.pbxproj index f38c888..8ff5185 100644 --- a/Example/SlideOutableExample.xcodeproj/project.pbxproj +++ b/Example/SlideOutableExample.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + C043C7702452D9FA0064D6D7 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = C043C76F2452D9FA0064D6D7 /* Package.swift */; }; D307A2C81DABD2640072E3FB /* SlideOutable.h in Headers */ = {isa = PBXBuildFile; fileRef = D307A2C61DABD2640072E3FB /* SlideOutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; D307A2CC1DABD2730072E3FB /* ClearContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED097D2C1CEF3CEA0045362A /* ClearContainerView.swift */; }; D307A2CD1DABD2730072E3FB /* SlideOutable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED097D2D1CEF3CEA0045362A /* SlideOutable.swift */; }; @@ -21,6 +22,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + C043C76F2452D9FA0064D6D7 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../Package.swift; sourceTree = ""; }; D307A2C41DABD2640072E3FB /* SlideOutable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SlideOutable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D307A2C61DABD2640072E3FB /* SlideOutable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlideOutable.h; sourceTree = ""; }; D307A2C71DABD2640072E3FB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -57,6 +59,17 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + C043C74C2452D6C40064D6D7 /* SlideOutable */ = { + isa = PBXGroup; + children = ( + ED097D2C1CEF3CEA0045362A /* ClearContainerView.swift */, + ED097D2D1CEF3CEA0045362A /* SlideOutable.swift */, + D3B0BC451DE6E49900E270B2 /* SlideOutableDelegate.swift */, + D36BD2641E2680B9006C444F /* EquatableFloat.swift */, + ); + path = SlideOutable; + sourceTree = ""; + }; C0C844A022F4009500DD958A /* Frameworks */ = { isa = PBXGroup; children = ( @@ -76,8 +89,9 @@ ED00FF861CEDCD0500A5BEC9 = { isa = PBXGroup; children = ( + C043C76F2452D9FA0064D6D7 /* Package.swift */, ED00FFA41CEDD53E00A5BEC9 /* MapKit.framework */, - ED097D2B1CEF3CEA0045362A /* Source */, + ED097D2B1CEF3CEA0045362A /* Sources */, ED00FF911CEDCD0500A5BEC9 /* SlideOutable */, D307A2C51DABD2640072E3FB /* SlideOutable */, ED00FF901CEDCD0500A5BEC9 /* Products */, @@ -107,16 +121,13 @@ path = SlideOutable; sourceTree = ""; }; - ED097D2B1CEF3CEA0045362A /* Source */ = { + ED097D2B1CEF3CEA0045362A /* Sources */ = { isa = PBXGroup; children = ( - ED097D2C1CEF3CEA0045362A /* ClearContainerView.swift */, - ED097D2D1CEF3CEA0045362A /* SlideOutable.swift */, - D3B0BC451DE6E49900E270B2 /* SlideOutableDelegate.swift */, - D36BD2641E2680B9006C444F /* EquatableFloat.swift */, + C043C74C2452D6C40064D6D7 /* SlideOutable */, ); - name = Source; - path = ../Source; + name = Sources; + path = ../Sources; sourceTree = ""; }; /* End PBXGroup section */ @@ -243,6 +254,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + C043C7702452D9FA0064D6D7 /* Package.swift in Sources */, ED00FF951CEDCD0500A5BEC9 /* ViewController.swift in Sources */, ED00FF931CEDCD0500A5BEC9 /* AppDelegate.swift in Sources */, ); diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..46cdfa7 --- /dev/null +++ b/Package.swift @@ -0,0 +1,26 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. +import PackageDescription + +let package = Package( + name: "SlideOutable", + platforms: [ + .iOS(.v10), + ], products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "SlideOutable", + targets: ["SlideOutable"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "SlideOutable", + dependencies: []), + ] +) diff --git a/README.md b/README.md index 60ad7dd..d043076 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) # SlideOutable Swift component for sliding content above other views easily. @@ -26,12 +26,16 @@ slideOutable.autoresizingMask = [.flexibleWidth, .flexibleHeight] // Or use cons view.addSubview(slideOutable) ``` - ## From Interface Builder See [example project](/Example/SlideOutable). # Installation -Using [Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). Add the following line to your Cartfile: + +### [Swift Package Manager](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) +Open your project in Xcode and select File > Swift Packages > Add Package Dependency. There enter `https://github.com/trafi/SlideOuatable` as the repository URL. + +### [Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) +Using Carthage. Add the following line to your Cartfile: ``` github "Trafi/SlideOutable" ``` diff --git a/Sources/SlideOutable/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/Sources/SlideOutable/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Sources/SlideOutable/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Source/ClearContainerView.swift b/Sources/SlideOutable/ClearContainerView.swift similarity index 100% rename from Source/ClearContainerView.swift rename to Sources/SlideOutable/ClearContainerView.swift diff --git a/Source/EquatableFloat.swift b/Sources/SlideOutable/EquatableFloat.swift similarity index 95% rename from Source/EquatableFloat.swift rename to Sources/SlideOutable/EquatableFloat.swift index c49e96b..b6c2f68 100644 --- a/Source/EquatableFloat.swift +++ b/Sources/SlideOutable/EquatableFloat.swift @@ -6,7 +6,7 @@ // Copyright © 2017 Domas Nutautas. All rights reserved. // -import Foundation +import CoreGraphics struct EquatableFloat: Equatable { let float: CGFloat diff --git a/Source/SlideOutable.swift b/Sources/SlideOutable/SlideOutable.swift similarity index 100% rename from Source/SlideOutable.swift rename to Sources/SlideOutable/SlideOutable.swift diff --git a/Source/SlideOutableDelegate.swift b/Sources/SlideOutable/SlideOutableDelegate.swift similarity index 100% rename from Source/SlideOutableDelegate.swift rename to Sources/SlideOutable/SlideOutableDelegate.swift