├── .gitignore ├── JESCircularProgressView.podspec ├── JESCircularProgressView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── JESCircularProgressView ├── Classes │ ├── JESCircularProgressView.h │ ├── JESCircularProgressView.m │ ├── NSBezierPath+BezierPathQuartzUtilities.h │ └── NSBezierPath+BezierPathQuartzUtilities.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── InfoPlist.strings ├── JESAppDelegate.h ├── JESAppDelegate.m ├── JESCircularProgressView-Info.plist ├── JESCircularProgressView-Prefix.pch ├── MainMenu.xib ├── en.lproj │ └── Credits.rtf └── main.m ├── LICENSE ├── README.md └── screenshots ├── progress.gif └── progressview.png /.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 | # CocoaPods 23 | Pods 24 | 25 | -------------------------------------------------------------------------------- /JESCircularProgressView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "JESCircularProgressView" 3 | s.version = "0.0.3" 4 | s.summary = "A little circular progressview for OSX that looks like the one used in the app store." 5 | s.homepage = "https://github.com/jurre/JESCircularProgressView" 6 | s.screenshots = "https://raw.github.com/jurre/JESCircularProgressView/master/screenshots/progressview.png" 7 | s.license = "MIT" 8 | s.license = { :type => "MIT", :file => "LICENSE" } 9 | s.author = { "jurre" => "jurrestender+github@gmail.com" } 10 | s.platform = :osx 11 | s.source = { :git => "https://github.com/jurre/JESCircularProgressView.git", :tag => "0.0.3" } 12 | s.source_files = "JESCircularProgressView/Classes", "JESCircularProgressView/Classes/**/*.{h,m}" 13 | s.frameworks = "Quartz" 14 | s.requires_arc = true 15 | end 16 | -------------------------------------------------------------------------------- /JESCircularProgressView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0710DEFD185E75AC008E6F96 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0710DEFC185E75AC008E6F96 /* MainMenu.xib */; }; 11 | 0710DF03185E7799008E6F96 /* JESCircularProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 07238C77185E51BB0055F3FE /* JESCircularProgressView.m */; }; 12 | 07238C3F185E34550055F3FE /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07238C3E185E34550055F3FE /* Cocoa.framework */; }; 13 | 07238C7D185E53B80055F3FE /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07238C7C185E53B80055F3FE /* Quartz.framework */; }; 14 | 076D6842185E7822004CB332 /* NSBezierPath+BezierPathQuartzUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 07238C73185E358D0055F3FE /* NSBezierPath+BezierPathQuartzUtilities.m */; }; 15 | 076D6845185E7851004CB332 /* JESAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 07238C51185E34550055F3FE /* JESAppDelegate.m */; }; 16 | 076D6847185E78CD004CB332 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 076D6846185E78CD004CB332 /* InfoPlist.strings */; }; 17 | 076D684A185E7AA9004CB332 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 076D6848185E7AA9004CB332 /* Credits.rtf */; }; 18 | C0A102D11A85A7A50026E643 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A102D01A85A7A50026E643 /* main.m */; }; 19 | C0A102D31A85A7B20026E643 /* JESCircularProgressView-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C0A102D21A85A7B20026E643 /* JESCircularProgressView-Info.plist */; }; 20 | C0A102D61A85A7C20026E643 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C0A102D51A85A7C20026E643 /* Images.xcassets */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 0710DEFC185E75AC008E6F96 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainMenu.xib; path = JESCircularProgressView/MainMenu.xib; sourceTree = SOURCE_ROOT; }; 25 | 07238C3B185E34550055F3FE /* JESCircularProgressView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JESCircularProgressView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 07238C3E185E34550055F3FE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 27 | 07238C41185E34550055F3FE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 28 | 07238C42185E34550055F3FE /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 29 | 07238C43185E34550055F3FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | 07238C50185E34550055F3FE /* JESAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JESAppDelegate.h; sourceTree = ""; }; 31 | 07238C51185E34550055F3FE /* JESAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JESAppDelegate.m; sourceTree = ""; }; 32 | 07238C5C185E34550055F3FE /* JESCircularProgressViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JESCircularProgressViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 07238C5D185E34550055F3FE /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 34 | 07238C72185E358D0055F3FE /* JESCircularProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JESCircularProgressView.h; path = Classes/JESCircularProgressView.h; sourceTree = ""; }; 35 | 07238C73185E358D0055F3FE /* NSBezierPath+BezierPathQuartzUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSBezierPath+BezierPathQuartzUtilities.m"; path = "Classes/NSBezierPath+BezierPathQuartzUtilities.m"; sourceTree = ""; }; 36 | 07238C77185E51BB0055F3FE /* JESCircularProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JESCircularProgressView.m; path = Classes/JESCircularProgressView.m; sourceTree = ""; }; 37 | 07238C78185E51BB0055F3FE /* NSBezierPath+BezierPathQuartzUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSBezierPath+BezierPathQuartzUtilities.h"; path = "Classes/NSBezierPath+BezierPathQuartzUtilities.h"; sourceTree = ""; }; 38 | 07238C7C185E53B80055F3FE /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; }; 39 | 076D6846185E78CD004CB332 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = JESCircularProgressView/InfoPlist.strings; sourceTree = SOURCE_ROOT; }; 40 | 076D6849185E7AA9004CB332 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = JESCircularProgressView/en.lproj/Credits.rtf; sourceTree = SOURCE_ROOT; }; 41 | C0A102D01A85A7A50026E643 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = JESCircularProgressView/main.m; sourceTree = SOURCE_ROOT; }; 42 | C0A102D21A85A7B20026E643 /* JESCircularProgressView-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "JESCircularProgressView-Info.plist"; path = "JESCircularProgressView/JESCircularProgressView-Info.plist"; sourceTree = SOURCE_ROOT; }; 43 | C0A102D41A85A7B70026E643 /* JESCircularProgressView-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "JESCircularProgressView-Prefix.pch"; path = "JESCircularProgressView/JESCircularProgressView-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 44 | C0A102D51A85A7C20026E643 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 07238C38185E34550055F3FE /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 07238C7D185E53B80055F3FE /* Quartz.framework in Frameworks */, 53 | 07238C3F185E34550055F3FE /* Cocoa.framework in Frameworks */, 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXFrameworksBuildPhase section */ 58 | 59 | /* Begin PBXGroup section */ 60 | 07238C32185E34550055F3FE = { 61 | isa = PBXGroup; 62 | children = ( 63 | 07238C44185E34550055F3FE /* JESCircularProgressView */, 64 | 07238C3D185E34550055F3FE /* Frameworks */, 65 | 07238C3C185E34550055F3FE /* Products */, 66 | ); 67 | sourceTree = ""; 68 | }; 69 | 07238C3C185E34550055F3FE /* Products */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 07238C3B185E34550055F3FE /* JESCircularProgressView.app */, 73 | 07238C5C185E34550055F3FE /* JESCircularProgressViewTests.xctest */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | 07238C3D185E34550055F3FE /* Frameworks */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 07238C7C185E53B80055F3FE /* Quartz.framework */, 82 | 07238C3E185E34550055F3FE /* Cocoa.framework */, 83 | 07238C5D185E34550055F3FE /* XCTest.framework */, 84 | 07238C40185E34550055F3FE /* Other Frameworks */, 85 | ); 86 | name = Frameworks; 87 | sourceTree = ""; 88 | }; 89 | 07238C40185E34550055F3FE /* Other Frameworks */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 07238C41185E34550055F3FE /* AppKit.framework */, 93 | 07238C42185E34550055F3FE /* CoreData.framework */, 94 | 07238C43185E34550055F3FE /* Foundation.framework */, 95 | ); 96 | name = "Other Frameworks"; 97 | sourceTree = ""; 98 | }; 99 | 07238C44185E34550055F3FE /* JESCircularProgressView */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 07792171185E709400CF80E7 /* Classes */, 103 | 07238C50185E34550055F3FE /* JESAppDelegate.h */, 104 | 07238C51185E34550055F3FE /* JESAppDelegate.m */, 105 | 0710DEFC185E75AC008E6F96 /* MainMenu.xib */, 106 | C0A102D51A85A7C20026E643 /* Images.xcassets */, 107 | 07238C45185E34550055F3FE /* Supporting Files */, 108 | ); 109 | path = JESCircularProgressView; 110 | sourceTree = ""; 111 | }; 112 | 07238C45185E34550055F3FE /* Supporting Files */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | C0A102D41A85A7B70026E643 /* JESCircularProgressView-Prefix.pch */, 116 | C0A102D21A85A7B20026E643 /* JESCircularProgressView-Info.plist */, 117 | C0A102D01A85A7A50026E643 /* main.m */, 118 | 076D6848185E7AA9004CB332 /* Credits.rtf */, 119 | 076D6846185E78CD004CB332 /* InfoPlist.strings */, 120 | ); 121 | name = "Supporting Files"; 122 | path = JESCircularProgressView; 123 | sourceTree = ""; 124 | }; 125 | 07238C75185E51580055F3FE /* Categories */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 07238C78185E51BB0055F3FE /* NSBezierPath+BezierPathQuartzUtilities.h */, 129 | 07238C73185E358D0055F3FE /* NSBezierPath+BezierPathQuartzUtilities.m */, 130 | ); 131 | name = Categories; 132 | sourceTree = ""; 133 | }; 134 | 07792171185E709400CF80E7 /* Classes */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 07238C75185E51580055F3FE /* Categories */, 138 | 07238C72185E358D0055F3FE /* JESCircularProgressView.h */, 139 | 07238C77185E51BB0055F3FE /* JESCircularProgressView.m */, 140 | ); 141 | name = Classes; 142 | sourceTree = ""; 143 | }; 144 | /* End PBXGroup section */ 145 | 146 | /* Begin PBXNativeTarget section */ 147 | 07238C3A185E34550055F3FE /* JESCircularProgressView */ = { 148 | isa = PBXNativeTarget; 149 | buildConfigurationList = 07238C6C185E34550055F3FE /* Build configuration list for PBXNativeTarget "JESCircularProgressView" */; 150 | buildPhases = ( 151 | 07238C37185E34550055F3FE /* Sources */, 152 | 07238C38185E34550055F3FE /* Frameworks */, 153 | 07238C39185E34550055F3FE /* Resources */, 154 | ); 155 | buildRules = ( 156 | ); 157 | dependencies = ( 158 | ); 159 | name = JESCircularProgressView; 160 | productName = JESCircularProgressView; 161 | productReference = 07238C3B185E34550055F3FE /* JESCircularProgressView.app */; 162 | productType = "com.apple.product-type.application"; 163 | }; 164 | /* End PBXNativeTarget section */ 165 | 166 | /* Begin PBXProject section */ 167 | 07238C33185E34550055F3FE /* Project object */ = { 168 | isa = PBXProject; 169 | attributes = { 170 | CLASSPREFIX = JES; 171 | LastUpgradeCheck = 0500; 172 | ORGANIZATIONNAME = jurrestender; 173 | }; 174 | buildConfigurationList = 07238C36185E34550055F3FE /* Build configuration list for PBXProject "JESCircularProgressView" */; 175 | compatibilityVersion = "Xcode 3.2"; 176 | developmentRegion = English; 177 | hasScannedForEncodings = 0; 178 | knownRegions = ( 179 | en, 180 | Base, 181 | ); 182 | mainGroup = 07238C32185E34550055F3FE; 183 | productRefGroup = 07238C3C185E34550055F3FE /* Products */; 184 | projectDirPath = ""; 185 | projectRoot = ""; 186 | targets = ( 187 | 07238C3A185E34550055F3FE /* JESCircularProgressView */, 188 | ); 189 | }; 190 | /* End PBXProject section */ 191 | 192 | /* Begin PBXResourcesBuildPhase section */ 193 | 07238C39185E34550055F3FE /* Resources */ = { 194 | isa = PBXResourcesBuildPhase; 195 | buildActionMask = 2147483647; 196 | files = ( 197 | C0A102D31A85A7B20026E643 /* JESCircularProgressView-Info.plist in Resources */, 198 | C0A102D61A85A7C20026E643 /* Images.xcassets in Resources */, 199 | 076D6847185E78CD004CB332 /* InfoPlist.strings in Resources */, 200 | 0710DEFD185E75AC008E6F96 /* MainMenu.xib in Resources */, 201 | 076D684A185E7AA9004CB332 /* Credits.rtf in Resources */, 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | /* End PBXResourcesBuildPhase section */ 206 | 207 | /* Begin PBXSourcesBuildPhase section */ 208 | 07238C37185E34550055F3FE /* Sources */ = { 209 | isa = PBXSourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 076D6845185E7851004CB332 /* JESAppDelegate.m in Sources */, 213 | 076D6842185E7822004CB332 /* NSBezierPath+BezierPathQuartzUtilities.m in Sources */, 214 | C0A102D11A85A7A50026E643 /* main.m in Sources */, 215 | 0710DF03185E7799008E6F96 /* JESCircularProgressView.m in Sources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXSourcesBuildPhase section */ 220 | 221 | /* Begin PBXVariantGroup section */ 222 | 076D6848185E7AA9004CB332 /* Credits.rtf */ = { 223 | isa = PBXVariantGroup; 224 | children = ( 225 | 076D6849185E7AA9004CB332 /* en */, 226 | ); 227 | name = Credits.rtf; 228 | sourceTree = ""; 229 | }; 230 | /* End PBXVariantGroup section */ 231 | 232 | /* Begin XCBuildConfiguration section */ 233 | 07238C6A185E34550055F3FE /* Debug */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 238 | CLANG_CXX_LIBRARY = "libc++"; 239 | CLANG_ENABLE_OBJC_ARC = YES; 240 | CLANG_WARN_BOOL_CONVERSION = YES; 241 | CLANG_WARN_CONSTANT_CONVERSION = YES; 242 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INT_CONVERSION = YES; 246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 247 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 248 | COPY_PHASE_STRIP = NO; 249 | GCC_C_LANGUAGE_STANDARD = gnu99; 250 | GCC_DYNAMIC_NO_PIC = NO; 251 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 252 | GCC_OPTIMIZATION_LEVEL = 0; 253 | GCC_PREPROCESSOR_DEFINITIONS = ( 254 | "DEBUG=1", 255 | "$(inherited)", 256 | ); 257 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 258 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 259 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 260 | GCC_WARN_UNDECLARED_SELECTOR = YES; 261 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 262 | GCC_WARN_UNUSED_FUNCTION = YES; 263 | GCC_WARN_UNUSED_VARIABLE = YES; 264 | MACOSX_DEPLOYMENT_TARGET = 10.9; 265 | ONLY_ACTIVE_ARCH = YES; 266 | SDKROOT = macosx; 267 | }; 268 | name = Debug; 269 | }; 270 | 07238C6B185E34550055F3FE /* Release */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 275 | CLANG_CXX_LIBRARY = "libc++"; 276 | CLANG_ENABLE_OBJC_ARC = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_CONSTANT_CONVERSION = YES; 279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 280 | CLANG_WARN_EMPTY_BODY = YES; 281 | CLANG_WARN_ENUM_CONVERSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | COPY_PHASE_STRIP = YES; 286 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 287 | ENABLE_NS_ASSERTIONS = NO; 288 | GCC_C_LANGUAGE_STANDARD = gnu99; 289 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | MACOSX_DEPLOYMENT_TARGET = 10.9; 297 | SDKROOT = macosx; 298 | }; 299 | name = Release; 300 | }; 301 | 07238C6D185E34550055F3FE /* Debug */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 305 | COMBINE_HIDPI_IMAGES = YES; 306 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 307 | GCC_PREFIX_HEADER = "JESCircularProgressView/JESCircularProgressView-Prefix.pch"; 308 | INFOPLIST_FILE = "$(SRCROOT)/JESCircularProgressView/JESCircularProgressView-Info.plist"; 309 | PRODUCT_NAME = JESCircularProgressView; 310 | WRAPPER_EXTENSION = app; 311 | }; 312 | name = Debug; 313 | }; 314 | 07238C6E185E34550055F3FE /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 318 | COMBINE_HIDPI_IMAGES = YES; 319 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 320 | GCC_PREFIX_HEADER = "JESCircularProgressView/JESCircularProgressView-Prefix.pch"; 321 | INFOPLIST_FILE = "$(SRCROOT)/JESCircularProgressView/JESCircularProgressView-Info.plist"; 322 | PRODUCT_NAME = JESCircularProgressView; 323 | WRAPPER_EXTENSION = app; 324 | }; 325 | name = Release; 326 | }; 327 | /* End XCBuildConfiguration section */ 328 | 329 | /* Begin XCConfigurationList section */ 330 | 07238C36185E34550055F3FE /* Build configuration list for PBXProject "JESCircularProgressView" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 07238C6A185E34550055F3FE /* Debug */, 334 | 07238C6B185E34550055F3FE /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | 07238C6C185E34550055F3FE /* Build configuration list for PBXNativeTarget "JESCircularProgressView" */ = { 340 | isa = XCConfigurationList; 341 | buildConfigurations = ( 342 | 07238C6D185E34550055F3FE /* Debug */, 343 | 07238C6E185E34550055F3FE /* Release */, 344 | ); 345 | defaultConfigurationIsVisible = 0; 346 | defaultConfigurationName = Release; 347 | }; 348 | /* End XCConfigurationList section */ 349 | }; 350 | rootObject = 07238C33185E34550055F3FE /* Project object */; 351 | } 352 | -------------------------------------------------------------------------------- /JESCircularProgressView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JESCircularProgressView/Classes/JESCircularProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JESCircularProgressView.h 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | IB_DESIGNABLE 12 | @interface JESCircularProgressView : NSView 13 | 14 | /** 15 | * The current progress is represented by a floating-point value between 0.0 and 1.0, 16 | * inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. 17 | * Values less than 0.0 and greater than 1.0 are pinned to those limits. 18 | */ 19 | @property (nonatomic, assign) IBInspectable CGFloat progress; 20 | 21 | /** 22 | * The line width of the progress indicator. 23 | */ 24 | @property (nonatomic, assign) IBInspectable CGFloat progressLineWidth; 25 | 26 | /** 27 | * The line width of the outer circle. 28 | */ 29 | @property (nonatomic, assign) IBInspectable CGFloat outerLineWidth; 30 | 31 | /** 32 | * The duration of each animation. 33 | */ 34 | @property (nonatomic, assign) IBInspectable CGFloat animationDuration; 35 | 36 | /** 37 | * The color of the outer circle and progress line. 38 | */ 39 | @property (nonatomic, strong) IBInspectable NSColor *tintColor; 40 | 41 | /** 42 | * Adjusts the current progress shown by the receiver, optionally animating the change. 43 | * 44 | * @param progress The new progress value 45 | * @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 46 | */ 47 | - (void)setProgress:(CGFloat)progress animated:(BOOL)animated; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /JESCircularProgressView/Classes/JESCircularProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JESCircularProgressView.m 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import "JESCircularProgressView.h" 10 | #import 11 | #import "NSBezierPath+BezierPathQuartzUtilities.h" 12 | 13 | #define JES_DEFAULT_TINT_COLOR [NSColor colorWithDeviceRed:0.139 green:0.449 blue:0.867 alpha:1.000] 14 | 15 | static const CGFloat JESDefaultAnimationDuration = 0.25; 16 | static const CGFloat JESDefaultOuterLineWidth = 1; 17 | static const CGFloat JESDefaultProgressLineWidth = 4; 18 | 19 | @interface JESCircularProgressView () 20 | 21 | @property (nonatomic, assign) CAShapeLayer *progressLayer; 22 | @property (nonatomic, assign) CAShapeLayer *outerLayer; 23 | @property (nonatomic, strong) NSBezierPath *progressPath; 24 | @property (nonatomic, strong) NSBezierPath *outerPath; 25 | 26 | @end 27 | 28 | @implementation JESCircularProgressView 29 | 30 | #pragma mark - Initialization 31 | 32 | - (id)initWithCoder:(NSCoder *)aDecoder { 33 | self = [super initWithCoder:aDecoder]; 34 | if (self) { 35 | [self setDefaultValues]; 36 | } 37 | return self; 38 | } 39 | 40 | - (id)initWithFrame:(NSRect)frameRect { 41 | self = [super initWithFrame:frameRect]; 42 | if (self) { 43 | [self setDefaultValues]; 44 | } 45 | return self; 46 | } 47 | 48 | - (void)setDefaultValues { 49 | _progressLineWidth = JESDefaultProgressLineWidth; 50 | _outerLineWidth = JESDefaultOuterLineWidth; 51 | _tintColor = JES_DEFAULT_TINT_COLOR; 52 | 53 | _animationDuration = JESDefaultAnimationDuration; 54 | 55 | [self setWantsLayer:YES]; 56 | 57 | CAShapeLayer *progressShape = [CAShapeLayer layer]; 58 | [progressShape setStrokeColor:[_tintColor CGColor]]; 59 | [progressShape setFillColor:[[NSColor clearColor] CGColor]]; 60 | progressShape.lineWidth = _progressLineWidth; 61 | [_layer addSublayer:progressShape]; 62 | _progressLayer = progressShape; 63 | 64 | 65 | CAShapeLayer *outerLayer = [CAShapeLayer layer]; 66 | [outerLayer setStrokeColor:[_tintColor CGColor]]; 67 | [outerLayer setFillColor:[[NSColor clearColor] CGColor]]; 68 | outerLayer.lineWidth = _outerLineWidth; 69 | [_layer addSublayer:outerLayer]; 70 | _outerLayer = outerLayer; 71 | 72 | self.progress = 0; 73 | 74 | [self drawOuterCircle]; 75 | [self drawProgressCircle]; 76 | } 77 | 78 | #pragma mark - Getters/Setters 79 | 80 | - (void)setProgressLineWidth:(CGFloat)lineWidth { 81 | _progressLineWidth = lineWidth; 82 | [[self progressLayer] setLineWidth:_progressLineWidth]; 83 | [self setNeedsDisplay:YES]; 84 | } 85 | 86 | - (void)setTintColor:(NSColor *)tintColor { 87 | _tintColor = tintColor; 88 | self.progressLayer.strokeColor = tintColor.CGColor; 89 | self.outerLayer.strokeColor = tintColor.CGColor; 90 | [self setNeedsDisplay:YES]; 91 | } 92 | 93 | - (void)setProgress:(CGFloat)progress animated:(BOOL)animated { 94 | CGFloat currentProgress = _progress; 95 | _progress = MAX(MIN(progress, 1), 0); 96 | 97 | [CATransaction begin]; 98 | if (animated) { 99 | CGFloat delta = fabs(_progress - currentProgress); 100 | [CATransaction setAnimationDuration:MAX(self.animationDuration, delta * 1.0)]; 101 | } else { 102 | [CATransaction setDisableActions:YES]; 103 | } 104 | [self.progressLayer setStrokeStart:0.0]; 105 | [self.progressLayer setStrokeEnd:_progress]; 106 | [CATransaction commit]; 107 | } 108 | 109 | - (void)setProgress:(CGFloat)progress { 110 | [self setProgress:progress animated:NO]; 111 | } 112 | 113 | #pragma mark - Drawing 114 | 115 | - (void)drawProgressCircle { 116 | if (!self.progressPath) { 117 | _progressPath = [NSBezierPath bezierPath]; 118 | } 119 | 120 | [self.progressPath appendBezierPathWithArcWithCenter:[self center] 121 | radius:[self radius] 122 | startAngle:90 123 | endAngle:(2.0 * M_PI - M_PI_2) + 90 124 | clockwise:YES]; 125 | 126 | self.progressLayer.path = [self.progressPath quartzPath]; 127 | self.progressLayer.frame = self.bounds; 128 | } 129 | 130 | - (void)drawOuterCircle { 131 | if (!_outerPath) { 132 | _outerPath = [NSBezierPath bezierPath]; 133 | [self.outerPath appendBezierPathWithArcWithCenter:[self center] 134 | radius:[self radius] + self.progressLineWidth 135 | startAngle:0 136 | endAngle:(2.0 * M_PI - M_PI_2) 137 | clockwise:YES]; 138 | self.outerLayer.path = [self.outerPath quartzPath]; 139 | self.outerLayer.frame = self.bounds; 140 | [self.outerLayer setStrokeEnd:1]; 141 | } 142 | } 143 | 144 | # pragma mark - Maths 145 | 146 | - (CGFloat)progressInDegrees { 147 | return _progress * 360.0f; 148 | } 149 | 150 | - (CGFloat)radius { 151 | static CGFloat radius; 152 | if (!radius) { 153 | CGRect progressLineInset = [self progressLineInset]; 154 | CGFloat width = progressLineInset.size.width; 155 | CGFloat height = progressLineInset.size.height; 156 | if (width > height) { 157 | radius = height / 2.0; 158 | } else { 159 | radius = width / 2.0; 160 | } 161 | } 162 | return floor(radius); 163 | } 164 | 165 | - (CGRect)progressLineInset { 166 | static CGRect progressLineInset; 167 | if (CGRectIsEmpty(progressLineInset)) { 168 | progressLineInset = CGRectIntegral(CGRectInset(self.bounds, 169 | round(self.progressLineWidth + self.outerLineWidth), 170 | round(self.progressLineWidth + self.outerLineWidth))); 171 | } 172 | if (!isnormal(progressLineInset.origin.x) || 173 | !isnormal(progressLineInset.origin.y) || 174 | !isnormal(progressLineInset.size.width) || 175 | !isnormal(progressLineInset.size.height)) { 176 | progressLineInset = CGRectZero; 177 | } 178 | return progressLineInset; 179 | } 180 | 181 | - (CGPoint)center { 182 | static CGPoint center; 183 | if (CGPointEqualToPoint(CGPointZero, center)) { 184 | center = CGPointMake(round(CGRectGetMidX([self progressLineInset])), 185 | round(CGRectGetMidY([self progressLineInset]))); 186 | } 187 | return center; 188 | } 189 | 190 | # pragma mark - Interface Builder Support 191 | 192 | - (void)prepareForInterfaceBuilder { 193 | [self setDefaultValues]; 194 | [self setProgress:_progress]; 195 | } 196 | 197 | @end 198 | -------------------------------------------------------------------------------- /JESCircularProgressView/Classes/NSBezierPath+BezierPathQuartzUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath+BezierPathQuartzUtilities.h 3 | // JESCircularProgressButton 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSBezierPath (BezierPathQuartzUtilities) 12 | 13 | - (CGPathRef)quartzPath; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JESCircularProgressView/Classes/NSBezierPath+BezierPathQuartzUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBezierPath+BezierPathQuartzUtilities.m 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import "NSBezierPath+BezierPathQuartzUtilities.h" 10 | 11 | @implementation NSBezierPath (BezierPathQuartzUtilities) 12 | 13 | - (CGPathRef)quartzPath { 14 | NSInteger i, numElements; 15 | 16 | // Need to begin a path here. 17 | CGPathRef immutablePath = NULL; 18 | 19 | // Then draw the path elements. 20 | numElements = [self elementCount]; 21 | if (numElements > 0) { 22 | CGMutablePathRef path = CGPathCreateMutable(); 23 | NSPoint points[3]; 24 | BOOL didClosePath = YES; 25 | 26 | for (i = 0; i < numElements; i++) { 27 | switch ([self elementAtIndex:i associatedPoints:points]) { 28 | case NSMoveToBezierPathElement: 29 | CGPathMoveToPoint(path, NULL, points[0].x, points[0].y); 30 | break; 31 | 32 | case NSLineToBezierPathElement: 33 | CGPathAddLineToPoint(path, NULL, points[0].x, points[0].y); 34 | didClosePath = NO; 35 | break; 36 | 37 | case NSCurveToBezierPathElement: 38 | CGPathAddCurveToPoint(path, NULL, points[0].x, points[0].y, 39 | points[1].x, points[1].y, 40 | points[2].x, points[2].y); 41 | didClosePath = NO; 42 | break; 43 | 44 | case NSClosePathBezierPathElement: 45 | CGPathCloseSubpath(path); 46 | didClosePath = YES; 47 | break; 48 | } 49 | } 50 | 51 | // Be sure the path is closed or Quartz may not do valid hit detection. 52 | if (!didClosePath) { 53 | CGPathCloseSubpath(path); 54 | } 55 | 56 | immutablePath = CGPathCreateCopy(path); 57 | CGPathRelease(path); 58 | } 59 | 60 | return immutablePath; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /JESCircularProgressView/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /JESCircularProgressView/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* 2 | InfoPlist.strings 3 | JESCircularProgressView 4 | 5 | Created by Jurre Stender on 16/12/13. 6 | Copyright (c) 2013 jurrestender. All rights reserved. 7 | */ 8 | -------------------------------------------------------------------------------- /JESCircularProgressView/JESAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JESAppDelegate.h 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JESCircularProgressView.h" 11 | 12 | @interface JESAppDelegate : NSObject 13 | 14 | @property (assign) IBOutlet NSWindow *window; 15 | @property (assign) IBOutlet JESCircularProgressView *circularIndicator; 16 | @property (assign) IBOutlet NSSlider *slider; 17 | 18 | - (IBAction)setProgressAnimated:(id)sender; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /JESCircularProgressView/JESAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JESAppDelegate.m 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import "JESAppDelegate.h" 10 | 11 | @interface JESAppDelegate () 12 | 13 | @property CGFloat timerProgress; 14 | @property NSTimer *timer; 15 | 16 | @end 17 | 18 | @implementation JESAppDelegate 19 | 20 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 21 | self.circularIndicator.animationDuration = 0.5; 22 | self.circularIndicator.outerLineWidth = 2; 23 | self.circularIndicator.progressLineWidth = 7; 24 | // self.circularIndicator.tintColor = [NSColor redColor]; 25 | 26 | self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(tick) userInfo:Nil repeats:YES]; 27 | } 28 | 29 | - (void)tick { 30 | if (self.timerProgress >= 1) { 31 | self.timer = nil; 32 | } else { 33 | self.timerProgress += arc4random() % 11 * 0.03; 34 | [self.circularIndicator setProgress:self.timerProgress animated:YES]; 35 | } 36 | } 37 | 38 | - (IBAction)setProgressAnimated:(id)sender { 39 | CGFloat progress = [self.slider doubleValue] / 100.0f; 40 | [self.circularIndicator setProgress:progress animated:YES]; 41 | } 42 | 43 | - (IBAction)setProgress:(id)sender { 44 | CGFloat progress = [self.slider doubleValue] / 100.0f; 45 | self.circularIndicator.progress = progress; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /JESCircularProgressView/JESCircularProgressView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.jurrestender.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2013 jurrestender. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /JESCircularProgressView/JESCircularProgressView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /JESCircularProgressView/MainMenu.xib: -------------------------------------------------------------------------------- 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 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 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 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 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 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 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 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | Default 522 | 523 | 524 | 525 | 526 | 527 | 528 | Left to Right 529 | 530 | 531 | 532 | 533 | 534 | 535 | Right to Left 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | Default 547 | 548 | 549 | 550 | 551 | 552 | 553 | Left to Right 554 | 555 | 556 | 557 | 558 | 559 | 560 | Right to Left 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 679 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | -------------------------------------------------------------------------------- /JESCircularProgressView/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /JESCircularProgressView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JESCircularProgressView 4 | // 5 | // Created by Jurre Stender on 15/12/13. 6 | // Copyright (c) 2013 jurrestender. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Jurre Stender 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JESCircularProgressView 2 | 3 | A little circular progress view for OSX that looks like the one used in the App Store. 4 | 5 | ![screenshot](https://raw.github.com/jurre/JESCircularProgressView/master/screenshots/progress.gif) 6 | 7 | # Installing 8 | 9 | Install it with the cocoapods: 10 | 11 | ```ruby 12 | pod "JESCircularProgressView" 13 | ``` 14 | 15 | # Usage: 16 | 17 | Add a JESCircularProgressView to your xib/code, and update its progress. 18 | 19 | ```objective-c 20 | 21 | // YourAwesomeThing.h 22 | #import "JESCircularProgressView.h" 23 | 24 | ... 25 | 26 | @property (assign) IBOutlet JESCircularProgressView *circularProgressView; 27 | 28 | // YourAwesomeThing.m 29 | 30 | ... 31 | 32 | // And then you can be all like: 33 | [self.circularProgressView setProgress:progress animated:YES]; 34 | 35 | // Or you could be like: 36 | self.circularProgressView.progress = progress; 37 | // But I made the whole animating thing so you might as well use it, right!? 38 | ``` 39 | 40 | ## Configuring things 41 | 42 | There's a few things you can configure: 43 | 44 | ```objective-c 45 | /** 46 | * The line width of the progress indicator. 47 | */ 48 | @property (nonatomic, assign) CGFloat progressLineWidth; 49 | 50 | /** 51 | * The line width of the outer circle. 52 | */ 53 | @property (nonatomic, assign) CGFloat outerLineWidth; 54 | 55 | /** 56 | * The duration of each animation. 57 | */ 58 | @property (nonatomic, assign) CGFloat animationDuration; 59 | 60 | /** 61 | * The color of the outer circle and progress line. 62 | */ 63 | @property (nonatomic, strong) NSColor *tintColor; 64 | ``` 65 | 66 | You can also configure these in Interface Builder. 67 | -------------------------------------------------------------------------------- /screenshots/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jurre/JESCircularProgressView/ca5aa88b69daef601854644c9e1f4397f7708db0/screenshots/progress.gif -------------------------------------------------------------------------------- /screenshots/progressview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jurre/JESCircularProgressView/ca5aa88b69daef601854644c9e1f4397f7708db0/screenshots/progressview.png --------------------------------------------------------------------------------