diff --git a/.gitignore b/.gitignore index cab8c69..c238bd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,8 @@ +# OS X +.DS_Store + # Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated build/ -DerivedData/ - -## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -16,50 +12,22 @@ DerivedData/ *.perspectivev3 !default.perspectivev3 xcuserdata/ - -## Other +*.xccheckout +profile *.moved-aside -*.xcuserstate - -## Obj-C/Swift specific +DerivedData *.hmap *.ipa -*.dSYM.zip -*.dSYM -## Playgrounds -timeline.xctimeline -playground.xcworkspace +# Bundler +.bundle -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ - -# CocoaPods -# +Carthage # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control # -# Pods/ - -# Carthage +# Note: if you ignore the Pods directory, make sure to uncomment +# `pod install` in .travis.yml # -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output \ No newline at end of file +Pods/ diff --git a/.travis.yml b/.travis.yml index ae294b3..70ee587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ -# -# Travic CI configuration -# -# Based on: -# - https://docs.travis-ci.com/user/languages/objective-c/#Default-Test-Script -# - https://medium.com/@johnsundell/adding-continuous-integration-to-a-swift-project-4c99252eedb0 -# +# references: +# * http://www.objc.io/issue-6/travis-ci.html +# * https://github.com/supermarin/xcpretty#usage +osx_image: xcode9 language: objective-c - -osx_image: xcode8.3 - +cache: cocoapods +podfile: Example/Podfile +before_install: +- gem install cocoapods # Since Travis is not always on latest version +- pod install --repo-update --project-directory=Example # "--repo-update" Fixes pod out of sync script: - - xcodebuild clean test -project GradientLoadingBar.xcodeproj -scheme GradientLoadingBar -destination "platform=iOS Simulator,name=iPhone 7,OS=10.3.1" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO +- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/GradientLoadingBar.xcworkspace -scheme GradientLoadingBar-Example -destination "platform=iOS Simulator,name=iPhone 7,OS=10.3.1" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty +- pod lib lint diff --git a/Example/.swiftlint.yml b/Example/.swiftlint.yml new file mode 100644 index 0000000..56c33f3 --- /dev/null +++ b/Example/.swiftlint.yml @@ -0,0 +1,4 @@ +line_length: 160 + +excluded: # paths to ignore during linting. Takes precedence over `included`. + - GradientLoadingBar/AppDelegate.swift \ No newline at end of file diff --git a/Example/GradientLoadingBar.xcodeproj/project.pbxproj b/Example/GradientLoadingBar.xcodeproj/project.pbxproj new file mode 100644 index 0000000..25324ae --- /dev/null +++ b/Example/GradientLoadingBar.xcodeproj/project.pbxproj @@ -0,0 +1,660 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; + 77357BD34CFF2778341F80E8 /* Pods_GradientLoadingBar_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03CD5D69D7C3FBBDBF5FABBB /* Pods_GradientLoadingBar_Example.framework */; }; + 8020C040972E902A8CCAA9E7 /* Pods_GradientLoadingBar_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 434E3C8A6E245A38C2831E73 /* Pods_GradientLoadingBar_Tests.framework */; }; + 972B29D51F7F8A40009D9F89 /* UIColor+InitializersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 972B29D41F7F88F6009D9F89 /* UIColor+InitializersTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 607FACC81AFB9204008FA782 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 607FACCF1AFB9204008FA782; + remoteInfo = GradientLoadingBar; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 03CD5D69D7C3FBBDBF5FABBB /* Pods_GradientLoadingBar_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GradientLoadingBar_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E24EC094BE0798D462B5F96 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 14959BE5652C9E83FC09BBDD /* Pods-GradientLoadingBar_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GradientLoadingBar_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-GradientLoadingBar_Tests/Pods-GradientLoadingBar_Tests.release.xcconfig"; sourceTree = ""; }; + 172FD3755BEBFF66683F5D81 /* Pods-GradientLoadingBar_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GradientLoadingBar_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-GradientLoadingBar_Example/Pods-GradientLoadingBar_Example.release.xcconfig"; sourceTree = ""; }; + 3DC26E6D2B0C63183F508578 /* Pods-GradientLoadingBar_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GradientLoadingBar_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GradientLoadingBar_Example/Pods-GradientLoadingBar_Example.debug.xcconfig"; sourceTree = ""; }; + 434E3C8A6E245A38C2831E73 /* Pods_GradientLoadingBar_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GradientLoadingBar_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD01AFB9204008FA782 /* GradientLoadingBar_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GradientLoadingBar_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 607FACE51AFB9204008FA782 /* GradientLoadingBar_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GradientLoadingBar_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 972B29D41F7F88F6009D9F89 /* UIColor+InitializersTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+InitializersTests.swift"; sourceTree = ""; }; + C06CA4DFA1DCB931095ABD3D /* GradientLoadingBar.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GradientLoadingBar.podspec; path = ../GradientLoadingBar.podspec; sourceTree = ""; }; + F76834BE9E43CA11377EC030 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + FECB95A4857728345199461F /* Pods-GradientLoadingBar_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GradientLoadingBar_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GradientLoadingBar_Tests/Pods-GradientLoadingBar_Tests.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 77357BD34CFF2778341F80E8 /* Pods_GradientLoadingBar_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE21AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8020C040972E902A8CCAA9E7 /* Pods_GradientLoadingBar_Tests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACD21AFB9204008FA782 /* Example for GradientLoadingBar */, + 607FACE81AFB9204008FA782 /* Tests */, + 607FACD11AFB9204008FA782 /* Products */, + BFC08F9E633527E553EDA250 /* Pods */, + DB185876CEF7C6517EB25B58 /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* GradientLoadingBar_Example.app */, + 607FACE51AFB9204008FA782 /* GradientLoadingBar_Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Example for GradientLoadingBar */ = { + isa = PBXGroup; + children = ( + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + 607FACD71AFB9204008FA782 /* ViewController.swift */, + 607FACD91AFB9204008FA782 /* Main.storyboard */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACD31AFB9204008FA782 /* Supporting Files */, + ); + name = "Example for GradientLoadingBar"; + path = GradientLoadingBar; + sourceTree = ""; + }; + 607FACD31AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACD41AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACE81AFB9204008FA782 /* Tests */ = { + isa = PBXGroup; + children = ( + 972B29D21F7F88F6009D9F89 /* Helpers */, + 607FACE91AFB9204008FA782 /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 607FACE91AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACEA1AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + C06CA4DFA1DCB931095ABD3D /* GradientLoadingBar.podspec */, + 0E24EC094BE0798D462B5F96 /* README.md */, + F76834BE9E43CA11377EC030 /* LICENSE */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + 972B29D21F7F88F6009D9F89 /* Helpers */ = { + isa = PBXGroup; + children = ( + 972B29D31F7F88F6009D9F89 /* Extensions */, + ); + path = Helpers; + sourceTree = ""; + }; + 972B29D31F7F88F6009D9F89 /* Extensions */ = { + isa = PBXGroup; + children = ( + 972B29D41F7F88F6009D9F89 /* UIColor+InitializersTests.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + BFC08F9E633527E553EDA250 /* Pods */ = { + isa = PBXGroup; + children = ( + 3DC26E6D2B0C63183F508578 /* Pods-GradientLoadingBar_Example.debug.xcconfig */, + 172FD3755BEBFF66683F5D81 /* Pods-GradientLoadingBar_Example.release.xcconfig */, + FECB95A4857728345199461F /* Pods-GradientLoadingBar_Tests.debug.xcconfig */, + 14959BE5652C9E83FC09BBDD /* Pods-GradientLoadingBar_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + DB185876CEF7C6517EB25B58 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 03CD5D69D7C3FBBDBF5FABBB /* Pods_GradientLoadingBar_Example.framework */, + 434E3C8A6E245A38C2831E73 /* Pods_GradientLoadingBar_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* GradientLoadingBar_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "GradientLoadingBar_Example" */; + buildPhases = ( + 8A80B9B4778F0A3D30371790 /* [CP] Check Pods Manifest.lock */, + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + 1A66A3C243446BE65EBE3AAE /* [CP] Embed Pods Frameworks */, + E3CF36B5598601D100CC228C /* [CP] Copy Pods Resources */, + 9753E83D1F80F7D300EF2822 /* Swiftlint */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GradientLoadingBar_Example; + productName = GradientLoadingBar; + productReference = 607FACD01AFB9204008FA782 /* GradientLoadingBar_Example.app */; + productType = "com.apple.product-type.application"; + }; + 607FACE41AFB9204008FA782 /* GradientLoadingBar_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "GradientLoadingBar_Tests" */; + buildPhases = ( + 04A6606B8779F59C5BA953A7 /* [CP] Check Pods Manifest.lock */, + 607FACE11AFB9204008FA782 /* Sources */, + 607FACE21AFB9204008FA782 /* Frameworks */, + 607FACE31AFB9204008FA782 /* Resources */, + 03F306D55F7F32557FC7D435 /* [CP] Embed Pods Frameworks */, + 8340BA30C3E863337E7EDA14 /* [CP] Copy Pods Resources */, + 97C4F18C1F7F8E7E00739B14 /* Swiftlint */, + ); + buildRules = ( + ); + dependencies = ( + 607FACE71AFB9204008FA782 /* PBXTargetDependency */, + ); + name = GradientLoadingBar_Tests; + productName = Tests; + productReference = 607FACE51AFB9204008FA782 /* GradientLoadingBar_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0820; + }; + 607FACE41AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 0820; + TestTargetID = 607FACCF1AFB9204008FA782; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "GradientLoadingBar" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* GradientLoadingBar_Example */, + 607FACE41AFB9204008FA782 /* GradientLoadingBar_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE31AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 03F306D55F7F32557FC7D435 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GradientLoadingBar_Tests/Pods-GradientLoadingBar_Tests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 04A6606B8779F59C5BA953A7 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-GradientLoadingBar_Tests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 1A66A3C243446BE65EBE3AAE /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-GradientLoadingBar_Example/Pods-GradientLoadingBar_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/GradientLoadingBar/GradientLoadingBar.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GradientLoadingBar.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GradientLoadingBar_Example/Pods-GradientLoadingBar_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8340BA30C3E863337E7EDA14 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GradientLoadingBar_Tests/Pods-GradientLoadingBar_Tests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8A80B9B4778F0A3D30371790 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-GradientLoadingBar_Example-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9753E83D1F80F7D300EF2822 /* Swiftlint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = Swiftlint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -f \"${PODS_ROOT}/SwiftLint/swiftlint\" ]; then\n ${PODS_ROOT}/SwiftLint/swiftlint\nelse\n echo \"warning: SwiftLint not installed!\"\nfi"; + }; + 97C4F18C1F7F8E7E00739B14 /* Swiftlint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = Swiftlint; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if [ -f \"${PODS_ROOT}/SwiftLint/swiftlint\" ]; then\n ${PODS_ROOT}/SwiftLint/swiftlint\nelse\n echo \"warning: SwiftLint not installed!\"\nfi"; + }; + E3CF36B5598601D100CC228C /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GradientLoadingBar_Example/Pods-GradientLoadingBar_Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE11AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 972B29D51F7F8A40009D9F89 /* UIColor+InitializersTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 607FACCF1AFB9204008FA782 /* GradientLoadingBar_Example */; + targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 607FACD91AFB9204008FA782 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 607FACDA1AFB9204008FA782 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 607FACDF1AFB9204008FA782 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + 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_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* 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_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3DC26E6D2B0C63183F508578 /* Pods-GradientLoadingBar_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = GradientLoadingBar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 172FD3755BEBFF66683F5D81 /* Pods-GradientLoadingBar_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = GradientLoadingBar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + 607FACF31AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FECB95A4857728345199461F /* Pods-GradientLoadingBar_Tests.debug.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GradientLoadingBar_Example.app/GradientLoadingBar_Example"; + }; + name = Debug; + }; + 607FACF41AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 14959BE5652C9E83FC09BBDD /* Pods-GradientLoadingBar_Tests.release.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GradientLoadingBar_Example.app/GradientLoadingBar_Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "GradientLoadingBar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "GradientLoadingBar_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "GradientLoadingBar_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF31AFB9204008FA782 /* Debug */, + 607FACF41AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/GradientLoadingBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/GradientLoadingBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from GradientLoadingBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Example/GradientLoadingBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar.xcscheme b/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme similarity index 60% rename from GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar.xcscheme rename to Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme index 42431d6..54b8589 100644 --- a/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar.xcscheme +++ b/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -26,15 +40,16 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -42,9 +57,9 @@ @@ -55,21 +70,23 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -79,15 +96,16 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/Example/GradientLoadingBar.xcworkspace/contents.xcworkspacedata b/Example/GradientLoadingBar.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..15907d8 --- /dev/null +++ b/Example/GradientLoadingBar.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/GradientLoadingBar/AppDelegate.swift b/Example/GradientLoadingBar/AppDelegate.swift new file mode 100644 index 0000000..51cc16f --- /dev/null +++ b/Example/GradientLoadingBar/AppDelegate.swift @@ -0,0 +1,45 @@ +// +// AppDelegate.swift +// GradientLoadingBar +// +// Created by fxm90 on 09/30/2017. +// Copyright (c) 2017 fxm90. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Example/GradientLoadingBar/Base.lproj/LaunchScreen.xib b/Example/GradientLoadingBar/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..f63e7fe --- /dev/null +++ b/Example/GradientLoadingBar/Base.lproj/LaunchScreen.xib @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/GradientLoadingBar/Base.lproj/Main.storyboard b/Example/GradientLoadingBar/Base.lproj/Main.storyboard new file mode 100644 index 0000000..26e8a02 --- /dev/null +++ b/Example/GradientLoadingBar/Base.lproj/Main.storyboard @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/GradientLoadingBar/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/GradientLoadingBar/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..19882d5 --- /dev/null +++ b/Example/GradientLoadingBar/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GradientLoadingBar/Info.plist b/Example/GradientLoadingBar/Info.plist similarity index 55% rename from GradientLoadingBar/Info.plist rename to Example/GradientLoadingBar/Info.plist index fbe1e6b..eb18faa 100644 --- a/GradientLoadingBar/Info.plist +++ b/Example/GradientLoadingBar/Info.plist @@ -13,12 +13,27 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - FMWK + APPL CFBundleShortVersionString 1.0 + CFBundleSignature + ???? CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + diff --git a/Example/GradientLoadingBar/ViewController.swift b/Example/GradientLoadingBar/ViewController.swift new file mode 100644 index 0000000..b2f0f8f --- /dev/null +++ b/Example/GradientLoadingBar/ViewController.swift @@ -0,0 +1,53 @@ +// +// ViewController.swift +// GradientLoadingBar +// +// Created by fxm90 on 09/30/2017. +// Copyright (c) 2017 fxm90. All rights reserved. +// + +import UIKit +import GradientLoadingBar + +class ViewController: UIViewController { + + @IBOutlet weak var showButton: UIButton! + @IBOutlet weak var toggleButton: UIButton! + @IBOutlet weak var hideButton: UIButton! + + let buttonTintColor = UIColor.white + let buttonBackgroundColor = UIColor(hexString: "#4990e2") + + let gradientLoadingBar = GradientLoadingBar.sharedInstance() + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + + showButton.layer.cornerRadius = 4.0 + showButton.tintColor = buttonTintColor + showButton.backgroundColor = buttonBackgroundColor + + toggleButton.layer.cornerRadius = 4.0 + toggleButton.tintColor = buttonTintColor + toggleButton.backgroundColor = buttonBackgroundColor + + hideButton.layer.cornerRadius = 4.0 + hideButton.tintColor = buttonTintColor + hideButton.backgroundColor = buttonBackgroundColor + } + + // MARK: - User actions + + @IBAction func onShowButtonTouchUpInside(_ sender: Any) { + gradientLoadingBar.show() + } + + @IBAction func onToggleButtonTouchUpInside(_ sender: Any) { + gradientLoadingBar.toggle() + } + + @IBAction func onHideButtonTouchUpInside(_ sender: Any) { + gradientLoadingBar.hide() + } +} diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..3e09ce1 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,15 @@ +platform :ios, '9.0' + +use_frameworks! + +target 'GradientLoadingBar_Example' do + pod 'GradientLoadingBar', :path => '../' + + # Dev Dependecies + pod 'SwiftLint' + + target 'GradientLoadingBar_Tests' do + inherit! :search_paths + + end +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..32426db --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,19 @@ +PODS: + - GradientLoadingBar (1.1.3) + - SwiftLint (0.22.0) + +DEPENDENCIES: + - GradientLoadingBar (from `../`) + - SwiftLint + +EXTERNAL SOURCES: + GradientLoadingBar: + :path: ../ + +SPEC CHECKSUMS: + GradientLoadingBar: 6ab1e4025fdcbdc2a8c85e0a62663c23ab7233d0 + SwiftLint: 1134786caedd2caab0560d2f36b76414a5a56808 + +PODFILE CHECKSUM: e0d0b1a0e282841ea073c71d203e50b0435aa820 + +COCOAPODS: 1.3.1 diff --git a/GradientLoadingBarTests/Helpers/Extensions/UIColor+InitializersTests.swift b/Example/Tests/Helpers/Extensions/UIColor+InitializersTests.swift similarity index 100% rename from GradientLoadingBarTests/Helpers/Extensions/UIColor+InitializersTests.swift rename to Example/Tests/Helpers/Extensions/UIColor+InitializersTests.swift diff --git a/GradientLoadingBarTests/Info.plist b/Example/Tests/Info.plist similarity index 92% rename from GradientLoadingBarTests/Info.plist rename to Example/Tests/Info.plist index 6c6c23c..ba72822 100644 --- a/GradientLoadingBarTests/Info.plist +++ b/Example/Tests/Info.plist @@ -16,6 +16,8 @@ BNDL CFBundleShortVersionString 1.0 + CFBundleSignature + ???? CFBundleVersion 1 diff --git a/GradientLoadingBar.podspec b/GradientLoadingBar.podspec index 1b8eef3..4ad8e2b 100644 --- a/GradientLoadingBar.podspec +++ b/GradientLoadingBar.podspec @@ -1,16 +1,43 @@ +# +# Be sure to run `pod lib lint GradientLoadingBar.podspec' to ensure this is a +# valid spec before submitting. +# +# Any lines starting with a # are optional, but their use is encouraged +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html +# + Pod::Spec.new do |s| - s.name = 'GradientLoadingBar' - s.version = '1.1.3' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.summary = 'An animated gradient loading bar.' - s.description = 'An animated gradient loading bar. Inspired by http://www.cssscript.com/ios-style-gradient-progress-bar-with-pure-css-css3/' - s.homepage = 'https://github.com/fxm90/GradientLoadingBar' - s.screenshot = 'http://felix.hamburg/files/github/gradient-loading-bar/screen.gif' - s.author = { 'Felix Mau' => 'contact@felix.hamburg' } + s.name = 'GradientLoadingBar' + s.version = '1.1.3' + s.summary = 'An animated gradient loading bar.' - s.source = { :git => 'https://github.com/fxm90/GradientLoadingBar.git', :tag => '1.1.3' } - s.source_files = 'GradientLoadingBar', 'GradientLoadingBar/**/*.swift' +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! - s.platform = :ios, '9.0' - s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3' } -end \ No newline at end of file + s.description = <<-DESC +An animated gradient loading bar. +Inspired by http://www.cssscript.com/ios-style-gradient-progress-bar-with-pure-css-css3/ + DESC + + s.homepage = 'https://github.com/fxm90/GradientLoadingBar' + s.screenshots = 'http://felix.hamburg/files/github/gradient-loading-bar/screen.gif' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'Felix Mau' => 'contact@felix.hamburg' } + s.source = { :git => 'https://github.com/fxm90/GradientLoadingBar.git', :tag => s.version.to_s } + # s.social_media_url = 'https://twitter.com/' + + s.ios.deployment_target = '9.0' + + s.source_files = 'GradientLoadingBar/Classes/**/*' + + # s.resource_bundles = { + # 'GradientLoadingBar' => ['GradientLoadingBar/Assets/*.png'] + # } + + # s.public_header_files = 'Pod/Classes/**/*.h' + # s.frameworks = 'UIKit', 'MapKit' + # s.dependency 'AFNetworking', '~> 2.3' +end diff --git a/GradientLoadingBar.xcodeproj/project.pbxproj b/GradientLoadingBar.xcodeproj/project.pbxproj deleted file mode 100644 index fff8cc0..0000000 --- a/GradientLoadingBar.xcodeproj/project.pbxproj +++ /dev/null @@ -1,536 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 9725C8891E658B7200C79AEC /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9725C8881E658B7200C79AEC /* Types.swift */; }; - 97AE29101E13C5B400C454C6 /* GradientLoadingBar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97AE29061E13C5B400C454C6 /* GradientLoadingBar.framework */; }; - 97AE29171E13C5B400C454C6 /* GradientLoadingBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 97AE29091E13C5B400C454C6 /* GradientLoadingBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 97AE29281E13C5E500C454C6 /* GradientLoadingBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AE29201E13C5E500C454C6 /* GradientLoadingBar.swift */; }; - 97AE292A1E13C5E500C454C6 /* Durations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AE29251E13C5E500C454C6 /* Durations.swift */; }; - 97AE292B1E13C5E500C454C6 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AE29271E13C5E500C454C6 /* GradientView.swift */; }; - 97CC3E7F1F77838700116D41 /* NotificationCenter+ObserveOnce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CC3E7E1F77838700116D41 /* NotificationCenter+ObserveOnce.swift */; }; - 97CC3E801F77898E00116D41 /* UIColor+Initializers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CC3E7C1F77834400116D41 /* UIColor+Initializers.swift */; }; - 97CDC6D61F51E932006249FE /* UIColor+InitializersTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CDC6D51F51E932006249FE /* UIColor+InitializersTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 97AE29111E13C5B400C454C6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97AE28FD1E13C5B400C454C6 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 97AE29051E13C5B400C454C6; - remoteInfo = GradientLoadingBar; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 9725C8881E658B7200C79AEC /* Types.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Types.swift; path = Types/Types.swift; sourceTree = ""; }; - 97AE29061E13C5B400C454C6 /* GradientLoadingBar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GradientLoadingBar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 97AE29091E13C5B400C454C6 /* GradientLoadingBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GradientLoadingBar.h; sourceTree = ""; }; - 97AE290A1E13C5B400C454C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 97AE290F1E13C5B400C454C6 /* GradientLoadingBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GradientLoadingBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 97AE29161E13C5B400C454C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 97AE29201E13C5E500C454C6 /* GradientLoadingBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientLoadingBar.swift; sourceTree = ""; }; - 97AE29251E13C5E500C454C6 /* Durations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Durations.swift; sourceTree = ""; }; - 97AE29271E13C5E500C454C6 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; - 97CC3E7C1F77834400116D41 /* UIColor+Initializers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Initializers.swift"; sourceTree = ""; }; - 97CC3E7E1F77838700116D41 /* NotificationCenter+ObserveOnce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NotificationCenter+ObserveOnce.swift"; sourceTree = ""; }; - 97CDC6D51F51E932006249FE /* UIColor+InitializersTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+InitializersTests.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97AE29021E13C5B400C454C6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97AE290C1E13C5B400C454C6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 97AE29101E13C5B400C454C6 /* GradientLoadingBar.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 973C80121E65722C00346ACE /* Types */ = { - isa = PBXGroup; - children = ( - 9725C8881E658B7200C79AEC /* Types.swift */, - ); - name = Types; - sourceTree = ""; - }; - 97AE28FC1E13C5B400C454C6 = { - isa = PBXGroup; - children = ( - 97AE29081E13C5B400C454C6 /* GradientLoadingBar */, - 97AE29131E13C5B400C454C6 /* GradientLoadingBarTests */, - 97AE29071E13C5B400C454C6 /* Products */, - ); - sourceTree = ""; - }; - 97AE29071E13C5B400C454C6 /* Products */ = { - isa = PBXGroup; - children = ( - 97AE29061E13C5B400C454C6 /* GradientLoadingBar.framework */, - 97AE290F1E13C5B400C454C6 /* GradientLoadingBarTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 97AE29081E13C5B400C454C6 /* GradientLoadingBar */ = { - isa = PBXGroup; - children = ( - 97AE29211E13C5E500C454C6 /* Helpers */, - 97AE29261E13C5E500C454C6 /* Views */, - 97AE29201E13C5E500C454C6 /* GradientLoadingBar.swift */, - 97AE29091E13C5B400C454C6 /* GradientLoadingBar.h */, - 97AE290A1E13C5B400C454C6 /* Info.plist */, - ); - path = GradientLoadingBar; - sourceTree = ""; - }; - 97AE29131E13C5B400C454C6 /* GradientLoadingBarTests */ = { - isa = PBXGroup; - children = ( - 97CDC6D31F51E932006249FE /* Helpers */, - 97AE29161E13C5B400C454C6 /* Info.plist */, - ); - path = GradientLoadingBarTests; - sourceTree = ""; - }; - 97AE29211E13C5E500C454C6 /* Helpers */ = { - isa = PBXGroup; - children = ( - 97AE29221E13C5E500C454C6 /* Extensions */, - 97AE29241E13C5E500C454C6 /* Structs */, - 973C80121E65722C00346ACE /* Types */, - ); - path = Helpers; - sourceTree = ""; - }; - 97AE29221E13C5E500C454C6 /* Extensions */ = { - isa = PBXGroup; - children = ( - 97CC3E7D1F77836200116D41 /* NotificationCenter */, - 97CC3E7B1F77834400116D41 /* UIColor */, - ); - path = Extensions; - sourceTree = ""; - }; - 97AE29241E13C5E500C454C6 /* Structs */ = { - isa = PBXGroup; - children = ( - 97AE29251E13C5E500C454C6 /* Durations.swift */, - ); - path = Structs; - sourceTree = ""; - }; - 97AE29261E13C5E500C454C6 /* Views */ = { - isa = PBXGroup; - children = ( - 97AE29271E13C5E500C454C6 /* GradientView.swift */, - ); - path = Views; - sourceTree = ""; - }; - 97CC3E7B1F77834400116D41 /* UIColor */ = { - isa = PBXGroup; - children = ( - 97CC3E7C1F77834400116D41 /* UIColor+Initializers.swift */, - ); - path = UIColor; - sourceTree = ""; - }; - 97CC3E7D1F77836200116D41 /* NotificationCenter */ = { - isa = PBXGroup; - children = ( - 97CC3E7E1F77838700116D41 /* NotificationCenter+ObserveOnce.swift */, - ); - path = NotificationCenter; - sourceTree = ""; - }; - 97CDC6D31F51E932006249FE /* Helpers */ = { - isa = PBXGroup; - children = ( - 97CDC6D41F51E932006249FE /* Extensions */, - ); - path = Helpers; - sourceTree = ""; - }; - 97CDC6D41F51E932006249FE /* Extensions */ = { - isa = PBXGroup; - children = ( - 97CDC6D51F51E932006249FE /* UIColor+InitializersTests.swift */, - ); - path = Extensions; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 97AE29031E13C5B400C454C6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 97AE29171E13C5B400C454C6 /* GradientLoadingBar.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 97AE29051E13C5B400C454C6 /* GradientLoadingBar */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97AE291A1E13C5B400C454C6 /* Build configuration list for PBXNativeTarget "GradientLoadingBar" */; - buildPhases = ( - 97AE29011E13C5B400C454C6 /* Sources */, - 97AE29021E13C5B400C454C6 /* Frameworks */, - 97AE29031E13C5B400C454C6 /* Headers */, - 97AE29041E13C5B400C454C6 /* Resources */, - 975AE92C1F45728B00336A42 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = GradientLoadingBar; - productName = GradientLoadingBar; - productReference = 97AE29061E13C5B400C454C6 /* GradientLoadingBar.framework */; - productType = "com.apple.product-type.framework"; - }; - 97AE290E1E13C5B400C454C6 /* GradientLoadingBarTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97AE291D1E13C5B400C454C6 /* Build configuration list for PBXNativeTarget "GradientLoadingBarTests" */; - buildPhases = ( - 97AE290B1E13C5B400C454C6 /* Sources */, - 97AE290C1E13C5B400C454C6 /* Frameworks */, - 97AE290D1E13C5B400C454C6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 97AE29121E13C5B400C454C6 /* PBXTargetDependency */, - ); - name = GradientLoadingBarTests; - productName = GradientLoadingBarTests; - productReference = 97AE290F1E13C5B400C454C6 /* GradientLoadingBarTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97AE28FD1E13C5B400C454C6 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 0830; - ORGANIZATIONNAME = "Felix Mau"; - TargetAttributes = { - 97AE29051E13C5B400C454C6 = { - CreatedOnToolsVersion = 8.1; - LastSwiftMigration = 0810; - ProvisioningStyle = Automatic; - }; - 97AE290E1E13C5B400C454C6 = { - CreatedOnToolsVersion = 8.1; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 97AE29001E13C5B400C454C6 /* Build configuration list for PBXProject "GradientLoadingBar" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 97AE28FC1E13C5B400C454C6; - productRefGroup = 97AE29071E13C5B400C454C6 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97AE29051E13C5B400C454C6 /* GradientLoadingBar */, - 97AE290E1E13C5B400C454C6 /* GradientLoadingBarTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97AE29041E13C5B400C454C6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97AE290D1E13C5B400C454C6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 975AE92C1F45728B00336A42 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97AE29011E13C5B400C454C6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97AE29281E13C5E500C454C6 /* GradientLoadingBar.swift in Sources */, - 9725C8891E658B7200C79AEC /* Types.swift in Sources */, - 97CC3E801F77898E00116D41 /* UIColor+Initializers.swift in Sources */, - 97CC3E7F1F77838700116D41 /* NotificationCenter+ObserveOnce.swift in Sources */, - 97AE292B1E13C5E500C454C6 /* GradientView.swift in Sources */, - 97AE292A1E13C5E500C454C6 /* Durations.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97AE290B1E13C5B400C454C6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97CDC6D61F51E932006249FE /* UIColor+InitializersTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 97AE29121E13C5B400C454C6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 97AE29051E13C5B400C454C6 /* GradientLoadingBar */; - targetProxy = 97AE29111E13C5B400C454C6 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 97AE29181E13C5B400C454C6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - 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_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 97AE29191E13C5B400C454C6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - 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_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 97AE291B1E13C5B400C454C6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GradientLoadingBar/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = hamburg.felix.GradientLoadingBar; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 97AE291C1E13C5B400C454C6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_IDENTITY = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = GradientLoadingBar/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = hamburg.felix.GradientLoadingBar; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - 97AE291E1E13C5B400C454C6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = GradientLoadingBarTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = hamburg.felix.GradientLoadingBarTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - 97AE291F1E13C5B400C454C6 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - INFOPLIST_FILE = GradientLoadingBarTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = hamburg.felix.GradientLoadingBarTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97AE29001E13C5B400C454C6 /* Build configuration list for PBXProject "GradientLoadingBar" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97AE29181E13C5B400C454C6 /* Debug */, - 97AE29191E13C5B400C454C6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97AE291A1E13C5B400C454C6 /* Build configuration list for PBXNativeTarget "GradientLoadingBar" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97AE291B1E13C5B400C454C6 /* Debug */, - 97AE291C1E13C5B400C454C6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97AE291D1E13C5B400C454C6 /* Build configuration list for PBXNativeTarget "GradientLoadingBarTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97AE291E1E13C5B400C454C6 /* Debug */, - 97AE291F1E13C5B400C454C6 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97AE28FD1E13C5B400C454C6 /* Project object */; -} diff --git a/GradientLoadingBar/Assets/.gitkeep b/GradientLoadingBar/Assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/GradientLoadingBar/Classes/.gitkeep b/GradientLoadingBar/Classes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/GradientLoadingBar/GradientLoadingBar.swift b/GradientLoadingBar/Classes/GradientLoadingBar.swift similarity index 100% rename from GradientLoadingBar/GradientLoadingBar.swift rename to GradientLoadingBar/Classes/GradientLoadingBar.swift diff --git a/GradientLoadingBar/Helpers/Extensions/NotificationCenter/NotificationCenter+ObserveOnce.swift b/GradientLoadingBar/Classes/Helpers/Extensions/NotificationCenter/NotificationCenter+ObserveOnce.swift similarity index 100% rename from GradientLoadingBar/Helpers/Extensions/NotificationCenter/NotificationCenter+ObserveOnce.swift rename to GradientLoadingBar/Classes/Helpers/Extensions/NotificationCenter/NotificationCenter+ObserveOnce.swift diff --git a/GradientLoadingBar/Helpers/Extensions/UIColor/UIColor+Initializers.swift b/GradientLoadingBar/Classes/Helpers/Extensions/UIColor/UIColor+Initializers.swift similarity index 100% rename from GradientLoadingBar/Helpers/Extensions/UIColor/UIColor+Initializers.swift rename to GradientLoadingBar/Classes/Helpers/Extensions/UIColor/UIColor+Initializers.swift diff --git a/GradientLoadingBar/Helpers/Structs/Durations.swift b/GradientLoadingBar/Classes/Helpers/Structs/Durations.swift similarity index 100% rename from GradientLoadingBar/Helpers/Structs/Durations.swift rename to GradientLoadingBar/Classes/Helpers/Structs/Durations.swift diff --git a/GradientLoadingBar/Helpers/Types/Types.swift b/GradientLoadingBar/Classes/Helpers/Types/Types.swift similarity index 100% rename from GradientLoadingBar/Helpers/Types/Types.swift rename to GradientLoadingBar/Classes/Helpers/Types/Types.swift diff --git a/GradientLoadingBar/Views/GradientView.swift b/GradientLoadingBar/Classes/Views/GradientView.swift similarity index 100% rename from GradientLoadingBar/Views/GradientView.swift rename to GradientLoadingBar/Classes/Views/GradientView.swift diff --git a/GradientLoadingBar/GradientLoadingBar.h b/GradientLoadingBar/GradientLoadingBar.h deleted file mode 100644 index 4d3494c..0000000 --- a/GradientLoadingBar/GradientLoadingBar.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// GradientLoadingBar.h -// GradientLoadingBar -// -// Created by Felix Mau on 28.12.16. -// Copyright © 2016 Felix Mau. All rights reserved. -// - -#import - -//! Project version number for GradientLoadingBar. -FOUNDATION_EXPORT double GradientLoadingBarVersionNumber; - -//! Project version string for GradientLoadingBar. -FOUNDATION_EXPORT const unsigned char GradientLoadingBarVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/LICENSE b/LICENSE index 01aff79..5108f15 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,19 @@ -Copyright <2016> +Copyright (c) 2017 fxm90 -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj new file mode 120000 index 0000000..3c5a8e7 --- /dev/null +++ b/_Pods.xcodeproj @@ -0,0 +1 @@ +Example/Pods/Pods.xcodeproj \ No newline at end of file diff --git a/readme.md b/readme.md index b65f33a..73bae65 100644 --- a/readme.md +++ b/readme.md @@ -1,14 +1,16 @@ GradientLoadingBar ==================== -![Swift3.0](https://img.shields.io/badge/Swift-3.0-green.svg?style=flat) ![Version](https://img.shields.io/cocoapods/v/GradientLoadingBar.svg) ![Master branch build status](https://travis-ci.org/fxm90/GradientLoadingBar.svg?branch=master) - +![Swift3.0](https://img.shields.io/badge/Swift-3.0-green.svg?style=flat) [![CI Status](http://img.shields.io/travis/fxm90/GradientLoadingBar.svg?style=flat)](https://travis-ci.org/fxm90/GradientLoadingBar) [![Version](https://img.shields.io/cocoapods/v/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) [![License](https://img.shields.io/cocoapods/l/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) [![Platform](https://img.shields.io/cocoapods/p/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) +### Example An animated gradient loading bar. Inspired by [iOS Style Gradient Progress Bar with Pure CSS/CSS3](http://www.cssscript.com/ios-style-gradient-progress-bar-with-pure-css-css3/). ![Example](http://felix.hamburg/files/github/gradient-loading-bar/screen.gif) +To run the example project, clone the repo, and run `pod install` from the Example directory first. + ### Integration GradientLoadingBar can be added to your project using [CocoaPods](https://cocoapods.org/) by adding the following line to your Podfile: ``` @@ -58,8 +60,9 @@ After that you can use `GradientLoadingBar.sharedInstance()` as mentioned above. ### Usage with PromiseKit Check out [my GitHub Gist](https://gist.github.com/fxm90/698554e8335f34e0c6ab95194a4678fb) on how to easily use GradientLoadingBar with [PromiseKit](http://promisekit.org/). -### Version -1.1.3 - ### Author Felix Mau (contact(@)felix.hamburg) + +### License + +GradientLoadingBar is available under the MIT license. See the LICENSE file for more info. \ No newline at end of file