diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..d3f9571 Binary files /dev/null and b/.DS_Store differ diff --git a/Demo/.DS_Store b/Demo/.DS_Store new file mode 100644 index 0000000..198bb92 Binary files /dev/null and b/Demo/.DS_Store differ diff --git a/Demo/Demo-macOS.playground/Contents.swift b/Demo/Demo-macOS.playground/Contents.swift new file mode 100644 index 0000000..5c721b0 --- /dev/null +++ b/Demo/Demo-macOS.playground/Contents.swift @@ -0,0 +1,76 @@ +//: Playground - noun: a place where people can play + +import Cocoa +import ProgressKit +import PlaygroundSupport + +/** + This playground has examples of how to use the UI components. + Enable the assistant editor in Xcode and uncomment + the PlaygroundPage.current.liveView code path for each + component to see it in action. + + Modify to test behavior, change colors etc. + */ + +PlaygroundPage.current.needsIndefiniteExecution = true + +let circularProgress : CircularProgressView = { + let _circularProgressView = CircularProgressView(frame: NSRect(x: 0, y: 0, width: 144, height: 144)) + _circularProgressView.progressLayer.borderWidth = 10 + _circularProgressView.progress = 0.5 //half way + return _circularProgressView +}() +//PlaygroundPage.current.liveView = circularProgress + +let crawler : Crawler = { + //Crawler + let _crawler = Crawler(frame: NSRect(x: 0, y: 0, width: 44, height: 44)) + _crawler.startAnimation() + return _crawler +}() +//PlaygroundPage.current.liveView = crawler + +let materialProgress : MaterialProgress = { + //Material Progress + let _materialProgress = MaterialProgress(frame: NSRect(x: 0, y: 0, width: 144, height: 144)) + _materialProgress.animate = true + return _materialProgress +}() +//PlaygroundPage.current.liveView = materialProgress + +let progressBar : ProgressBar = { + //Progress Bar + let _progressBar = ProgressBar(frame: NSRect(x: 0, y: 0, width: 320, height: 22)) + _progressBar.progress = 0.5 + return _progressBar +}() +//PlaygroundPage.current.liveView = progressBar + +let rainbow : Rainbow = { + //Rainbow Progress + let _rainbow = Rainbow(frame: NSRect(x: 0, y: 0, width: 100, height: 100)) + _rainbow.animate = true + return _rainbow +}() +//PlaygroundPage.current.liveView = rainbow + +let shootingStars : ShootingStars = { + //Rotating Arc + let _shootingStars = ShootingStars(frame: NSRect(x: 0, y: 0, width: 460, height: 10)) + _shootingStars.animate = true + return _shootingStars +}() +//PlaygroundPage.current.liveView = shootingStars + +let spinner : Spinner = { + //Spinner + let _spinner = Spinner(frame: NSRect(x: 0, y: 0, width: 100, height: 100)) + _spinner.animate = true + return _spinner +}() + +//PlaygroundPage.current.liveView = spinner + + + diff --git a/Demo/Demo-macOS.playground/contents.xcplayground b/Demo/Demo-macOS.playground/contents.xcplayground new file mode 100644 index 0000000..63b6dd8 --- /dev/null +++ b/Demo/Demo-macOS.playground/contents.xcplayground @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Demo/Demo-macOS.playground/playground.xcworkspace/contents.xcworkspacedata b/Demo/Demo-macOS.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Demo/Demo-macOS.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Demo/Demo-macOS.playground/timeline.xctimeline b/Demo/Demo-macOS.playground/timeline.xctimeline new file mode 100644 index 0000000..05a0627 --- /dev/null +++ b/Demo/Demo-macOS.playground/timeline.xctimeline @@ -0,0 +1,11 @@ + + + + + + + diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..841cb5c --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:4.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ProgressKit", + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "ProgressKit", + targets: ["ProgressKit"]), + ], + 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: "ProgressKit", + dependencies: []), + .testTarget( + name: "ProgressKitTests", + dependencies: ["ProgressKit"]), + ] +) diff --git a/ProgressKit.xcodeproj/ProgressKitTests_Info.plist b/ProgressKit.xcodeproj/ProgressKitTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/ProgressKit.xcodeproj/ProgressKitTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/ProgressKit.xcodeproj/ProgressKit_Info.plist b/ProgressKit.xcodeproj/ProgressKit_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/ProgressKit.xcodeproj/ProgressKit_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/ProgressKit.xcodeproj/project.pbxproj b/ProgressKit.xcodeproj/project.pbxproj index 8be947e..1946931 100644 --- a/ProgressKit.xcodeproj/project.pbxproj +++ b/ProgressKit.xcodeproj/project.pbxproj @@ -6,74 +6,86 @@ objectVersion = 46; objects = { +/* Begin PBXAggregateTarget section */ + "ProgressKit::ProgressKitPackageTests::ProductTarget" /* ProgressKitPackageTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = OBJ_56 /* Build configuration list for PBXAggregateTarget "ProgressKitPackageTests" */; + buildPhases = ( + ); + dependencies = ( + OBJ_59 /* PBXTargetDependency */, + ); + name = ProgressKitPackageTests; + productName = ProgressKitPackageTests; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ - E31617A61BC0596C007AD70F /* BaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E31617A51BC0596C007AD70F /* BaseView.swift */; }; - E340FDB81BDE45F000CE6550 /* RotatingArc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E340FDB71BDE45F000CE6550 /* RotatingArc.swift */; }; - E35D1C6C1B676889001DBAF2 /* Spinner.swift in Sources */ = {isa = PBXBuildFile; fileRef = E35D1C6B1B676889001DBAF2 /* Spinner.swift */; }; - E37568DF1B6AAB530073E26F /* ProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = E37568DE1B6AAB530073E26F /* ProgressBar.swift */; }; - E3918F811B4E88CF00558DAB /* CircularProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918F801B4E88CF00558DAB /* CircularProgressView.swift */; }; - E3918F841B4E88DE00558DAB /* MaterialProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918F821B4E88DE00558DAB /* MaterialProgress.swift */; }; - E3918F851B4E88DE00558DAB /* ShootingStars.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918F831B4E88DE00558DAB /* ShootingStars.swift */; }; - E3918F8D1B4E8AB100558DAB /* IndeterminateAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918F8C1B4E8AB100558DAB /* IndeterminateAnimation.swift */; }; - E3918F8F1B4E8C2900558DAB /* DeterminateAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918F8E1B4E8C2900558DAB /* DeterminateAnimation.swift */; }; - E3918FA81B4ECF7100558DAB /* Rainbow.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3918FA71B4ECF7100558DAB /* Rainbow.swift */; }; - E3A468521B5434F7006DDE31 /* Crawler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3A468511B5434F7006DDE31 /* Crawler.swift */; }; - E3AD65D81B426758009541CD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3AD65D71B426758009541CD /* AppDelegate.swift */; }; - E3AD65DA1B426758009541CD /* DeterminateVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3AD65D91B426758009541CD /* DeterminateVC.swift */; }; - E3AD65DF1B426758009541CD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E3AD65DD1B426758009541CD /* Main.storyboard */; }; - E3AD65EB1B426758009541CD /* ProgressKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3AD65EA1B426758009541CD /* ProgressKitTests.swift */; }; - E3AD65F71B427511009541CD /* InDeterminateVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3AD65F61B427511009541CD /* InDeterminateVC.swift */; }; - E3CCD59A1BBC2B9B00F7DB9A /* ProgressUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3CCD5991BBC2B9B00F7DB9A /* ProgressUtils.swift */; }; + OBJ_33 /* ProgressKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_23 /* ProgressKitTests.swift */; }; + OBJ_35 /* ProgressKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "ProgressKit::ProgressKit::Product" /* ProgressKit.framework */; }; + OBJ_42 /* BaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* BaseView.swift */; }; + OBJ_43 /* CircularProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* CircularProgressView.swift */; }; + OBJ_44 /* Crawler.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Crawler.swift */; }; + OBJ_45 /* DeterminateAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* DeterminateAnimation.swift */; }; + OBJ_46 /* IndeterminateAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* IndeterminateAnimation.swift */; }; + OBJ_47 /* MaterialProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* MaterialProgress.swift */; }; + OBJ_48 /* ProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_15 /* ProgressBar.swift */; }; + OBJ_49 /* ProgressUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_16 /* ProgressUtils.swift */; }; + OBJ_50 /* Rainbow.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_17 /* Rainbow.swift */; }; + OBJ_51 /* RotatingArc.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_18 /* RotatingArc.swift */; }; + OBJ_52 /* ShootingStars.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_19 /* ShootingStars.swift */; }; + OBJ_53 /* Spinner.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_20 /* Spinner.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - E3AD65E51B426758009541CD /* PBXContainerItemProxy */ = { + 6623CECC1F2B61A90062B339 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = E3AD65CA1B426758009541CD /* Project object */; + containerPortal = OBJ_1 /* Project object */; proxyType = 1; - remoteGlobalIDString = E3AD65D11B426758009541CD; + remoteGlobalIDString = "ProgressKit::ProgressKit"; remoteInfo = ProgressKit; }; + 6623CECD1F2B61A90062B339 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "ProgressKit::ProgressKitTests"; + remoteInfo = ProgressKitTests; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - E310B1D21D7AB2D4008DEF62 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; - E310B1D41D7AB2EA008DEF62 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; }; - E31617A51BC0596C007AD70F /* BaseView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseView.swift; sourceTree = ""; }; - E340FDB71BDE45F000CE6550 /* RotatingArc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RotatingArc.swift; path = InDeterminate/RotatingArc.swift; sourceTree = ""; }; - E35D1C6B1B676889001DBAF2 /* Spinner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Spinner.swift; path = InDeterminate/Spinner.swift; sourceTree = ""; }; - E37568DE1B6AAB530073E26F /* ProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ProgressBar.swift; path = Determinate/ProgressBar.swift; sourceTree = ""; }; - E3918F801B4E88CF00558DAB /* CircularProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CircularProgressView.swift; path = Determinate/CircularProgressView.swift; sourceTree = ""; }; - E3918F821B4E88DE00558DAB /* MaterialProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MaterialProgress.swift; path = InDeterminate/MaterialProgress.swift; sourceTree = ""; }; - E3918F831B4E88DE00558DAB /* ShootingStars.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ShootingStars.swift; path = InDeterminate/ShootingStars.swift; sourceTree = ""; }; - E3918F8C1B4E8AB100558DAB /* IndeterminateAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = IndeterminateAnimation.swift; path = InDeterminate/IndeterminateAnimation.swift; sourceTree = ""; }; - E3918F8E1B4E8C2900558DAB /* DeterminateAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DeterminateAnimation.swift; path = Determinate/DeterminateAnimation.swift; sourceTree = ""; }; - E3918FA71B4ECF7100558DAB /* Rainbow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Rainbow.swift; path = InDeterminate/Rainbow.swift; sourceTree = ""; }; - E3A468511B5434F7006DDE31 /* Crawler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Crawler.swift; path = InDeterminate/Crawler.swift; sourceTree = ""; }; - E3AD65D21B426758009541CD /* ProgressKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProgressKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E3AD65D61B426758009541CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E3AD65D71B426758009541CD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E3AD65D91B426758009541CD /* DeterminateVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeterminateVC.swift; sourceTree = ""; }; - E3AD65DE1B426758009541CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - E3AD65E41B426758009541CD /* ProgressKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProgressKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - E3AD65E91B426758009541CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E3AD65EA1B426758009541CD /* ProgressKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressKitTests.swift; sourceTree = ""; }; - E3AD65F61B427511009541CD /* InDeterminateVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InDeterminateVC.swift; sourceTree = ""; }; - E3CCD5971BBC19ED00F7DB9A /* ProgressKit.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ProgressKit.podspec; sourceTree = SOURCE_ROOT; }; - E3CCD5991BBC2B9B00F7DB9A /* ProgressUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProgressUtils.swift; sourceTree = SOURCE_ROOT; }; + 66C5DA851F2BC7FD00B2BA40 /* Demo-macOS.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = "Demo-macOS.playground"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + OBJ_10 /* CircularProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularProgressView.swift; sourceTree = ""; }; + OBJ_11 /* Crawler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Crawler.swift; sourceTree = ""; }; + OBJ_12 /* DeterminateAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeterminateAnimation.swift; sourceTree = ""; }; + OBJ_13 /* IndeterminateAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndeterminateAnimation.swift; sourceTree = ""; }; + OBJ_14 /* MaterialProgress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaterialProgress.swift; sourceTree = ""; }; + OBJ_15 /* ProgressBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressBar.swift; sourceTree = ""; }; + OBJ_16 /* ProgressUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressUtils.swift; sourceTree = ""; }; + OBJ_17 /* Rainbow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Rainbow.swift; sourceTree = ""; }; + OBJ_18 /* RotatingArc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RotatingArc.swift; sourceTree = ""; }; + OBJ_19 /* ShootingStars.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShootingStars.swift; sourceTree = ""; }; + OBJ_20 /* Spinner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Spinner.swift; sourceTree = ""; }; + OBJ_23 /* ProgressKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressKitTests.swift; sourceTree = ""; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_9 /* BaseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseView.swift; sourceTree = ""; }; + "ProgressKit::ProgressKit::Product" /* ProgressKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ProgressKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + "ProgressKit::ProgressKitTests::Product" /* ProgressKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = ProgressKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - E3AD65CF1B426758009541CD /* Frameworks */ = { + OBJ_34 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( + OBJ_35 /* ProgressKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E3AD65E11B426758009541CD /* Frameworks */ = { + OBJ_54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -81,102 +93,89 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - E316CCAA1B4E8633005A9A31 /* Indeterminate */ = { + 667419711F2B9DF1001F9A21 /* Demo */ = { isa = PBXGroup; children = ( - E3918F8C1B4E8AB100558DAB /* IndeterminateAnimation.swift */, - E3918F821B4E88DE00558DAB /* MaterialProgress.swift */, - E3918FA71B4ECF7100558DAB /* Rainbow.swift */, - E3A468511B5434F7006DDE31 /* Crawler.swift */, - E3918F831B4E88DE00558DAB /* ShootingStars.swift */, - E35D1C6B1B676889001DBAF2 /* Spinner.swift */, - E340FDB71BDE45F000CE6550 /* RotatingArc.swift */, + 66C5DA851F2BC7FD00B2BA40 /* Demo-macOS.playground */, ); - name = Indeterminate; + path = Demo; sourceTree = ""; }; - E316CCAB1B4E8642005A9A31 /* Determinate */ = { + OBJ_21 /* Tests */ = { isa = PBXGroup; children = ( - E3918F8E1B4E8C2900558DAB /* DeterminateAnimation.swift */, - E3918F801B4E88CF00558DAB /* CircularProgressView.swift */, - E37568DE1B6AAB530073E26F /* ProgressBar.swift */, + OBJ_22 /* ProgressKitTests */, ); - name = Determinate; - sourceTree = ""; + name = Tests; + sourceTree = SOURCE_ROOT; }; - E3AD65C91B426758009541CD = { + OBJ_22 /* ProgressKitTests */ = { isa = PBXGroup; children = ( - E31617A51BC0596C007AD70F /* BaseView.swift */, - E316CCAA1B4E8633005A9A31 /* Indeterminate */, - E316CCAB1B4E8642005A9A31 /* Determinate */, - E3AD65D41B426758009541CD /* ProgressKit */, - E3AD65E71B426758009541CD /* ProgressKitTests */, - E3AD65D31B426758009541CD /* Products */, + OBJ_23 /* ProgressKitTests.swift */, ); - sourceTree = ""; + name = ProgressKitTests; + path = Tests/ProgressKitTests; + sourceTree = SOURCE_ROOT; }; - E3AD65D31B426758009541CD /* Products */ = { + OBJ_25 /* Products */ = { isa = PBXGroup; children = ( - E3AD65D21B426758009541CD /* ProgressKit.app */, - E3AD65E41B426758009541CD /* ProgressKitTests.xctest */, + "ProgressKit::ProgressKitTests::Product" /* ProgressKitTests.xctest */, + "ProgressKit::ProgressKit::Product" /* ProgressKit.framework */, ); name = Products; - sourceTree = ""; + sourceTree = BUILT_PRODUCTS_DIR; }; - E3AD65D41B426758009541CD /* ProgressKit */ = { + OBJ_5 = { isa = PBXGroup; children = ( - E3AD65D71B426758009541CD /* AppDelegate.swift */, - E3AD65D91B426758009541CD /* DeterminateVC.swift */, - E3AD65F61B427511009541CD /* InDeterminateVC.swift */, - E3AD65DD1B426758009541CD /* Main.storyboard */, - E3AD65D51B426758009541CD /* Supporting Files */, + OBJ_6 /* Package.swift */, + 667419711F2B9DF1001F9A21 /* Demo */, + OBJ_7 /* Sources */, + OBJ_21 /* Tests */, + OBJ_25 /* Products */, ); - path = ProgressKit; sourceTree = ""; }; - E3AD65D51B426758009541CD /* Supporting Files */ = { + OBJ_7 /* Sources */ = { isa = PBXGroup; children = ( - E310B1D21D7AB2D4008DEF62 /* README.md */, - E310B1D41D7AB2EA008DEF62 /* LICENSE */, - E3CCD5991BBC2B9B00F7DB9A /* ProgressUtils.swift */, - E3CCD5971BBC19ED00F7DB9A /* ProgressKit.podspec */, - E3AD65D61B426758009541CD /* Info.plist */, + OBJ_8 /* ProgressKit */, ); - name = "Supporting Files"; - sourceTree = ""; - }; - E3AD65E71B426758009541CD /* ProgressKitTests */ = { - isa = PBXGroup; - children = ( - E3AD65EA1B426758009541CD /* ProgressKitTests.swift */, - E3AD65E81B426758009541CD /* Supporting Files */, - ); - path = ProgressKitTests; - sourceTree = ""; + name = Sources; + sourceTree = SOURCE_ROOT; }; - E3AD65E81B426758009541CD /* Supporting Files */ = { + OBJ_8 /* ProgressKit */ = { isa = PBXGroup; children = ( - E3AD65E91B426758009541CD /* Info.plist */, + OBJ_9 /* BaseView.swift */, + OBJ_10 /* CircularProgressView.swift */, + OBJ_11 /* Crawler.swift */, + OBJ_12 /* DeterminateAnimation.swift */, + OBJ_13 /* IndeterminateAnimation.swift */, + OBJ_14 /* MaterialProgress.swift */, + OBJ_15 /* ProgressBar.swift */, + OBJ_16 /* ProgressUtils.swift */, + OBJ_17 /* Rainbow.swift */, + OBJ_18 /* RotatingArc.swift */, + OBJ_19 /* ShootingStars.swift */, + OBJ_20 /* Spinner.swift */, ); - name = "Supporting Files"; - sourceTree = ""; + name = ProgressKit; + path = Sources/ProgressKit; + sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - E3AD65D11B426758009541CD /* ProgressKit */ = { + "ProgressKit::ProgressKit" /* ProgressKit */ = { isa = PBXNativeTarget; - buildConfigurationList = E3AD65EE1B426758009541CD /* Build configuration list for PBXNativeTarget "ProgressKit" */; + buildConfigurationList = OBJ_38 /* Build configuration list for PBXNativeTarget "ProgressKit" */; buildPhases = ( - E3AD65CE1B426758009541CD /* Sources */, - E3AD65CF1B426758009541CD /* Frameworks */, - E3AD65D01B426758009541CD /* Resources */, + OBJ_41 /* Sources */, + OBJ_54 /* Frameworks */, + 6623CEDB1F2B62900062B339 /* Resources */, ); buildRules = ( ); @@ -184,78 +183,55 @@ ); name = ProgressKit; productName = ProgressKit; - productReference = E3AD65D21B426758009541CD /* ProgressKit.app */; - productType = "com.apple.product-type.application"; + productReference = "ProgressKit::ProgressKit::Product" /* ProgressKit.framework */; + productType = "com.apple.product-type.framework"; }; - E3AD65E31B426758009541CD /* ProgressKitTests */ = { + "ProgressKit::ProgressKitTests" /* ProgressKitTests */ = { isa = PBXNativeTarget; - buildConfigurationList = E3AD65F11B426758009541CD /* Build configuration list for PBXNativeTarget "ProgressKitTests" */; + buildConfigurationList = OBJ_29 /* Build configuration list for PBXNativeTarget "ProgressKitTests" */; buildPhases = ( - E3AD65E01B426758009541CD /* Sources */, - E3AD65E11B426758009541CD /* Frameworks */, - E3AD65E21B426758009541CD /* Resources */, + OBJ_32 /* Sources */, + OBJ_34 /* Frameworks */, ); buildRules = ( ); dependencies = ( - E3AD65E61B426758009541CD /* PBXTargetDependency */, + OBJ_36 /* PBXTargetDependency */, ); name = ProgressKitTests; productName = ProgressKitTests; - productReference = E3AD65E41B426758009541CD /* ProgressKitTests.xctest */; + productReference = "ProgressKit::ProgressKitTests::Product" /* ProgressKitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - E3AD65CA1B426758009541CD /* Project object */ = { + OBJ_1 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftMigration = 0700; - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; - ORGANIZATIONNAME = "Kauntey Suryawanshi"; - TargetAttributes = { - E3AD65D11B426758009541CD = { - CreatedOnToolsVersion = 6.3.2; - LastSwiftMigration = 0800; - }; - E3AD65E31B426758009541CD = { - CreatedOnToolsVersion = 6.3.2; - LastSwiftMigration = 0800; - TestTargetID = E3AD65D11B426758009541CD; - }; - }; + LastUpgradeCheck = 0900; }; - buildConfigurationList = E3AD65CD1B426758009541CD /* Build configuration list for PBXProject "ProgressKit" */; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "ProgressKit" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, - Base, ); - mainGroup = E3AD65C91B426758009541CD; - productRefGroup = E3AD65D31B426758009541CD /* Products */; + mainGroup = OBJ_5; + productRefGroup = OBJ_25 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - E3AD65D11B426758009541CD /* ProgressKit */, - E3AD65E31B426758009541CD /* ProgressKitTests */, + "ProgressKit::ProgressKitTests" /* ProgressKitTests */, + "ProgressKit::ProgressKit" /* ProgressKit */, + "ProgressKit::ProgressKitPackageTests::ProductTarget" /* ProgressKitPackageTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - E3AD65D01B426758009541CD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E3AD65DF1B426758009541CD /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E3AD65E21B426758009541CD /* Resources */ = { + 6623CEDB1F2B62900062B339 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -265,241 +241,270 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - E3AD65CE1B426758009541CD /* Sources */ = { + OBJ_32 /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - E3A468521B5434F7006DDE31 /* Crawler.swift in Sources */, - E3AD65DA1B426758009541CD /* DeterminateVC.swift in Sources */, - E3918F8D1B4E8AB100558DAB /* IndeterminateAnimation.swift in Sources */, - E3AD65F71B427511009541CD /* InDeterminateVC.swift in Sources */, - E3918F851B4E88DE00558DAB /* ShootingStars.swift in Sources */, - E3918F811B4E88CF00558DAB /* CircularProgressView.swift in Sources */, - E35D1C6C1B676889001DBAF2 /* Spinner.swift in Sources */, - E3918F841B4E88DE00558DAB /* MaterialProgress.swift in Sources */, - E3AD65D81B426758009541CD /* AppDelegate.swift in Sources */, - E37568DF1B6AAB530073E26F /* ProgressBar.swift in Sources */, - E340FDB81BDE45F000CE6550 /* RotatingArc.swift in Sources */, - E3CCD59A1BBC2B9B00F7DB9A /* ProgressUtils.swift in Sources */, - E31617A61BC0596C007AD70F /* BaseView.swift in Sources */, - E3918FA81B4ECF7100558DAB /* Rainbow.swift in Sources */, - E3918F8F1B4E8C2900558DAB /* DeterminateAnimation.swift in Sources */, + OBJ_33 /* ProgressKitTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - E3AD65E01B426758009541CD /* Sources */ = { + OBJ_41 /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - E3AD65EB1B426758009541CD /* ProgressKitTests.swift in Sources */, + OBJ_42 /* BaseView.swift in Sources */, + OBJ_43 /* CircularProgressView.swift in Sources */, + OBJ_44 /* Crawler.swift in Sources */, + OBJ_45 /* DeterminateAnimation.swift in Sources */, + OBJ_46 /* IndeterminateAnimation.swift in Sources */, + OBJ_47 /* MaterialProgress.swift in Sources */, + OBJ_48 /* ProgressBar.swift in Sources */, + OBJ_49 /* ProgressUtils.swift in Sources */, + OBJ_50 /* Rainbow.swift in Sources */, + OBJ_51 /* RotatingArc.swift in Sources */, + OBJ_52 /* ShootingStars.swift in Sources */, + OBJ_53 /* Spinner.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - E3AD65E61B426758009541CD /* PBXTargetDependency */ = { + OBJ_36 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = E3AD65D11B426758009541CD /* ProgressKit */; - targetProxy = E3AD65E51B426758009541CD /* PBXContainerItemProxy */; + target = "ProgressKit::ProgressKit" /* ProgressKit */; + targetProxy = 6623CECC1F2B61A90062B339 /* PBXContainerItemProxy */; }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - E3AD65DD1B426758009541CD /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - E3AD65DE1B426758009541CD /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; + OBJ_59 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "ProgressKit::ProgressKitTests" /* ProgressKitTests */; + targetProxy = 6623CECD1F2B61A90062B339 /* PBXContainerItemProxy */; }; -/* End PBXVariantGroup section */ +/* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - E3AD65EC1B426758009541CD /* Debug */ = { + OBJ_3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; + }; + name = Debug; + }; + OBJ_30 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = ProgressKit.xcodeproj/ProgressKitTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = ProgressKitTests; + }; + name = Debug; + }; + OBJ_31 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = ProgressKit.xcodeproj/ProgressKitTests_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + TARGET_NAME = ProgressKitTests; + }; + name = Release; + }; + OBJ_39 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = ProgressKit.xcodeproj/ProgressKit_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = ProgressKit; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + TARGET_NAME = ProgressKit; }; name = Debug; }; - E3AD65ED1B426758009541CD /* Release */ = { + OBJ_4 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; + DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = s; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; - MTL_ENABLE_DEBUG_INFO = NO; + OTHER_SWIFT_FLAGS = "-DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - }; - name = Release; - }; - E3AD65EF1B426758009541CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = ProgressKit/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; + USE_HEADERMAP = NO; }; - name = Debug; + name = Release; }; - E3AD65F01B426758009541CD /* Release */ = { + OBJ_40 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = ProgressKit/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + APPLICATION_EXTENSION_API_ONLY = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = ProgressKit.xcodeproj/ProgressKit_Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = ProgressKit; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + TARGET_NAME = ProgressKit; }; name = Release; }; - E3AD65F21B426758009541CD /* Debug */ = { + OBJ_57 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = ProgressKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProgressKit.app/Contents/MacOS/ProgressKit"; }; name = Debug; }; - E3AD65F31B426758009541CD /* Release */ = { + OBJ_58 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - INFOPLIST_FILE = ProgressKitTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.kaunteya.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ProgressKit.app/Contents/MacOS/ProgressKit"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - E3AD65CD1B426758009541CD /* Build configuration list for PBXProject "ProgressKit" */ = { + OBJ_2 /* Build configuration list for PBXProject "ProgressKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + OBJ_29 /* Build configuration list for PBXNativeTarget "ProgressKitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - E3AD65EC1B426758009541CD /* Debug */, - E3AD65ED1B426758009541CD /* Release */, + OBJ_30 /* Debug */, + OBJ_31 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; - E3AD65EE1B426758009541CD /* Build configuration list for PBXNativeTarget "ProgressKit" */ = { + OBJ_38 /* Build configuration list for PBXNativeTarget "ProgressKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - E3AD65EF1B426758009541CD /* Debug */, - E3AD65F01B426758009541CD /* Release */, + OBJ_39 /* Debug */, + OBJ_40 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; - E3AD65F11B426758009541CD /* Build configuration list for PBXNativeTarget "ProgressKitTests" */ = { + OBJ_56 /* Build configuration list for PBXAggregateTarget "ProgressKitPackageTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - E3AD65F21B426758009541CD /* Debug */, - E3AD65F31B426758009541CD /* Release */, + OBJ_57 /* Debug */, + OBJ_58 /* Release */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; + defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; - rootObject = E3AD65CA1B426758009541CD /* Project object */; + rootObject = OBJ_1 /* Project object */; } diff --git a/ProgressKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ProgressKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata index ad780a9..919434a 100644 --- a/ProgressKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ProgressKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ProgressKit.xcodeproj/xcshareddata/xcschemes/ProgressKit-Package.xcscheme b/ProgressKit.xcodeproj/xcshareddata/xcschemes/ProgressKit-Package.xcscheme new file mode 100644 index 0000000..39fc860 --- /dev/null +++ b/ProgressKit.xcodeproj/xcshareddata/xcschemes/ProgressKit-Package.xcscheme @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProgressKit.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/ProgressKit.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..0c80a0f --- /dev/null +++ b/ProgressKit.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -0,0 +1,12 @@ + + + + SchemeUserState + + ProgressKit-Package.xcscheme + + + SuppressBuildableAutocreation + + + diff --git a/ProgressKit.xcworkspace/contents.xcworkspacedata b/ProgressKit.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b38407e --- /dev/null +++ b/ProgressKit.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ProgressKit/AppDelegate.swift b/ProgressKit/AppDelegate.swift deleted file mode 100644 index af6ab4f..0000000 --- a/ProgressKit/AppDelegate.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// AppDelegate.swift -// ProgressKit -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Cocoa - -@NSApplicationMain -class AppDelegate: NSObject, NSApplicationDelegate { - - func applicationDidFinishLaunching(_ aNotification: Notification) { - // Insert code here to initialize your application - } - - func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } - -} diff --git a/ProgressKit/Base.lproj/Main.storyboard b/ProgressKit/Base.lproj/Main.storyboard deleted file mode 100644 index cf37393..0000000 --- a/ProgressKit/Base.lproj/Main.storyboard +++ /dev/null @@ -1,1493 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ProgressKit/Determinate.swift b/ProgressKit/Determinate.swift deleted file mode 100644 index 9701d55..0000000 --- a/ProgressKit/Determinate.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// ViewController.swift -// ProgressKit -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Cocoa - -class DeterminateViewController: NSViewController { - - dynamic var liveProgress: Bool = true - dynamic var labelPercentage: String = "30%" - - @IBOutlet weak var circularView1: CircularProgressView! - @IBOutlet weak var circularView2: CircularProgressView! - @IBOutlet weak var circularView3: CircularProgressView! - @IBOutlet weak var circularView4: CircularProgressView! - @IBOutlet weak var circularView5: CircularProgressView! - @IBOutlet weak var slider: NSSlider! - - @IBAction func sliderDragged(sender: NSSlider) { - - let event = NSApplication.sharedApplication().currentEvent - let dragStart = event!.type == NSEventType.LeftMouseDown - let dragEnd = event!.type == NSEventType.LeftMouseUp - let dragging = event!.type == NSEventType.LeftMouseDragged - - if liveProgress || dragEnd { - setProgress(CGFloat(sender.floatValue)) - } - labelPercentage = "\(Int(sender.floatValue * 100))%" - } - - func setProgress(progress: CGFloat) { - circularView1.setProgressValue(progress, animated: true) - circularView2.setProgressValue(progress, animated: true) - circularView3.setProgressValue(progress, animated: true) - circularView4.setProgressValue(progress, animated: true) - circularView5.setProgressValue(progress, animated: false) - } - - override func viewDidLoad() { - preferredContentSize = NSMakeSize(500, 500) - } -} - diff --git a/ProgressKit/DeterminateVC.swift b/ProgressKit/DeterminateVC.swift deleted file mode 100644 index f709be6..0000000 --- a/ProgressKit/DeterminateVC.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// ViewController.swift -// ProgressKit -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Cocoa - -class DeterminateViewController: NSViewController { - - dynamic var liveProgress: Bool = true - dynamic var labelPercentage: String = "30%" - - override func viewDidLoad() { - preferredContentSize = NSMakeSize(500, 300) - } - - @IBOutlet weak var slider: NSSlider! - - @IBAction func sliderDragged(_ sender: NSSlider) { - - let event = NSApplication.shared().currentEvent -// let dragStart = event!.type == NSEventType.LeftMouseDown - let dragEnd = event!.type == NSEventType.leftMouseUp -// let dragging = event!.type == NSEventType.LeftMouseDragged - - if liveProgress || dragEnd { - setProgress(CGFloat(sender.floatValue)) - } - labelPercentage = "\(Int(sender.floatValue * 100))%" - } - - func setProgress(_ progress: CGFloat) { - for view in self.view.subviews { - if view is DeterminateAnimation { - (view as! DeterminateAnimation).progress = progress - } - } - } - -} - diff --git a/ProgressKit/InDeterminate.swift b/ProgressKit/InDeterminate.swift deleted file mode 100644 index ce7e8c4..0000000 --- a/ProgressKit/InDeterminate.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// WhatsAppCircular.swift -// ProgressKit -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Foundation -import Cocoa - -class InDeterminateViewController: NSViewController { - @IBOutlet weak var doing1: DoingCircular! - @IBOutlet weak var doing2: DoingCircular! - @IBOutlet weak var doing3: DoingCircular! - @IBOutlet weak var doing4: DoingCircular! - - override func viewDidLoad() { - preferredContentSize = NSMakeSize(500, 500) - } - - @IBAction func startStopAnimation(sender: NSButton) { - let isOn = sender.state == NSOnState - doing1.animate = isOn - doing2.animate = isOn - doing3.animate = isOn - doing4.animate = isOn - } -} \ No newline at end of file diff --git a/ProgressKit/InDeterminateVC.swift b/ProgressKit/InDeterminateVC.swift deleted file mode 100644 index 2da1401..0000000 --- a/ProgressKit/InDeterminateVC.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// WhatsAppCircular.swift -// ProgressKit -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Foundation -import Cocoa - -class InDeterminateViewController: NSViewController { - - override func viewDidAppear() { - for view in self.view.subviews { - (view as? IndeterminateAnimation)?.animate = true - } - } - - override func viewWillDisappear() { - for view in self.view.subviews { - (view as? IndeterminateAnimation)?.animate = false - } - } -} diff --git a/ProgressKit/Info.plist b/ProgressKit/Info.plist deleted file mode 100644 index cc1bfd5..0000000 --- a/ProgressKit/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - Copyright © 2015 Kauntey Suryawanshi. All rights reserved. - NSMainStoryboardFile - Main - NSPrincipalClass - NSApplication - - diff --git a/ProgressKitTests/Info.plist b/ProgressKitTests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/ProgressKitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ProgressKitTests/ProgressKitTests.swift b/ProgressKitTests/ProgressKitTests.swift deleted file mode 100644 index 1290724..0000000 --- a/ProgressKitTests/ProgressKitTests.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// ProgressKitTests.swift -// ProgressKitTests -// -// Created by Kauntey Suryawanshi on 30/06/15. -// Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. -// - -import Cocoa -import XCTest - -class ProgressKitTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - } - -} diff --git a/README.md b/README.md index 4bc530e..0f0c3ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -![ProgressKit Banner](/Images/banner.gif) +![ProgressKit Banner](Images/banner.gif) [![Cocoapods Compatible](https://img.shields.io/cocoapods/v/ProgressKit.svg)](https://img.shields.io/cocoapods/v/ProgressKit.svg) [![Platform](https://img.shields.io/cocoapods/p/ProgressKit.svg?style=flat)](http://cocoadocs.org/docsets/ProgressKit) @@ -25,6 +25,10 @@ You can now make spinners, progress bar, crawlers etc, which can be finely custo - [Progress Bar](#progress-bar) - [License](#license) +# Minimum Requirments + +``` macOS 10.10 or later. ``` + # Installation ##CocoaPods [CocoaPods](http://cocoapods.org) adds supports for Swift and embedded frameworks. @@ -47,6 +51,27 @@ Then, run the following command: ```bash $ pod install ``` + +##Carthage + +add to your ```Cartfile``` : + +``` github kaunteya/ProgressKit ``` + +##Swift Package Manager + +add to ``` Package.swift``` : + +``` +import PackageDescription + +let package = Package( + name: "myProject", + dependencies: [ + .Package(url: "https://github.com/kaunteya/ProgressKit.git", majorVersion: 0, minor: 5) + ]) +``` + # Usage - Drag a View at desired location in `XIB` or `Storyboard` @@ -61,36 +86,36 @@ $ pod install # Indeterminate Progress -![Indeterminate](/Images/indeterminate.gif) +![Indeterminate](Images/indeterminate.gif) Progress indicators which animate indefinately are `Indeterminate Progress` Views. This are the set of Indeterminate Progress Indicators. ## MaterialProgress -![CircularSnail](/Images/CircularSnail.gif) +![CircularSnail](Images/CircularSnail.gif) ## Rainbow -![Rainbow](/Images/Rainbow.gif) +![Rainbow](Images/Rainbow.gif) ## Crawler -![Crawler](/Images/Crawler.gif) +![Crawler](Images/Crawler.gif) ## Spinner -![Spinner](/Images/Spinner.gif) +![Spinner](Images/Spinner.gif) ## Shooting Stars -![Shooting Stars](/Images/ShootingStars.gif) +![Shooting Stars](Images/ShootingStars.gif) ## Rotating Arc -![Rotating Arc](/Images/RotatingArc.gif) +![Rotating Arc](Images/RotatingArc.gif) # Determinate Progress Determinate progress views can be used for tasks whos progress can be seen and determined. ## Circular Progress -![Circular Progress](/Images/CircularProgress.png) +![Circular Progress](Images/CircularProgress.png) ## Progress Bar -![Progress Bar](/Images/ProgressBar.png) +![Progress Bar](Images/ProgressBar.png) # License `ProgressKit` is released under the MIT license. See LICENSE for details. diff --git a/Sources/.DS_Store b/Sources/.DS_Store new file mode 100644 index 0000000..49e8362 Binary files /dev/null and b/Sources/.DS_Store differ diff --git a/Sources/ProgressKit/.DS_Store b/Sources/ProgressKit/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/Sources/ProgressKit/.DS_Store differ diff --git a/BaseView.swift b/Sources/ProgressKit/BaseView.swift similarity index 98% rename from BaseView.swift rename to Sources/ProgressKit/BaseView.swift index 5eef7cf..dee0dbb 100644 --- a/BaseView.swift +++ b/Sources/ProgressKit/BaseView.swift @@ -6,6 +6,7 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) import AppKit @IBDesignable @@ -51,3 +52,8 @@ open class BaseView : NSView { self.layer?.cornerRadius = cornerRadius } } + +#endif + + + diff --git a/Determinate/CircularProgressView.swift b/Sources/ProgressKit/CircularProgressView.swift similarity index 99% rename from Determinate/CircularProgressView.swift rename to Sources/ProgressKit/CircularProgressView.swift index 27f25dc..cb146a9 100644 --- a/Determinate/CircularProgressView.swift +++ b/Sources/ProgressKit/CircularProgressView.swift @@ -7,6 +7,9 @@ // import Foundation + +#if os(OSX) + import Cocoa @IBDesignable @@ -102,3 +105,5 @@ open class CircularProgressView: DeterminateAnimation { } } } + +#endif diff --git a/InDeterminate/Crawler.swift b/Sources/ProgressKit/Crawler.swift similarity index 95% rename from InDeterminate/Crawler.swift rename to Sources/ProgressKit/Crawler.swift index d58be53..9b8a127 100644 --- a/InDeterminate/Crawler.swift +++ b/Sources/ProgressKit/Crawler.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Foundation import Cocoa @@ -65,16 +67,16 @@ open class Crawler: IndeterminateAnimation { } } - override func startAnimation() { + public override func startAnimation() { for (index, star) in starList.enumerated() { star.add(animationGroups[index], forKey: "") } } - override func stopAnimation() { + public override func stopAnimation() { for star in starList { star.removeAllAnimations() } } } - +#endif diff --git a/Determinate/DeterminateAnimation.swift b/Sources/ProgressKit/DeterminateAnimation.swift similarity index 96% rename from Determinate/DeterminateAnimation.swift rename to Sources/ProgressKit/DeterminateAnimation.swift index d41fa69..5192b82 100644 --- a/Determinate/DeterminateAnimation.swift +++ b/Sources/ProgressKit/DeterminateAnimation.swift @@ -5,6 +5,7 @@ // Created by Kauntey Suryawanshi on 09/07/15. // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) import Foundation import Cocoa @@ -30,3 +31,5 @@ open class DeterminateAnimation: BaseView, DeterminableAnimation { fatalError("Must be overriden in subclass") } } + +#endif diff --git a/InDeterminate/IndeterminateAnimation.swift b/Sources/ProgressKit/IndeterminateAnimation.swift similarity index 98% rename from InDeterminate/IndeterminateAnimation.swift rename to Sources/ProgressKit/IndeterminateAnimation.swift index 2af0a8d..a1e59d3 100644 --- a/InDeterminate/IndeterminateAnimation.swift +++ b/Sources/ProgressKit/IndeterminateAnimation.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Cocoa protocol AnimationStatusDelegate { @@ -55,3 +57,5 @@ open class IndeterminateAnimation: BaseView, AnimationStatusDelegate { fatalError("This is an abstract function") } } + +#endif diff --git a/InDeterminate/MaterialProgress.swift b/Sources/ProgressKit/MaterialProgress.swift similarity index 99% rename from InDeterminate/MaterialProgress.swift rename to Sources/ProgressKit/MaterialProgress.swift index eb5ccc0..bb81bd6 100644 --- a/InDeterminate/MaterialProgress.swift +++ b/Sources/ProgressKit/MaterialProgress.swift @@ -5,7 +5,8 @@ // Created by Kauntey Suryawanshi on 30/06/15. // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // - +#if os(OSX) + import Foundation import Cocoa @@ -122,3 +123,4 @@ extension MaterialProgress: CAAnimationDelegate { progressLayer.add(animationGroup, forKey: "strokeEnd") } } +#endif diff --git a/Determinate/ProgressBar.swift b/Sources/ProgressKit/ProgressBar.swift similarity index 98% rename from Determinate/ProgressBar.swift rename to Sources/ProgressKit/ProgressBar.swift index 545e431..b1f0109 100644 --- a/Determinate/ProgressBar.swift +++ b/Sources/ProgressKit/ProgressBar.swift @@ -5,7 +5,8 @@ // Created by Kauntey Suryawanshi on 31/07/15. // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // - +#if os(OSX) + import Foundation import Cocoa @@ -57,3 +58,4 @@ open class ProgressBar: DeterminateAnimation { CATransaction.commit() } } +#endif diff --git a/ProgressUtils.swift b/Sources/ProgressKit/ProgressUtils.swift similarity index 83% rename from ProgressUtils.swift rename to Sources/ProgressKit/ProgressUtils.swift index deab6a8..7e28711 100644 --- a/ProgressUtils.swift +++ b/Sources/ProgressKit/ProgressUtils.swift @@ -6,16 +6,17 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // - +#if os(OSX) + import AppKit -extension NSRect { +public extension NSRect { var mid: CGPoint { return CGPoint(x: self.midX, y: self.midY) } } -extension NSBezierPath { +public extension NSBezierPath { /// Converts NSBezierPath to CGPath var CGPath: CGPath { let path = CGMutablePath() @@ -41,15 +42,16 @@ extension NSBezierPath { } } -func degreeToRadian(_ degree: Int) -> Double { +public func degreeToRadian(_ degree: Int) -> Double { return Double(degree) * (Double.pi / 180) } -func radianToDegree(_ radian: Double) -> Int { +public func radianToDegree(_ radian: Double) -> Int { return Int(radian * (180 / Double.pi)) } -func + (p1: CGPoint, p2: CGPoint) -> CGPoint { +public func + (p1: CGPoint, p2: CGPoint) -> CGPoint { return CGPoint(x: p1.x + p2.x, y: p1.y + p2.y) } +#endif diff --git a/InDeterminate/Rainbow.swift b/Sources/ProgressKit/Rainbow.swift similarity index 99% rename from InDeterminate/Rainbow.swift rename to Sources/ProgressKit/Rainbow.swift index ead7b59..4b38fc6 100644 --- a/InDeterminate/Rainbow.swift +++ b/Sources/ProgressKit/Rainbow.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Foundation import Cocoa @@ -74,3 +76,4 @@ let darkColorList: [NSColor] = [ NSColor(red: 0.4183, green: 0.4842, blue: 0.5372, alpha: 1.0), NSColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0), ] +#endif diff --git a/InDeterminate/RotatingArc.swift b/Sources/ProgressKit/RotatingArc.swift similarity index 99% rename from InDeterminate/RotatingArc.swift rename to Sources/ProgressKit/RotatingArc.swift index 978d3f9..3168553 100644 --- a/InDeterminate/RotatingArc.swift +++ b/Sources/ProgressKit/RotatingArc.swift @@ -6,6 +6,8 @@ // Copyright © 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Foundation import Cocoa @@ -102,3 +104,5 @@ open class RotatingArc: IndeterminateAnimation { arcLayer.removeAllAnimations() } } + +#endif diff --git a/InDeterminate/ShootingStars.swift b/Sources/ProgressKit/ShootingStars.swift similarity index 99% rename from InDeterminate/ShootingStars.swift rename to Sources/ProgressKit/ShootingStars.swift index df29543..6e3519c 100644 --- a/InDeterminate/ShootingStars.swift +++ b/Sources/ProgressKit/ShootingStars.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Foundation import Cocoa @@ -84,3 +86,5 @@ extension ShootingStars: CAAnimationDelegate { starLayer2.add(animation, forKey: "default") } } + +#endif diff --git a/InDeterminate/Spinner.swift b/Sources/ProgressKit/Spinner.swift similarity index 99% rename from InDeterminate/Spinner.swift rename to Sources/ProgressKit/Spinner.swift index 7502f37..4b2b68c 100644 --- a/InDeterminate/Spinner.swift +++ b/Sources/ProgressKit/Spinner.swift @@ -6,6 +6,8 @@ // Copyright (c) 2015 Kauntey Suryawanshi. All rights reserved. // +#if os(OSX) + import Foundation import Cocoa @@ -112,3 +114,5 @@ open class Spinner: IndeterminateAnimation { containerLayer.removeAllAnimations() } } + +#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..17581fd --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,6 @@ +import XCTest +@testable import ProgressKitTests + +XCTMain([ + testCase(ProgressKitTests.allTests), +]) diff --git a/Tests/ProgressKitTests/ProgressKitTests.swift b/Tests/ProgressKitTests/ProgressKitTests.swift new file mode 100644 index 0000000..fa4f323 --- /dev/null +++ b/Tests/ProgressKitTests/ProgressKitTests.swift @@ -0,0 +1,11 @@ +import XCTest +@testable import ProgressKit + +class ProgressKitTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertTrue(true) + } +}