├── .gitignore ├── .swift-version ├── .travis.yml ├── Example ├── JKSteppedProgressBar.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── JKSteppedProgressBar-Example.xcscheme ├── JKSteppedProgressBar.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── JKSteppedProgressBar │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ ├── Localizable.strings │ │ └── Main.storyboard │ ├── CheckmarkViewController.swift │ ├── ImageStepViewController.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── DaisyDuck.imageset │ │ │ ├── Contents.json │ │ │ └── DaisyDuck.png │ │ ├── MickeyMouse.imageset │ │ │ ├── Contents.json │ │ │ └── MickeyMouse.png │ │ ├── MinnieMouse.imageset │ │ │ ├── Contents.json │ │ │ └── MinnieMouse.png │ │ └── check.imageset │ │ │ ├── Contents.json │ │ │ └── check.png │ ├── Info.plist │ ├── String+Utility.swift │ ├── ViewController.swift │ ├── ar.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings │ └── en.lproj │ │ └── Localizable.strings ├── Podfile ├── Podfile.lock └── Tests │ ├── Info.plist │ └── Tests.swift ├── JKSteppedProgressBar.podspec ├── JKSteppedProgressBar ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── CGPoint+JK.swift │ ├── NSAttributedString+JK.swift │ ├── SteppedProgressBar.swift │ └── UIImage+UIColor.swift ├── LICENSE ├── NSAttributedString+JK.swift ├── PULL_REQUEST_TEMPLATE.md ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | Pods/ 34 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode10.1 6 | language: objective-c 7 | cache: cocoapods 8 | podfile: Example/Podfile 9 | before_install: 10 | - gem install cocoapods # Since Travis is not always on latest version 11 | - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -workspace Example/JKSteppedProgressBar.xcworkspace -scheme JKSteppedProgressBar-Example -destination 'platform=iOS Simulator,OS=12.0,name=iPhone X' ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint --allow-warnings 15 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 086EA9392088157100B17463 /* String+Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086EA9382088157100B17463 /* String+Utility.swift */; }; 11 | 08DF6C7C209188670004B506 /* ImageStepViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08DF6C7B209188670004B506 /* ImageStepViewController.swift */; }; 12 | 0CDD5B38FBDA8BACED6D63DA /* Pods_JKSteppedProgressBar_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DAF912FC17BC550BF39EC75 /* Pods_JKSteppedProgressBar_Tests.framework */; }; 13 | 378D04DB20930891002D8218 /* CheckmarkViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 378D04DA20930891002D8218 /* CheckmarkViewController.swift */; }; 14 | 4A24CB2C1F66819D000F2175 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4A24CB2E1F66819D000F2175 /* Localizable.strings */; }; 15 | 544D1A24F7EED2CCC057B2A9 /* Pods_JKSteppedProgressBar_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C9FBD10358FE89E1E87B006 /* Pods_JKSteppedProgressBar_Example.framework */; }; 16 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 17 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 18 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 19 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 20 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 21 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 30 | remoteInfo = JKSteppedProgressBar; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 086EA9382088157100B17463 /* String+Utility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Utility.swift"; sourceTree = ""; }; 36 | 08DF6C7B209188670004B506 /* ImageStepViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageStepViewController.swift; sourceTree = ""; }; 37 | 0B84DACA8DB26D24C966F007 /* Pods-JKSteppedProgressBar_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JKSteppedProgressBar_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-JKSteppedProgressBar_Example/Pods-JKSteppedProgressBar_Example.release.xcconfig"; sourceTree = ""; }; 38 | 0FABD168D9CED3EEBAB5D5A1 /* Pods-JKSteppedProgressBar_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JKSteppedProgressBar_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-JKSteppedProgressBar_Tests/Pods-JKSteppedProgressBar_Tests.release.xcconfig"; sourceTree = ""; }; 39 | 1A37B2758FE153A24499322D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 40 | 378D04DA20930891002D8218 /* CheckmarkViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckmarkViewController.swift; sourceTree = ""; }; 41 | 38A0ECD0D0A7938C27A05D41 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 42 | 4A24CB281F668069000F2175 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = ""; }; 43 | 4A24CB291F668069000F2175 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = ""; }; 44 | 4A24CB2D1F66819D000F2175 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; 45 | 4A24CB2F1F66819F000F2175 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 46 | 4A24CB301F6681A0000F2175 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = ""; }; 47 | 4C9FBD10358FE89E1E87B006 /* Pods_JKSteppedProgressBar_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JKSteppedProgressBar_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 5DAF912FC17BC550BF39EC75 /* Pods_JKSteppedProgressBar_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JKSteppedProgressBar_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 607FACD01AFB9204008FA782 /* JKSteppedProgressBar_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JKSteppedProgressBar_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 52 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 53 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 54 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 55 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 56 | 607FACE51AFB9204008FA782 /* JKSteppedProgressBar_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JKSteppedProgressBar_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 59 | B7760822DC581E7F95433F3E /* Pods-JKSteppedProgressBar_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JKSteppedProgressBar_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JKSteppedProgressBar_Tests/Pods-JKSteppedProgressBar_Tests.debug.xcconfig"; sourceTree = ""; }; 60 | CD044916B6DB12391E6620D1 /* JKSteppedProgressBar.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = JKSteppedProgressBar.podspec; path = ../JKSteppedProgressBar.podspec; sourceTree = ""; }; 61 | F240FC41BB27546D84C7686A /* Pods-JKSteppedProgressBar_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JKSteppedProgressBar_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JKSteppedProgressBar_Example/Pods-JKSteppedProgressBar_Example.debug.xcconfig"; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 544D1A24F7EED2CCC057B2A9 /* Pods_JKSteppedProgressBar_Example.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 0CDD5B38FBDA8BACED6D63DA /* Pods_JKSteppedProgressBar_Tests.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 086EA9372088155B00B17463 /* Utilities */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 086EA9382088157100B17463 /* String+Utility.swift */, 88 | ); 89 | name = Utilities; 90 | sourceTree = ""; 91 | }; 92 | 2207EF1C6130BBDC533F4356 /* Frameworks */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 4C9FBD10358FE89E1E87B006 /* Pods_JKSteppedProgressBar_Example.framework */, 96 | 5DAF912FC17BC550BF39EC75 /* Pods_JKSteppedProgressBar_Tests.framework */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | 607FACC71AFB9204008FA782 = { 102 | isa = PBXGroup; 103 | children = ( 104 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 105 | 607FACD21AFB9204008FA782 /* Example for JKSteppedProgressBar */, 106 | 607FACE81AFB9204008FA782 /* Tests */, 107 | 607FACD11AFB9204008FA782 /* Products */, 108 | A07C6D552FFE1776D48363DB /* Pods */, 109 | 2207EF1C6130BBDC533F4356 /* Frameworks */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | 607FACD11AFB9204008FA782 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 607FACD01AFB9204008FA782 /* JKSteppedProgressBar_Example.app */, 117 | 607FACE51AFB9204008FA782 /* JKSteppedProgressBar_Tests.xctest */, 118 | ); 119 | name = Products; 120 | sourceTree = ""; 121 | }; 122 | 607FACD21AFB9204008FA782 /* Example for JKSteppedProgressBar */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 086EA9372088155B00B17463 /* Utilities */, 126 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 127 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 128 | 08DF6C7B209188670004B506 /* ImageStepViewController.swift */, 129 | 378D04DA20930891002D8218 /* CheckmarkViewController.swift */, 130 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 131 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 132 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 133 | 607FACD31AFB9204008FA782 /* Supporting Files */, 134 | 4A24CB2E1F66819D000F2175 /* Localizable.strings */, 135 | ); 136 | name = "Example for JKSteppedProgressBar"; 137 | path = JKSteppedProgressBar; 138 | sourceTree = ""; 139 | }; 140 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 607FACD41AFB9204008FA782 /* Info.plist */, 144 | ); 145 | name = "Supporting Files"; 146 | sourceTree = ""; 147 | }; 148 | 607FACE81AFB9204008FA782 /* Tests */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 152 | 607FACE91AFB9204008FA782 /* Supporting Files */, 153 | ); 154 | path = Tests; 155 | sourceTree = ""; 156 | }; 157 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 607FACEA1AFB9204008FA782 /* Info.plist */, 161 | ); 162 | name = "Supporting Files"; 163 | sourceTree = ""; 164 | }; 165 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | CD044916B6DB12391E6620D1 /* JKSteppedProgressBar.podspec */, 169 | 1A37B2758FE153A24499322D /* README.md */, 170 | 38A0ECD0D0A7938C27A05D41 /* LICENSE */, 171 | ); 172 | name = "Podspec Metadata"; 173 | sourceTree = ""; 174 | }; 175 | A07C6D552FFE1776D48363DB /* Pods */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | F240FC41BB27546D84C7686A /* Pods-JKSteppedProgressBar_Example.debug.xcconfig */, 179 | 0B84DACA8DB26D24C966F007 /* Pods-JKSteppedProgressBar_Example.release.xcconfig */, 180 | B7760822DC581E7F95433F3E /* Pods-JKSteppedProgressBar_Tests.debug.xcconfig */, 181 | 0FABD168D9CED3EEBAB5D5A1 /* Pods-JKSteppedProgressBar_Tests.release.xcconfig */, 182 | ); 183 | name = Pods; 184 | sourceTree = ""; 185 | }; 186 | /* End PBXGroup section */ 187 | 188 | /* Begin PBXNativeTarget section */ 189 | 607FACCF1AFB9204008FA782 /* JKSteppedProgressBar_Example */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JKSteppedProgressBar_Example" */; 192 | buildPhases = ( 193 | A5B0DAFF32F00B676FB9EB45 /* [CP] Check Pods Manifest.lock */, 194 | 607FACCC1AFB9204008FA782 /* Sources */, 195 | 607FACCD1AFB9204008FA782 /* Frameworks */, 196 | 607FACCE1AFB9204008FA782 /* Resources */, 197 | C607A2CD4D69FA5D866293A2 /* [CP] Embed Pods Frameworks */, 198 | 4A4947DF1F46E52400BC624C /* ShellScript */, 199 | ); 200 | buildRules = ( 201 | ); 202 | dependencies = ( 203 | ); 204 | name = JKSteppedProgressBar_Example; 205 | productName = JKSteppedProgressBar; 206 | productReference = 607FACD01AFB9204008FA782 /* JKSteppedProgressBar_Example.app */; 207 | productType = "com.apple.product-type.application"; 208 | }; 209 | 607FACE41AFB9204008FA782 /* JKSteppedProgressBar_Tests */ = { 210 | isa = PBXNativeTarget; 211 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JKSteppedProgressBar_Tests" */; 212 | buildPhases = ( 213 | FABA355B3417FEB982D2A38E /* [CP] Check Pods Manifest.lock */, 214 | 607FACE11AFB9204008FA782 /* Sources */, 215 | 607FACE21AFB9204008FA782 /* Frameworks */, 216 | 607FACE31AFB9204008FA782 /* Resources */, 217 | ); 218 | buildRules = ( 219 | ); 220 | dependencies = ( 221 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 222 | ); 223 | name = JKSteppedProgressBar_Tests; 224 | productName = Tests; 225 | productReference = 607FACE51AFB9204008FA782 /* JKSteppedProgressBar_Tests.xctest */; 226 | productType = "com.apple.product-type.bundle.unit-test"; 227 | }; 228 | /* End PBXNativeTarget section */ 229 | 230 | /* Begin PBXProject section */ 231 | 607FACC81AFB9204008FA782 /* Project object */ = { 232 | isa = PBXProject; 233 | attributes = { 234 | LastSwiftUpdateCheck = 0720; 235 | LastUpgradeCheck = 1020; 236 | ORGANIZATIONNAME = CocoaPods; 237 | TargetAttributes = { 238 | 607FACCF1AFB9204008FA782 = { 239 | CreatedOnToolsVersion = 6.3.1; 240 | LastSwiftMigration = 1020; 241 | ProvisioningStyle = Manual; 242 | }; 243 | 607FACE41AFB9204008FA782 = { 244 | CreatedOnToolsVersion = 6.3.1; 245 | LastSwiftMigration = 1020; 246 | TestTargetID = 607FACCF1AFB9204008FA782; 247 | }; 248 | }; 249 | }; 250 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "JKSteppedProgressBar" */; 251 | compatibilityVersion = "Xcode 3.2"; 252 | developmentRegion = en; 253 | hasScannedForEncodings = 0; 254 | knownRegions = ( 255 | en, 256 | Base, 257 | ar, 258 | ); 259 | mainGroup = 607FACC71AFB9204008FA782; 260 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | 607FACCF1AFB9204008FA782 /* JKSteppedProgressBar_Example */, 265 | 607FACE41AFB9204008FA782 /* JKSteppedProgressBar_Tests */, 266 | ); 267 | }; 268 | /* End PBXProject section */ 269 | 270 | /* Begin PBXResourcesBuildPhase section */ 271 | 607FACCE1AFB9204008FA782 /* Resources */ = { 272 | isa = PBXResourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 276 | 4A24CB2C1F66819D000F2175 /* Localizable.strings in Resources */, 277 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 278 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 607FACE31AFB9204008FA782 /* Resources */ = { 283 | isa = PBXResourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXResourcesBuildPhase section */ 290 | 291 | /* Begin PBXShellScriptBuildPhase section */ 292 | 4A4947DF1F46E52400BC624C /* ShellScript */ = { 293 | isa = PBXShellScriptBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | ); 297 | inputPaths = ( 298 | ); 299 | outputPaths = ( 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | shellScript = ""; 304 | }; 305 | A5B0DAFF32F00B676FB9EB45 /* [CP] Check Pods Manifest.lock */ = { 306 | isa = PBXShellScriptBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | inputPaths = ( 311 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 312 | "${PODS_ROOT}/Manifest.lock", 313 | ); 314 | name = "[CP] Check Pods Manifest.lock"; 315 | outputPaths = ( 316 | "$(DERIVED_FILE_DIR)/Pods-JKSteppedProgressBar_Example-checkManifestLockResult.txt", 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | shellPath = /bin/sh; 320 | 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"; 321 | showEnvVarsInLog = 0; 322 | }; 323 | C607A2CD4D69FA5D866293A2 /* [CP] Embed Pods Frameworks */ = { 324 | isa = PBXShellScriptBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | ); 328 | inputPaths = ( 329 | "${PODS_ROOT}/Target Support Files/Pods-JKSteppedProgressBar_Example/Pods-JKSteppedProgressBar_Example-frameworks.sh", 330 | "${BUILT_PRODUCTS_DIR}/JKSteppedProgressBar/JKSteppedProgressBar.framework", 331 | ); 332 | name = "[CP] Embed Pods Frameworks"; 333 | outputPaths = ( 334 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JKSteppedProgressBar.framework", 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | shellPath = /bin/sh; 338 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JKSteppedProgressBar_Example/Pods-JKSteppedProgressBar_Example-frameworks.sh\"\n"; 339 | showEnvVarsInLog = 0; 340 | }; 341 | FABA355B3417FEB982D2A38E /* [CP] Check Pods Manifest.lock */ = { 342 | isa = PBXShellScriptBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | ); 346 | inputPaths = ( 347 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 348 | "${PODS_ROOT}/Manifest.lock", 349 | ); 350 | name = "[CP] Check Pods Manifest.lock"; 351 | outputPaths = ( 352 | "$(DERIVED_FILE_DIR)/Pods-JKSteppedProgressBar_Tests-checkManifestLockResult.txt", 353 | ); 354 | runOnlyForDeploymentPostprocessing = 0; 355 | shellPath = /bin/sh; 356 | 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"; 357 | showEnvVarsInLog = 0; 358 | }; 359 | /* End PBXShellScriptBuildPhase section */ 360 | 361 | /* Begin PBXSourcesBuildPhase section */ 362 | 607FACCC1AFB9204008FA782 /* Sources */ = { 363 | isa = PBXSourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | 378D04DB20930891002D8218 /* CheckmarkViewController.swift in Sources */, 367 | 086EA9392088157100B17463 /* String+Utility.swift in Sources */, 368 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 369 | 08DF6C7C209188670004B506 /* ImageStepViewController.swift in Sources */, 370 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | 607FACE11AFB9204008FA782 /* Sources */ = { 375 | isa = PBXSourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | /* End PBXSourcesBuildPhase section */ 383 | 384 | /* Begin PBXTargetDependency section */ 385 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 386 | isa = PBXTargetDependency; 387 | target = 607FACCF1AFB9204008FA782 /* JKSteppedProgressBar_Example */; 388 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 389 | }; 390 | /* End PBXTargetDependency section */ 391 | 392 | /* Begin PBXVariantGroup section */ 393 | 4A24CB2E1F66819D000F2175 /* Localizable.strings */ = { 394 | isa = PBXVariantGroup; 395 | children = ( 396 | 4A24CB2D1F66819D000F2175 /* Base */, 397 | 4A24CB2F1F66819F000F2175 /* en */, 398 | 4A24CB301F6681A0000F2175 /* ar */, 399 | ); 400 | name = Localizable.strings; 401 | sourceTree = ""; 402 | }; 403 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 404 | isa = PBXVariantGroup; 405 | children = ( 406 | 607FACDA1AFB9204008FA782 /* Base */, 407 | 4A24CB281F668069000F2175 /* ar */, 408 | ); 409 | name = Main.storyboard; 410 | sourceTree = ""; 411 | }; 412 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 413 | isa = PBXVariantGroup; 414 | children = ( 415 | 607FACDF1AFB9204008FA782 /* Base */, 416 | 4A24CB291F668069000F2175 /* ar */, 417 | ); 418 | name = LaunchScreen.xib; 419 | sourceTree = ""; 420 | }; 421 | /* End PBXVariantGroup section */ 422 | 423 | /* Begin XCBuildConfiguration section */ 424 | 607FACED1AFB9204008FA782 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ALWAYS_SEARCH_USER_PATHS = NO; 428 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 430 | CLANG_CXX_LIBRARY = "libc++"; 431 | CLANG_ENABLE_MODULES = YES; 432 | CLANG_ENABLE_OBJC_ARC = YES; 433 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 434 | CLANG_WARN_BOOL_CONVERSION = YES; 435 | CLANG_WARN_COMMA = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 438 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 444 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 445 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 446 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 448 | CLANG_WARN_STRICT_PROTOTYPES = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CLANG_WARN_UNREACHABLE_CODE = YES; 451 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 452 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 453 | COPY_PHASE_STRIP = NO; 454 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 455 | ENABLE_STRICT_OBJC_MSGSEND = YES; 456 | ENABLE_TESTABILITY = YES; 457 | GCC_C_LANGUAGE_STANDARD = gnu99; 458 | GCC_DYNAMIC_NO_PIC = NO; 459 | GCC_NO_COMMON_BLOCKS = YES; 460 | GCC_OPTIMIZATION_LEVEL = 0; 461 | GCC_PREPROCESSOR_DEFINITIONS = ( 462 | "DEBUG=1", 463 | "$(inherited)", 464 | ); 465 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 466 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 467 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 468 | GCC_WARN_UNDECLARED_SELECTOR = YES; 469 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 470 | GCC_WARN_UNUSED_FUNCTION = YES; 471 | GCC_WARN_UNUSED_VARIABLE = YES; 472 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 473 | MTL_ENABLE_DEBUG_INFO = YES; 474 | ONLY_ACTIVE_ARCH = YES; 475 | SDKROOT = iphoneos; 476 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 477 | SWIFT_VERSION = 4.2; 478 | }; 479 | name = Debug; 480 | }; 481 | 607FACEE1AFB9204008FA782 /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | ALWAYS_SEARCH_USER_PATHS = NO; 485 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 486 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 487 | CLANG_CXX_LIBRARY = "libc++"; 488 | CLANG_ENABLE_MODULES = YES; 489 | CLANG_ENABLE_OBJC_ARC = YES; 490 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 491 | CLANG_WARN_BOOL_CONVERSION = YES; 492 | CLANG_WARN_COMMA = YES; 493 | CLANG_WARN_CONSTANT_CONVERSION = YES; 494 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 495 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 496 | CLANG_WARN_EMPTY_BODY = YES; 497 | CLANG_WARN_ENUM_CONVERSION = YES; 498 | CLANG_WARN_INFINITE_RECURSION = YES; 499 | CLANG_WARN_INT_CONVERSION = YES; 500 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 501 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 502 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 503 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 504 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 505 | CLANG_WARN_STRICT_PROTOTYPES = YES; 506 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 507 | CLANG_WARN_UNREACHABLE_CODE = YES; 508 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 509 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 510 | COPY_PHASE_STRIP = NO; 511 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 512 | ENABLE_NS_ASSERTIONS = NO; 513 | ENABLE_STRICT_OBJC_MSGSEND = YES; 514 | GCC_C_LANGUAGE_STANDARD = gnu99; 515 | GCC_NO_COMMON_BLOCKS = YES; 516 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 517 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 518 | GCC_WARN_UNDECLARED_SELECTOR = YES; 519 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 520 | GCC_WARN_UNUSED_FUNCTION = YES; 521 | GCC_WARN_UNUSED_VARIABLE = YES; 522 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 523 | MTL_ENABLE_DEBUG_INFO = NO; 524 | SDKROOT = iphoneos; 525 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 526 | SWIFT_VERSION = 4.2; 527 | VALIDATE_PRODUCT = YES; 528 | }; 529 | name = Release; 530 | }; 531 | 607FACF01AFB9204008FA782 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | baseConfigurationReference = F240FC41BB27546D84C7686A /* Pods-JKSteppedProgressBar_Example.debug.xcconfig */; 534 | buildSettings = { 535 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "${inherited}"; 536 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 537 | DEVELOPMENT_TEAM = ""; 538 | INFOPLIST_FILE = JKSteppedProgressBar/Info.plist; 539 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 540 | MODULE_NAME = ExampleApp; 541 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 542 | PRODUCT_NAME = "$(TARGET_NAME)"; 543 | PROVISIONING_PROFILE_SPECIFIER = ""; 544 | SWIFT_VERSION = 5.0; 545 | }; 546 | name = Debug; 547 | }; 548 | 607FACF11AFB9204008FA782 /* Release */ = { 549 | isa = XCBuildConfiguration; 550 | baseConfigurationReference = 0B84DACA8DB26D24C966F007 /* Pods-JKSteppedProgressBar_Example.release.xcconfig */; 551 | buildSettings = { 552 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "${inherited}"; 553 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 554 | DEVELOPMENT_TEAM = ""; 555 | INFOPLIST_FILE = JKSteppedProgressBar/Info.plist; 556 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 557 | MODULE_NAME = ExampleApp; 558 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 559 | PRODUCT_NAME = "$(TARGET_NAME)"; 560 | PROVISIONING_PROFILE_SPECIFIER = ""; 561 | SWIFT_VERSION = 5.0; 562 | }; 563 | name = Release; 564 | }; 565 | 607FACF31AFB9204008FA782 /* Debug */ = { 566 | isa = XCBuildConfiguration; 567 | baseConfigurationReference = B7760822DC581E7F95433F3E /* Pods-JKSteppedProgressBar_Tests.debug.xcconfig */; 568 | buildSettings = { 569 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "${inherited}"; 570 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 571 | GCC_PREPROCESSOR_DEFINITIONS = ( 572 | "DEBUG=1", 573 | "$(inherited)", 574 | ); 575 | INFOPLIST_FILE = Tests/Info.plist; 576 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 577 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 578 | PRODUCT_NAME = "$(TARGET_NAME)"; 579 | SWIFT_VERSION = 5.0; 580 | }; 581 | name = Debug; 582 | }; 583 | 607FACF41AFB9204008FA782 /* Release */ = { 584 | isa = XCBuildConfiguration; 585 | baseConfigurationReference = 0FABD168D9CED3EEBAB5D5A1 /* Pods-JKSteppedProgressBar_Tests.release.xcconfig */; 586 | buildSettings = { 587 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "${inherited}"; 588 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 589 | INFOPLIST_FILE = Tests/Info.plist; 590 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 591 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 592 | PRODUCT_NAME = "$(TARGET_NAME)"; 593 | SWIFT_VERSION = 5.0; 594 | }; 595 | name = Release; 596 | }; 597 | /* End XCBuildConfiguration section */ 598 | 599 | /* Begin XCConfigurationList section */ 600 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "JKSteppedProgressBar" */ = { 601 | isa = XCConfigurationList; 602 | buildConfigurations = ( 603 | 607FACED1AFB9204008FA782 /* Debug */, 604 | 607FACEE1AFB9204008FA782 /* Release */, 605 | ); 606 | defaultConfigurationIsVisible = 0; 607 | defaultConfigurationName = Release; 608 | }; 609 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JKSteppedProgressBar_Example" */ = { 610 | isa = XCConfigurationList; 611 | buildConfigurations = ( 612 | 607FACF01AFB9204008FA782 /* Debug */, 613 | 607FACF11AFB9204008FA782 /* Release */, 614 | ); 615 | defaultConfigurationIsVisible = 0; 616 | defaultConfigurationName = Release; 617 | }; 618 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JKSteppedProgressBar_Tests" */ = { 619 | isa = XCConfigurationList; 620 | buildConfigurations = ( 621 | 607FACF31AFB9204008FA782 /* Debug */, 622 | 607FACF41AFB9204008FA782 /* Release */, 623 | ); 624 | defaultConfigurationIsVisible = 0; 625 | defaultConfigurationName = Release; 626 | }; 627 | /* End XCConfigurationList section */ 628 | }; 629 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 630 | } 631 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar.xcodeproj/xcshareddata/xcschemes/JKSteppedProgressBar-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by jk on 09/13/2016. 6 | // Copyright (c) 2016 jk. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Base.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | JKSteppedProgressBar 4 | 5 | Created by Johnykutty on 9/11/17. 6 | Copyright © 2017 CocoaPods. All rights reserved. 7 | */ 8 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 66 | 78 | 84 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 177 | 189 | 195 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 307 | 319 | 325 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/CheckmarkViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CheckmarkViewController.swift 3 | // JKSteppedProgressBar_Example 4 | // 5 | // Created by Etienne Wojahn on 27.04.18. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import JKSteppedProgressBar 11 | 12 | class CheckmarkViewController: UIViewController { 13 | 14 | @IBOutlet weak var currentTabLabel: UILabel! 15 | @IBOutlet weak var progressbar: SteppedProgressBar! 16 | 17 | @IBOutlet weak var nextButton: UIButton! 18 | @IBOutlet weak var prevButton: UIButton! 19 | 20 | var inset: UIEdgeInsets { 21 | return UIEdgeInsets(top: 10, left: 10, bottom: 30, right: 30) 22 | } 23 | 24 | func configureTitleProgressBar() { 25 | progressbar.insets = inset 26 | progressbar.titles = ["Image 1".localized, "Image 2".localized, "Image 3".localized,] 27 | progressbar.activeImages = [ 28 | UIImage(named: "check")!, 29 | UIImage(named: "check")!, 30 | UIImage(named: "check")!, 31 | ] 32 | progressbar.tintActiveImage = true 33 | } 34 | 35 | // MARK: Misc 36 | func updateButtons(_ currentTab: Int) { 37 | nextButton.isEnabled = currentTab < progressbar.titles.count 38 | prevButton.isEnabled = currentTab > 0 39 | progressbar.currentTab = currentTab 40 | currentTabLabel.text = "\(currentTab)" 41 | } 42 | 43 | // MARK: lifecycle 44 | override func viewDidLoad() { 45 | super.viewDidLoad() 46 | configureTitleProgressBar() 47 | updateButtons(0) 48 | } 49 | 50 | // MARK: button actions 51 | @IBAction func next(_ sender: AnyObject) { 52 | var tab = progressbar.currentTab 53 | tab += 1 54 | updateButtons(tab) 55 | } 56 | 57 | @IBAction func prev(_ sender: AnyObject) { 58 | var tab = progressbar.currentTab 59 | tab -= 1 60 | updateButtons(tab) 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/ImageStepViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageStepViewController.swift 3 | // JKSteppedProgressBar_Example 4 | // 5 | // Created by Jayahari Vavachan on 4/25/18. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import JKSteppedProgressBar 11 | 12 | class ImageStepViewController: UIViewController { 13 | 14 | @IBOutlet weak var currentTabLabel: UILabel! 15 | @IBOutlet weak var progressbarWithImages: SteppedProgressBar! 16 | @IBOutlet weak var nextButton: UIButton! 17 | @IBOutlet weak var prevButton: UIButton! 18 | 19 | var inset: UIEdgeInsets { 20 | return UIEdgeInsets(top: 10, left: 10, bottom: 30, right: 30) 21 | } 22 | 23 | // MARK: UI configure methods 24 | func configureProgressBarWithImages() { 25 | progressbarWithImages.insets = inset 26 | progressbarWithImages.titles = ["Image 1".localized, "Image 2".localized, "Image 3".localized,] 27 | progressbarWithImages.images = [ 28 | UIImage(named: "DaisyDuck")!, 29 | UIImage(named: "MickeyMouse")!, 30 | UIImage(named: "MinnieMouse")!, 31 | ] 32 | 33 | // set the active step colors 34 | progressbarWithImages.activeStepColors = [ 35 | UIColor.red, 36 | UIColor.orange, 37 | UIColor.green, 38 | ] 39 | } 40 | 41 | // MARK: Misc 42 | func updateButtons(_ currentTab: Int) { 43 | nextButton.isEnabled = currentTab < progressbarWithImages.titles.count 44 | prevButton.isEnabled = currentTab > 0 45 | progressbarWithImages.currentTab = currentTab 46 | currentTabLabel.text = "\(currentTab)" 47 | } 48 | 49 | override func viewDidLoad() { 50 | super.viewDidLoad() 51 | 52 | configureProgressBarWithImages() 53 | updateButtons(0) 54 | } 55 | 56 | // MARK: button actions 57 | @IBAction func next(_ sender: AnyObject) { 58 | var tab = progressbarWithImages.currentTab 59 | tab += 1 60 | updateButtons(tab) 61 | } 62 | 63 | @IBAction func prev(_ sender: AnyObject) { 64 | var tab = progressbarWithImages.currentTab 65 | tab -= 1 66 | updateButtons(tab) 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/DaisyDuck.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "DaisyDuck.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/DaisyDuck.imageset/DaisyDuck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/Example/JKSteppedProgressBar/Images.xcassets/DaisyDuck.imageset/DaisyDuck.png -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/MickeyMouse.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "MickeyMouse.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/MickeyMouse.imageset/MickeyMouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/Example/JKSteppedProgressBar/Images.xcassets/MickeyMouse.imageset/MickeyMouse.png -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/MinnieMouse.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "MinnieMouse.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/MinnieMouse.imageset/MinnieMouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/Example/JKSteppedProgressBar/Images.xcassets/MinnieMouse.imageset/MinnieMouse.png -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/check.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "check.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Images.xcassets/check.imageset/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/Example/JKSteppedProgressBar/Images.xcassets/check.imageset/check.png -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/String+Utility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+Utility.swift 3 | // JKSteppedProgressBar_Example 4 | // 5 | // Created by Jayahari Vavachan on 4/18/18. 6 | // Copyright © 2018 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | var localized: String { 13 | return NSLocalizedString(self, comment: "") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by Johnykutty Mathew on 12/09/16. 6 | // Copyright © 2016 Johnykutty Mathew. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import JKSteppedProgressBar 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var currentTabLabel: UILabel! 15 | @IBOutlet weak var progressbar: SteppedProgressBar! 16 | 17 | @IBOutlet weak var nextButton: UIButton! 18 | @IBOutlet weak var prevButton: UIButton! 19 | 20 | var inset: UIEdgeInsets { 21 | return UIEdgeInsets(top: 10, left: 10, bottom: 30, right: 30) 22 | } 23 | 24 | func configureTitleProgressBar() { 25 | progressbar.insets = inset 26 | progressbar.titles = ["Step 1".localized, "Step 2".localized, "Step 3\nstep again".localized,] 27 | } 28 | 29 | // MARK: Misc 30 | func updateButtons(_ currentTab: Int) { 31 | nextButton.isEnabled = currentTab < progressbar.titles.count 32 | prevButton.isEnabled = currentTab > 0 33 | progressbar.currentTab = currentTab 34 | currentTabLabel.text = "\(currentTab)" 35 | } 36 | 37 | // MARK: lifecycle 38 | override func viewDidLoad() { 39 | super.viewDidLoad() 40 | configureTitleProgressBar() 41 | updateButtons(0) 42 | } 43 | 44 | // MARK: button actions 45 | @IBAction func next(_ sender: AnyObject) { 46 | var tab = progressbar.currentTab 47 | tab += 1 48 | updateButtons(tab) 49 | } 50 | 51 | @IBAction func prev(_ sender: AnyObject) { 52 | var tab = progressbar.currentTab 53 | tab -= 1 54 | updateButtons(tab) 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/ar.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2015 CocoaPods. All rights reserved."; ObjectID = "8ie-xW-0ye"; */ 3 | "8ie-xW-0ye.text" = " Copyright (c) 2015 CocoaPods. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "JKSteppedProgressBar"; ObjectID = "kId-c2-rCX"; */ 6 | "kId-c2-rCX.text" = "JKSteppedProgressBar"; 7 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/ar.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | JKSteppedProgressBar 4 | 5 | Created by Johnykutty on 9/11/17. 6 | Copyright © 2017 CocoaPods. All rights reserved. 7 | */ 8 | "Step 1" = "الخطوة 1"; 9 | "Step 2" = "الخطوة 2"; 10 | "Step 3 step again" = "الخطوة 3 خطوة مرة أخرى"; 11 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/ar.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = "0"; ObjectID = "WCC-jO-kGE"; */ 3 | "WCC-jO-kGE.text" = "0"; 4 | 5 | /* Class = "UIButton"; normalTitle = "-"; ObjectID = "cim-ZE-7AD"; */ 6 | "cim-ZE-7AD.normalTitle" = "-"; 7 | 8 | /* Class = "UIButton"; normalTitle = "+"; ObjectID = "eHz-z6-WGH"; */ 9 | "eHz-z6-WGH.normalTitle" = "+"; 10 | 11 | /* Class = "UILabel"; text = "Current tab"; ObjectID = "xz1-Jy-Azt"; */ 12 | "xz1-Jy-Azt.text" = "Current tab"; 13 | -------------------------------------------------------------------------------- /Example/JKSteppedProgressBar/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | JKSteppedProgressBar 4 | 5 | Created by Johnykutty on 9/11/17. 6 | Copyright © 2017 CocoaPods. All rights reserved. 7 | */ 8 | "Step 1" = "Step 1"; 9 | "Step 2" = "Step 2"; 10 | "Step 3 step again" = "Step 3 step again"; 11 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | platform :ios, '8.3' 4 | 5 | target 'JKSteppedProgressBar_Example' do 6 | pod 'JKSteppedProgressBar', :path => '../' 7 | 8 | target 'JKSteppedProgressBar_Tests' do 9 | inherit! :search_paths 10 | 11 | 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - JKSteppedProgressBar (0.5.1) 3 | 4 | DEPENDENCIES: 5 | - JKSteppedProgressBar (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | JKSteppedProgressBar: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | JKSteppedProgressBar: b55bcac777c5b256375d6ae75cca93b75c5d8672 13 | 14 | PODFILE CHECKSUM: ba934cd1a7deb75a79c480358beefa12dc74330d 15 | 16 | COCOAPODS: 1.7.4 17 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure({ 24 | // Put the code you want to measure the time of here. 25 | }) 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /JKSteppedProgressBar.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint JKSteppedProgressBar.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'JKSteppedProgressBar' 11 | s.version = '0.5.1' 12 | s.summary = 'JKSteppedProgressBar is an iOS UI component that indicates step by step progress' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | JKSteppedProgressBar is an iOS UI component written in Swift to show step by step progress 22 | DESC 23 | 24 | s.homepage = 'https://github.com/Johnykutty/JKSteppedProgressBar' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'Johnykutty Mathew' => 'johnykutty.mathew@gmail.com' } 28 | s.source = { :git => 'https://github.com/jkmathew/JKSteppedProgressBar.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'JKSteppedProgressBar/Classes/*.swift' 34 | 35 | # s.resource_bundles = { 36 | # 'JKSteppedProgressBar' => ['JKSteppedProgressBar/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | s.frameworks = 'UIKit' 41 | end 42 | -------------------------------------------------------------------------------- /JKSteppedProgressBar/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/JKSteppedProgressBar/Assets/.gitkeep -------------------------------------------------------------------------------- /JKSteppedProgressBar/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jkmathew/JKSteppedProgressBar/53c9f7749353fa3a1fd7f8c783d8793446fe49b8/JKSteppedProgressBar/Classes/.gitkeep -------------------------------------------------------------------------------- /JKSteppedProgressBar/Classes/CGPoint+JK.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGPoint+JK.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by Jayahari Vavachan on 4/18/18. 6 | // 7 | 8 | import Foundation 9 | 10 | extension CGRect { 11 | /* 12 | * Makes a rect with the given center and diamater 13 | */ 14 | static func make(center point: CGPoint, diameter: CGFloat) -> CGRect { 15 | let radius = diameter / 2.0 16 | let rect = CGRect(x: point.x - radius, y: point.y - radius, width: diameter, height: diameter) 17 | return rect 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /JKSteppedProgressBar/Classes/NSAttributedString+JK.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+JK.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by Jayahari Vavachan on 6/12/18. 6 | // 7 | 8 | import Foundation 9 | 10 | extension NSAttributedString { 11 | func draw(center: CGPoint) { 12 | var rect = self.boundingRect(with: CGSize(width: 1000, height: 1000), 13 | options: [.usesFontLeading, .usesLineFragmentOrigin], 14 | context: nil) 15 | let size = rect.size 16 | let origin = CGPoint(x: center.x - size.width / 2.0, y: center.y - size.height / 2.0) 17 | rect.origin = origin 18 | self.draw(in: rect) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /JKSteppedProgressBar/Classes/SteppedProgressBar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SteppedProgressBar.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by Johnykutty Mathew on 12/09/16. 6 | // Copyright © 2016 Johnykutty Mathew. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public let SteppedProgressBarAutomaticDimension: CGFloat = -1 12 | 13 | public enum StepDrawingMode: Int { 14 | case fill 15 | case drawIndex 16 | case image 17 | } 18 | 19 | @IBDesignable 20 | open class SteppedProgressBar: UIView { 21 | 22 | // MARK: PROPERTIES 23 | 24 | let paragraphStyle = NSMutableParagraphStyle() 25 | 26 | // MARK: IBInspectable Properties 27 | 28 | @IBInspectable open var activeColor: UIColor = UIColor.green { 29 | didSet { 30 | self.setNeedsDisplay() 31 | } 32 | } 33 | 34 | @IBInspectable open var inactiveColor: UIColor = UIColor.gray { 35 | didSet { 36 | self.setNeedsDisplay() 37 | } 38 | } 39 | 40 | @IBInspectable open var inactiveTextColor: UIColor = UIColor.gray { 41 | didSet { 42 | self.setNeedsDisplay() 43 | } 44 | } 45 | 46 | @IBInspectable open var circleRadius: CGFloat = 20 { 47 | didSet { 48 | self.setNeedsDisplay() 49 | } 50 | } 51 | 52 | // Addressing issue #3 53 | // https://github.com/jkmathew/JKSteppedProgressBar/issues/3 54 | @IBInspectable open var titleOffset: CGFloat = 0 { 55 | didSet { 56 | self.setNeedsDisplay() 57 | } 58 | } 59 | 60 | @IBInspectable open var circleSpacing: CGFloat = SteppedProgressBarAutomaticDimension { 61 | didSet { 62 | self.setNeedsDisplay() 63 | } 64 | } 65 | 66 | @IBInspectable open var lineWidth: CGFloat = 2 { 67 | didSet { 68 | self.setNeedsDisplay() 69 | } 70 | } 71 | 72 | 73 | @IBInspectable open var currentTab: Int = 0 { 74 | didSet { 75 | self.setNeedsDisplay() 76 | } 77 | } 78 | 79 | // Changes the tint color of theactiveImages image to the activeColor 80 | @IBInspectable open var tintActiveImage = false 81 | @IBInspectable open var justCheckCompleted = true 82 | 83 | open var stepDrawingMode: StepDrawingMode = .drawIndex { 84 | didSet { 85 | self.setNeedsDisplay() 86 | } 87 | } 88 | 89 | open var insets: UIEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) { 90 | didSet { 91 | self.setNeedsDisplay() 92 | } 93 | } 94 | 95 | open var titles = ["One", "Two","Three", "Four","Five", "Six"] { 96 | didSet { 97 | self.setNeedsDisplay() 98 | } 99 | } 100 | 101 | var availableFrame: CGRect { 102 | var correctedFrame = bounds 103 | correctedFrame.origin.x = insets.left 104 | correctedFrame.origin.y = insets.top 105 | 106 | correctedFrame.size.width -= insets.left + insets.right 107 | correctedFrame.size.height -= insets.top + insets.bottom 108 | 109 | return correctedFrame 110 | } 111 | 112 | /* 113 | This will redraw and change color for the steps which are done. For example, if we set this as Red, Orange, 114 | Yellow, Green, then when you are at step one, it(circle and lines to circle) be Red, and when you are in second 115 | step, line and circles till that step(circle 1, line 1, circle 2) will be Orange, and so on.., then, when you are 116 | in fourth step it wil be Green from start circle to end circle. There by you can show the user a level of 117 | completion if wanted through colors. 118 | */ 119 | 120 | open var activeStepColors: [UIColor]? { 121 | didSet { 122 | self.setNeedsDisplay() 123 | } 124 | } 125 | 126 | // MARK: Image Helper properties 127 | 128 | /* 129 | * setting images will only show the images instead of any text mentioned 130 | */ 131 | open var images: [UIImage]? { 132 | didSet { 133 | stepDrawingMode = .image 134 | self.setNeedsDisplay() 135 | } 136 | } 137 | 138 | open var activeImages: [UIImage]? { 139 | didSet { 140 | self.setNeedsDisplay() 141 | } 142 | } 143 | 144 | 145 | // MARK: Private Properties 146 | private var actualSpacing: CGFloat { 147 | return (circleSpacing == SteppedProgressBarAutomaticDimension) 148 | ? (availableFrame.width - 6.0 - (CGFloat(numberOfItems) * circleRadius)) / CGFloat(numberOfItems - 1) 149 | : circleSpacing 150 | } 151 | 152 | private var languageFactor: CGFloat { 153 | return (UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft) ? -1 : 1 154 | } 155 | 156 | private var numberOfItems: Int { 157 | return stepDrawingMode == .image ? (images ?? []).count : titles.count 158 | } 159 | 160 | 161 | // MARK: METHODS 162 | 163 | // MARK: View Lifecycle Methods 164 | 165 | override open func awakeFromNib() { 166 | super.awakeFromNib() 167 | paragraphStyle.alignment = .center 168 | } 169 | 170 | override open func draw(_ rect: CGRect) { 171 | let context = UIGraphicsGetCurrentContext() 172 | 173 | if currentTab == 0 { 174 | drawTabs(from: 0, to: numberOfItems, color: inactiveColor, textColor: inactiveTextColor) 175 | } else if currentTab == numberOfItems { 176 | drawTabs(from: 0, to: numberOfItems, color: activeStepColor(currentTab), textColor: activeStepColor(currentTab)) 177 | } 178 | else { 179 | // Addressing issue #3 180 | // https://github.com/jkmathew/JKSteppedProgressBar/issues/3 181 | // Drawing in the order 1.inactive, 2.Line between active and inactive, 3.Active to avoid overlaping issue 182 | let end = drawTabs(from: currentTab, to: numberOfItems, color: inactiveColor, textColor: inactiveTextColor).start 183 | let path = UIBezierPath() 184 | path.lineWidth = lineWidth 185 | 186 | var start = end 187 | start.x -= languageFactor * actualSpacing 188 | path.move(to: start) 189 | path.addLine(to: end) 190 | context?.setStrokeColor(inactiveColor.cgColor) 191 | path.stroke() 192 | 193 | drawTabs(from: 0, to: currentTab , color: activeStepColor(currentTab), textColor: activeStepColor(currentTab)) 194 | 195 | } 196 | } 197 | 198 | override open func layoutSubviews() { 199 | super.layoutSubviews() 200 | self.setNeedsDisplay() 201 | } 202 | 203 | // MARK: Draw Helper Methods 204 | 205 | @discardableResult 206 | func drawTabs(from begin: Int, to end: Int, color: UIColor, textColor: UIColor) -> (start: CGPoint, end: CGPoint) { 207 | let halfX = (CGFloat(numberOfItems - 1) * (actualSpacing + circleRadius) / 2.0) 208 | let startX = availableFrame.midX - languageFactor * halfX 209 | let x = startX + languageFactor * (actualSpacing + circleRadius) * CGFloat(begin) 210 | var point = CGPoint(x: x, y: availableFrame.midY) 211 | var start = point 212 | start.x -= languageFactor * circleRadius / 2.0 213 | 214 | let path = UIBezierPath() 215 | path.lineWidth = lineWidth 216 | for i in begin.. i else { 241 | return 242 | } 243 | ( images ?? [] )[i].draw(inside: rect) 244 | } 245 | 246 | /* 247 | * Draws the successImage. If tintActiveImage change the tint of the UIImage 248 | */ 249 | func drawSuccessImage(step i: Int, at rect: CGRect) { 250 | guard ( activeImages ?? [] ).count > i else { 251 | drawImage(step: i, at: rect) 252 | return 253 | } 254 | (tintActiveImage 255 | ? ( activeImages ?? [] )[i].imageWithColor(activeColor) 256 | : ( activeImages ?? [] )[i]) 257 | .draw(inside: rect) 258 | } 259 | 260 | func draw(step i: Int, path: UIBezierPath, start point: inout CGPoint, textColor: UIColor) { 261 | let buttonRect = CGRect.make(center: point, diameter: circleRadius) 262 | 263 | // Check if images are set and decide what image to draw 264 | if ( images ?? [] ).count > i || ( activeImages ?? [] ).count > i { 265 | if (i < currentTab - (justCheckCompleted ? 1 : 0)) { 266 | drawSuccessImage(step: i, at: buttonRect) 267 | } else { 268 | drawImage(step: i, at: buttonRect) 269 | } 270 | } 271 | 272 | //draw circle 273 | path.move(to: point) 274 | let circlePath = UIBezierPath(ovalIn: buttonRect) 275 | 276 | #if swift(>=4.0) 277 | var attributes = [NSAttributedString.Key.foregroundColor : textColor, NSAttributedString.Key.paragraphStyle: paragraphStyle] 278 | #else 279 | var attributes = [NSForegroundColorAttributeName : textColor, NSParagraphStyleAttributeName: paragraphStyle] 280 | #endif 281 | 282 | let index = i 283 | 284 | // If a successImage was drawn dont draw text under it 285 | if index >= currentTab - (justCheckCompleted ? 1 : 0) || ( activeImages ?? [] ).count <= index { 286 | //draw index 287 | if stepDrawingMode == .drawIndex { 288 | let buttonTitle = "\(index + 1)" 289 | let font = UIFont.boldSystemFont(ofSize: 14.0) 290 | #if swift(>=4.0) 291 | attributes[NSAttributedString.Key.font] = font 292 | #else 293 | attributes[NSFontAttributeName] = font 294 | #endif 295 | let attributedString = NSAttributedString(string: buttonTitle, attributes: attributes) 296 | attributedString.draw(center: point) 297 | } 298 | } 299 | 300 | path.append(circlePath) 301 | 302 | var titleCenter = point 303 | titleCenter.y += circleRadius * 0.75 + titleOffset 304 | let title = titles[index] 305 | #if swift(>=4.0) 306 | attributes[NSAttributedString.Key.font] = UIFont.boldSystemFont(ofSize: 12.0) 307 | #else 308 | attributes[NSFontAttributeName] = UIFont.boldSystemFont(ofSize: 12.0) 309 | #endif 310 | let attributedString = NSAttributedString(string: title, attributes: attributes) 311 | attributedString.draw(center: titleCenter) 312 | 313 | point.x += languageFactor * circleRadius / 2.0 314 | path.move(to: point) 315 | 316 | } 317 | } 318 | 319 | private extension SteppedProgressBar { 320 | 321 | /* Returns the active step color to the caller, if its mentioned in activeStepColors array. If not return the 322 | activeColor */ 323 | func activeStepColor(_ tabIndex: Int) -> UIColor { 324 | var activeStepColor = activeColor 325 | if let activeStepColors = activeStepColors, tabIndex - 1 < activeStepColors.count { 326 | activeStepColor = activeStepColors[tabIndex - 1] 327 | } 328 | return activeStepColor 329 | } 330 | } 331 | -------------------------------------------------------------------------------- /JKSteppedProgressBar/Classes/UIImage+UIColor.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UIImage { 4 | func imageWithColor(_ color: UIColor) -> UIImage { 5 | var image = withRenderingMode(.alwaysTemplate) 6 | UIGraphicsBeginImageContextWithOptions(size, false, scale) 7 | color.set() 8 | image.draw(in: CGRect(x: 0, y: 0, width: size.width, height: size.height)) 9 | image = UIGraphicsGetImageFromCurrentImageContext()! 10 | UIGraphicsEndImageContext() 11 | return image 12 | } 13 | 14 | func draw(inside rect: CGRect) { 15 | let insideRect = rect.insetBy(dx: 8, dy: 8) 16 | self.draw(in: insideRect) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 jk 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /NSAttributedString+JK.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NSAttributedString+JK.swift 3 | // JKSteppedProgressBar 4 | // 5 | // Created by Jayahari Vavachan on 6/12/18. 6 | // 7 | 8 | import Foundation 9 | 10 | extension NSAttributedString { 11 | func draw(center: CGPoint) { 12 | var rect = self.boundingRect(with: CGSize(width: 1000, height: 1000), options: .usesFontLeading, context: nil) 13 | let size = rect.size 14 | let origin = CGPoint(x: center.x - size.width / 2.0, y: center.y - size.height / 2.0) 15 | rect.origin = origin 16 | self.draw(in: rect) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Change\: Short Description 6 | 7 | Long Decription 8 | 9 | issues resolved: 17 10 | 11 | screenshots: if its a new feature or UI issue fix. keep the screenshots fit into the screen and easily identifiable. 12 | 13 | ### Change Short titles 14 | 15 | 1. Feature: Any new feature 16 | 2. Fix: Any bug/issue fix 17 | 3. Docs: Any document update 18 | 3. Screenshots -if any 19 | 20 | 21 | 22 | ### Example 23 | 24 | Feature: Add Image Support --> 25 | 26 | Added support to mention images by users by setting it to a property. It also allows the users to set the title with it. --> 27 | 28 | Resolves #17 --> 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JKSteppedProgressBar 2 | 3 | [![CI Status](https://travis-ci.org/jkmathew/JKSteppedProgressBar.svg?branch=master&style=flat)](https://travis-ci.org/jkmathew/JKSteppedProgressBar) 4 | [![Version](https://img.shields.io/cocoapods/v/JKSteppedProgressBar.svg?style=flat)](http://cocoapods.org/pods/JKSteppedProgressBar) 5 | [![Platform](https://img.shields.io/cocoapods/p/JKSteppedProgressBar.svg?style=flat)](http://cocoapods.org/pods/JKSteppedProgressBar) 6 | [![License](https://img.shields.io/cocoapods/l/JKSteppedProgressBar.svg?style=flat)](http://cocoapods.org/pods/JKSteppedProgressBar) 7 | 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | To use JKSteppedProgressBar Xcode 8.0 or later is required 14 | 15 | ## Installation 16 | JKSteppedProgressBar is available through [CocoaPods](http://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | ```ruby 19 | pod 'JKSteppedProgressBar' 20 | ``` 21 | JKSteppedProgressBar can be added and configured directly from storyboard. 22 | 23 | ## How to Add Stepped Progress Bar 24 | - Add a blank UIView and set constraints 25 | - Set the Class & Module from identity inspector 26 | - Set the active & inactive color from Attributes inspector 27 | 28 | ### setting custom title 29 | - Use the IBOutlet instance to set properties 30 | - Set your title array to _titles_ property 31 | ``` 32 | progressbar.titles = ["Step 1", "Step 2", "Step 3"] 33 | ``` 34 | ### setting custom title and images 35 | - Use the IBOutlet instance to set properties 36 | - Set your title array to _titles_ property 37 | - Set your images array to _images_ property 38 | ``` 39 | progressbar.titles = ["Step 1", "Step 2", "Step 3"] 40 | progressbar.images = [ 41 | UIImage(named: "DaisyDuck")!, 42 | UIImage(named: "MickeyMouse")!, 43 | UIImage(named: "MinnieMouse")!, 44 | ] 45 | ``` 46 | ### setting custom color for the progress 47 | - after setting your titles or images, set the property **activeStepColors** 48 | ``` 49 | progressbar.activeStepColors = [ 50 | UIColor.red, 51 | UIColor.orange, 52 | UIColor.green, 53 | ] 54 | ``` 55 | - this will change the color whenever you are at that step. For example, when you are at step 1, it will be red. And in second step, the whole progress bar will become orange and when you are at the last step, it will be green. So that the user will get a feeling of accomplishment through the steps. 56 | - 57 | ### setting custom active-images 58 | - this will make it possible to use this as progress for forms 59 | - Set your images to *activeImages* property 60 | - Set your tintActiveImage to tint the images to the active color (default: false) 61 | - Set your justCheckCompleted to select everything behind the current step but keep the current step highlighted (default: true) 62 | 63 | ``` 64 | progressbar.activeImages = [ 65 | UIImage(named: "check")!, 66 | UIImage(named: "check")!, 67 | UIImage(named: "check")!, 68 | ] 69 | progressbar.tintActiveImage = true 70 | progressbar.justCheckCompleted = false 71 | ``` 72 | 73 | ## Demo 74 | [![Demo Video](http://img.youtube.com/vi/gKFrOL7nD6I/0.jpg)](http://www.youtube.com/watch?v=gKFrOL7nD6I) 75 | 76 | 77 | 78 | ## TODO 79 | - [x] Add image for steps 80 | - [x] Respect language direction for drawing 81 | 82 | ## Author 83 | 84 | - Johnykutty, johnykutty.mathew@gmail.com 85 | - Jayahari V, jayahariv88@gmail.com 86 | - And [others](https://github.com/jkmathew/JKSteppedProgressBar/graphs/contributors) 87 | 88 | ## License 89 | 90 | JKSteppedProgressBar is available under the MIT license. See the LICENSE file for more info. 91 | 92 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------