├── .gitignore ├── LICENSE ├── README.md ├── SrollableProgressBar.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── SrollableProgressBar ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── BFScrollableProgressBar.h ├── BFScrollableProgressBar.m ├── Base.lproj │ └── MainMenu.xib ├── Info.plist └── main.m ├── demo.gif └── video.mov /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Vladislav Alekseev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, 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, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ScrollableProgressBar 2 | Provide your users interactive and fun to use progress bar 3 | 4 | # What happened? 5 | 6 | Everybody hates slowly updating progress bars. As for me, I usually tend to click it or push it with small hope that it will make it move a bit faster. And I always dreamed about a progress bar that will listen to my clicks and drags. 7 | 8 | # Introducing BFScrollableProgressBar! 9 | 10 | No more boring progress bars! Now you can scroll the progress bar left or right using your track pad! And you can drag it using your mouse cursor in case if you don't have a trackpad. Super fun! Now time will fly faster, slow running operations will finish sooner, just because your users will spend the time playing with the progress bar! 11 | 12 | Check out the video: https://raw.githubusercontent.com/beefon/ScrollableProgressBar/master/video.mov 13 | 14 | ![](https://raw.githubusercontent.com/beefon/ScrollableProgressBar/master/demo.gif) 15 | -------------------------------------------------------------------------------- /SrollableProgressBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E95F56A21D0B1A0500B65C91 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F56A11D0B1A0500B65C91 /* AppDelegate.m */; }; 11 | E95F56A51D0B1A0500B65C91 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F56A41D0B1A0500B65C91 /* main.m */; }; 12 | E95F56A71D0B1A0500B65C91 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E95F56A61D0B1A0500B65C91 /* Assets.xcassets */; }; 13 | E95F56AA1D0B1A0500B65C91 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E95F56A81D0B1A0500B65C91 /* MainMenu.xib */; }; 14 | E95F56B31D0B1A2900B65C91 /* BFScrollableProgressBar.m in Sources */ = {isa = PBXBuildFile; fileRef = E95F56B21D0B1A2900B65C91 /* BFScrollableProgressBar.m */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | E95F569D1D0B1A0500B65C91 /* SrollableProgressBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SrollableProgressBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | E95F56A01D0B1A0500B65C91 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 20 | E95F56A11D0B1A0500B65C91 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 21 | E95F56A41D0B1A0500B65C91 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 22 | E95F56A61D0B1A0500B65C91 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 23 | E95F56A91D0B1A0500B65C91 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 24 | E95F56AB1D0B1A0500B65C91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | E95F56B11D0B1A2900B65C91 /* BFScrollableProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFScrollableProgressBar.h; sourceTree = ""; }; 26 | E95F56B21D0B1A2900B65C91 /* BFScrollableProgressBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFScrollableProgressBar.m; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | E95F569A1D0B1A0500B65C91 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | E95F56941D0B1A0500B65C91 = { 41 | isa = PBXGroup; 42 | children = ( 43 | E95F569F1D0B1A0500B65C91 /* SrollableProgressBar */, 44 | E95F569E1D0B1A0500B65C91 /* Products */, 45 | ); 46 | sourceTree = ""; 47 | }; 48 | E95F569E1D0B1A0500B65C91 /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | E95F569D1D0B1A0500B65C91 /* SrollableProgressBar.app */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | E95F569F1D0B1A0500B65C91 /* SrollableProgressBar */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | E95F56A01D0B1A0500B65C91 /* AppDelegate.h */, 60 | E95F56A11D0B1A0500B65C91 /* AppDelegate.m */, 61 | E95F56B11D0B1A2900B65C91 /* BFScrollableProgressBar.h */, 62 | E95F56B21D0B1A2900B65C91 /* BFScrollableProgressBar.m */, 63 | E95F56A61D0B1A0500B65C91 /* Assets.xcassets */, 64 | E95F56A81D0B1A0500B65C91 /* MainMenu.xib */, 65 | E95F56AB1D0B1A0500B65C91 /* Info.plist */, 66 | E95F56A31D0B1A0500B65C91 /* Supporting Files */, 67 | ); 68 | path = SrollableProgressBar; 69 | sourceTree = ""; 70 | }; 71 | E95F56A31D0B1A0500B65C91 /* Supporting Files */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | E95F56A41D0B1A0500B65C91 /* main.m */, 75 | ); 76 | name = "Supporting Files"; 77 | sourceTree = ""; 78 | }; 79 | /* End PBXGroup section */ 80 | 81 | /* Begin PBXNativeTarget section */ 82 | E95F569C1D0B1A0500B65C91 /* SrollableProgressBar */ = { 83 | isa = PBXNativeTarget; 84 | buildConfigurationList = E95F56AE1D0B1A0500B65C91 /* Build configuration list for PBXNativeTarget "SrollableProgressBar" */; 85 | buildPhases = ( 86 | E95F56991D0B1A0500B65C91 /* Sources */, 87 | E95F569A1D0B1A0500B65C91 /* Frameworks */, 88 | E95F569B1D0B1A0500B65C91 /* Resources */, 89 | ); 90 | buildRules = ( 91 | ); 92 | dependencies = ( 93 | ); 94 | name = SrollableProgressBar; 95 | productName = SrollableProgressBar; 96 | productReference = E95F569D1D0B1A0500B65C91 /* SrollableProgressBar.app */; 97 | productType = "com.apple.product-type.application"; 98 | }; 99 | /* End PBXNativeTarget section */ 100 | 101 | /* Begin PBXProject section */ 102 | E95F56951D0B1A0500B65C91 /* Project object */ = { 103 | isa = PBXProject; 104 | attributes = { 105 | LastUpgradeCheck = 0730; 106 | ORGANIZATIONNAME = beefon; 107 | TargetAttributes = { 108 | E95F569C1D0B1A0500B65C91 = { 109 | CreatedOnToolsVersion = 7.3.1; 110 | }; 111 | }; 112 | }; 113 | buildConfigurationList = E95F56981D0B1A0500B65C91 /* Build configuration list for PBXProject "SrollableProgressBar" */; 114 | compatibilityVersion = "Xcode 3.2"; 115 | developmentRegion = English; 116 | hasScannedForEncodings = 0; 117 | knownRegions = ( 118 | en, 119 | Base, 120 | ); 121 | mainGroup = E95F56941D0B1A0500B65C91; 122 | productRefGroup = E95F569E1D0B1A0500B65C91 /* Products */; 123 | projectDirPath = ""; 124 | projectRoot = ""; 125 | targets = ( 126 | E95F569C1D0B1A0500B65C91 /* SrollableProgressBar */, 127 | ); 128 | }; 129 | /* End PBXProject section */ 130 | 131 | /* Begin PBXResourcesBuildPhase section */ 132 | E95F569B1D0B1A0500B65C91 /* Resources */ = { 133 | isa = PBXResourcesBuildPhase; 134 | buildActionMask = 2147483647; 135 | files = ( 136 | E95F56A71D0B1A0500B65C91 /* Assets.xcassets in Resources */, 137 | E95F56AA1D0B1A0500B65C91 /* MainMenu.xib in Resources */, 138 | ); 139 | runOnlyForDeploymentPostprocessing = 0; 140 | }; 141 | /* End PBXResourcesBuildPhase section */ 142 | 143 | /* Begin PBXSourcesBuildPhase section */ 144 | E95F56991D0B1A0500B65C91 /* Sources */ = { 145 | isa = PBXSourcesBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | E95F56A51D0B1A0500B65C91 /* main.m in Sources */, 149 | E95F56A21D0B1A0500B65C91 /* AppDelegate.m in Sources */, 150 | E95F56B31D0B1A2900B65C91 /* BFScrollableProgressBar.m in Sources */, 151 | ); 152 | runOnlyForDeploymentPostprocessing = 0; 153 | }; 154 | /* End PBXSourcesBuildPhase section */ 155 | 156 | /* Begin PBXVariantGroup section */ 157 | E95F56A81D0B1A0500B65C91 /* MainMenu.xib */ = { 158 | isa = PBXVariantGroup; 159 | children = ( 160 | E95F56A91D0B1A0500B65C91 /* Base */, 161 | ); 162 | name = MainMenu.xib; 163 | sourceTree = ""; 164 | }; 165 | /* End PBXVariantGroup section */ 166 | 167 | /* Begin XCBuildConfiguration section */ 168 | E95F56AC1D0B1A0500B65C91 /* Debug */ = { 169 | isa = XCBuildConfiguration; 170 | buildSettings = { 171 | ALWAYS_SEARCH_USER_PATHS = NO; 172 | CLANG_ANALYZER_NONNULL = YES; 173 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 174 | CLANG_CXX_LIBRARY = "libc++"; 175 | CLANG_ENABLE_MODULES = YES; 176 | CLANG_ENABLE_OBJC_ARC = YES; 177 | CLANG_WARN_BOOL_CONVERSION = YES; 178 | CLANG_WARN_CONSTANT_CONVERSION = YES; 179 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 180 | CLANG_WARN_EMPTY_BODY = YES; 181 | CLANG_WARN_ENUM_CONVERSION = YES; 182 | CLANG_WARN_INT_CONVERSION = YES; 183 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 184 | CLANG_WARN_UNREACHABLE_CODE = YES; 185 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 186 | CODE_SIGN_IDENTITY = "-"; 187 | COPY_PHASE_STRIP = NO; 188 | DEBUG_INFORMATION_FORMAT = dwarf; 189 | ENABLE_STRICT_OBJC_MSGSEND = YES; 190 | ENABLE_TESTABILITY = YES; 191 | GCC_C_LANGUAGE_STANDARD = gnu99; 192 | GCC_DYNAMIC_NO_PIC = NO; 193 | GCC_NO_COMMON_BLOCKS = YES; 194 | GCC_OPTIMIZATION_LEVEL = 0; 195 | GCC_PREPROCESSOR_DEFINITIONS = ( 196 | "DEBUG=1", 197 | "$(inherited)", 198 | ); 199 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 200 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 201 | GCC_WARN_UNDECLARED_SELECTOR = YES; 202 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 203 | GCC_WARN_UNUSED_FUNCTION = YES; 204 | GCC_WARN_UNUSED_VARIABLE = YES; 205 | MACOSX_DEPLOYMENT_TARGET = 10.11; 206 | MTL_ENABLE_DEBUG_INFO = YES; 207 | ONLY_ACTIVE_ARCH = YES; 208 | SDKROOT = macosx; 209 | }; 210 | name = Debug; 211 | }; 212 | E95F56AD1D0B1A0500B65C91 /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | ALWAYS_SEARCH_USER_PATHS = NO; 216 | CLANG_ANALYZER_NONNULL = YES; 217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 218 | CLANG_CXX_LIBRARY = "libc++"; 219 | CLANG_ENABLE_MODULES = YES; 220 | CLANG_ENABLE_OBJC_ARC = YES; 221 | CLANG_WARN_BOOL_CONVERSION = YES; 222 | CLANG_WARN_CONSTANT_CONVERSION = YES; 223 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 224 | CLANG_WARN_EMPTY_BODY = YES; 225 | CLANG_WARN_ENUM_CONVERSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 228 | CLANG_WARN_UNREACHABLE_CODE = YES; 229 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 230 | CODE_SIGN_IDENTITY = "-"; 231 | COPY_PHASE_STRIP = NO; 232 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 233 | ENABLE_NS_ASSERTIONS = NO; 234 | ENABLE_STRICT_OBJC_MSGSEND = YES; 235 | GCC_C_LANGUAGE_STANDARD = gnu99; 236 | GCC_NO_COMMON_BLOCKS = YES; 237 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 238 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 239 | GCC_WARN_UNDECLARED_SELECTOR = YES; 240 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 241 | GCC_WARN_UNUSED_FUNCTION = YES; 242 | GCC_WARN_UNUSED_VARIABLE = YES; 243 | MACOSX_DEPLOYMENT_TARGET = 10.11; 244 | MTL_ENABLE_DEBUG_INFO = NO; 245 | SDKROOT = macosx; 246 | }; 247 | name = Release; 248 | }; 249 | E95F56AF1D0B1A0500B65C91 /* Debug */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 253 | COMBINE_HIDPI_IMAGES = YES; 254 | INFOPLIST_FILE = SrollableProgressBar/Info.plist; 255 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 256 | PRODUCT_BUNDLE_IDENTIFIER = com.beefon.SrollableProgressBar; 257 | PRODUCT_NAME = "$(TARGET_NAME)"; 258 | }; 259 | name = Debug; 260 | }; 261 | E95F56B01D0B1A0500B65C91 /* Release */ = { 262 | isa = XCBuildConfiguration; 263 | buildSettings = { 264 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 265 | COMBINE_HIDPI_IMAGES = YES; 266 | INFOPLIST_FILE = SrollableProgressBar/Info.plist; 267 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 268 | PRODUCT_BUNDLE_IDENTIFIER = com.beefon.SrollableProgressBar; 269 | PRODUCT_NAME = "$(TARGET_NAME)"; 270 | }; 271 | name = Release; 272 | }; 273 | /* End XCBuildConfiguration section */ 274 | 275 | /* Begin XCConfigurationList section */ 276 | E95F56981D0B1A0500B65C91 /* Build configuration list for PBXProject "SrollableProgressBar" */ = { 277 | isa = XCConfigurationList; 278 | buildConfigurations = ( 279 | E95F56AC1D0B1A0500B65C91 /* Debug */, 280 | E95F56AD1D0B1A0500B65C91 /* Release */, 281 | ); 282 | defaultConfigurationIsVisible = 0; 283 | defaultConfigurationName = Release; 284 | }; 285 | E95F56AE1D0B1A0500B65C91 /* Build configuration list for PBXNativeTarget "SrollableProgressBar" */ = { 286 | isa = XCConfigurationList; 287 | buildConfigurations = ( 288 | E95F56AF1D0B1A0500B65C91 /* Debug */, 289 | E95F56B01D0B1A0500B65C91 /* Release */, 290 | ); 291 | defaultConfigurationIsVisible = 0; 292 | defaultConfigurationName = Release; 293 | }; 294 | /* End XCConfigurationList section */ 295 | }; 296 | rootObject = E95F56951D0B1A0500B65C91 /* Project object */; 297 | } 298 | -------------------------------------------------------------------------------- /SrollableProgressBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SrollableProgressBar/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SrollableProgressBar 4 | // 5 | // Created by Vladislav Alexeev on 10/06/2016. 6 | // Copyright © 2016 beefon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /SrollableProgressBar/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SrollableProgressBar 4 | // 5 | // Created by Vladislav Alexeev on 10/06/2016. 6 | // Copyright © 2016 beefon. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "BFScrollableProgressBar.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @property (weak) IBOutlet NSWindow *window; 15 | @property (weak) IBOutlet BFScrollableProgressBar *progress; 16 | @property (nonatomic, strong) NSTimer *timer; 17 | @end 18 | 19 | @implementation AppDelegate 20 | 21 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 22 | self.timer = [NSTimer scheduledTimerWithTimeInterval:1/60.0 23 | target:self 24 | selector:@selector(increase) 25 | userInfo:nil 26 | repeats:YES]; 27 | } 28 | 29 | - (void)increase { 30 | self.progress.targetValue += 0.05; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /SrollableProgressBar/Assets.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 | } -------------------------------------------------------------------------------- /SrollableProgressBar/BFScrollableProgressBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFScrollableProgressBar.h 3 | // SrollableProgressBar 4 | // 5 | // Created by Vladislav Alexeev on 10/06/2016. 6 | // Copyright © 2016 beefon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BFScrollableProgressBar : NSProgressIndicator 12 | 13 | @property (nonatomic, assign) double targetValue; // use this instead of doubeValue 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SrollableProgressBar/BFScrollableProgressBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFScrollableProgressBar.m 3 | // SrollableProgressBar 4 | // 5 | // Created by Vladislav Alexeev on 10/06/2016. 6 | // Copyright © 2016 beefon. All rights reserved. 7 | // 8 | 9 | #import "BFScrollableProgressBar.h" 10 | 11 | @interface BFScrollableProgressBar () 12 | 13 | @property (nonatomic, strong) NSTimer *corrector; 14 | 15 | @end 16 | 17 | @implementation BFScrollableProgressBar 18 | 19 | - (instancetype)initWithFrame:(NSRect)frame 20 | { 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | self.targetValue = (self.maxValue - self.minValue) / 2.0; 24 | self.doubleValue = self.targetValue; 25 | [self corrector]; 26 | } 27 | return self; 28 | } 29 | 30 | - (instancetype)initWithCoder:(NSCoder *)coder 31 | { 32 | self = [super initWithCoder:coder]; 33 | if (self) { 34 | self.targetValue = (self.maxValue - self.minValue) / 2.0; 35 | self.doubleValue = self.targetValue; 36 | [self corrector]; 37 | } 38 | return self; 39 | } 40 | 41 | - (void)setTargetValue:(double)targetValue 42 | { 43 | if (_targetValue != targetValue) { 44 | _targetValue = fmax(fmin(targetValue, self.maxValue), self.minValue); 45 | } 46 | } 47 | 48 | - (NSTimer *)corrector 49 | { 50 | if (_corrector == nil) { 51 | _corrector = [NSTimer scheduledTimerWithTimeInterval:1.0/60.0 52 | target:self 53 | selector:@selector(correct:) 54 | userInfo:nil 55 | repeats:YES]; 56 | } 57 | return _corrector; 58 | } 59 | 60 | - (void)correct:(NSTimer *)sender { 61 | double delta = (self.targetValue - self.doubleValue) / 5.0f; 62 | [self incrementBy:delta]; 63 | } 64 | 65 | - (void)mouseDragged:(NSEvent *)theEvent { 66 | [super mouseDragged:theEvent]; 67 | [self incrementBy:theEvent.deltaX / 2.0]; 68 | } 69 | 70 | - (void)scrollWheel:(NSEvent *)theEvent { 71 | [super scrollWheel:theEvent]; 72 | [self incrementBy:theEvent.deltaX]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /SrollableProgressBar/Base.lproj/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 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | Default 541 | 542 | 543 | 544 | 545 | 546 | 547 | Left to Right 548 | 549 | 550 | 551 | 552 | 553 | 554 | Right to Left 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | Default 566 | 567 | 568 | 569 | 570 | 571 | 572 | Left to Right 573 | 574 | 575 | 576 | 577 | 578 | 579 | Right to Left 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 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | -------------------------------------------------------------------------------- /SrollableProgressBar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 © 2016 beefon. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /SrollableProgressBar/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SrollableProgressBar 4 | // 5 | // Created by Vladislav Alexeev on 10/06/2016. 6 | // Copyright © 2016 beefon. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beefon/ScrollableProgressBar/cb5ff40d3f1bfd9c7705835fbf42d7b75ede26c7/demo.gif -------------------------------------------------------------------------------- /video.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/beefon/ScrollableProgressBar/cb5ff40d3f1bfd9c7705835fbf42d7b75ede26c7/video.mov --------------------------------------------------------------------------------