├── .gitignore ├── FBProgressView.xcodeproj └── project.pbxproj ├── FBProgressView ├── FBProgressView-Info.plist ├── FBProgressView-Prefix.pch ├── FBProgressView.h ├── FBProgressView.m ├── FBProgressViewAppDelegate.h ├── FBProgressViewAppDelegate.m ├── en.lproj │ ├── InfoPlist.strings │ └── MainWindow.xib └── main.m ├── FBProgressViewTests ├── FBProgressViewTests-Info.plist ├── FBProgressViewTests-Prefix.pch ├── FBProgressViewTests.h ├── FBProgressViewTests.m └── en.lproj │ └── InfoPlist.strings ├── README.md └── image1.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xcworkspacedata 19 | -------------------------------------------------------------------------------- /FBProgressView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4CB3222A1342CDF0008FC946 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB322291342CDF0008FC946 /* UIKit.framework */; }; 11 | 4CB3222C1342CDF0008FC946 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB3222B1342CDF0008FC946 /* Foundation.framework */; }; 12 | 4CB3222E1342CDF0008FC946 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB3222D1342CDF0008FC946 /* CoreGraphics.framework */; }; 13 | 4CB322341342CDF0008FC946 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CB322321342CDF0008FC946 /* InfoPlist.strings */; }; 14 | 4CB322371342CDF0008FC946 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB322361342CDF0008FC946 /* main.m */; }; 15 | 4CB3223A1342CDF0008FC946 /* FBProgressViewAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB322391342CDF0008FC946 /* FBProgressViewAppDelegate.m */; }; 16 | 4CB3223D1342CDF1008FC946 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4CB3223B1342CDF1008FC946 /* MainWindow.xib */; }; 17 | 4CB322441342CDF1008FC946 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB322291342CDF0008FC946 /* UIKit.framework */; }; 18 | 4CB322451342CDF1008FC946 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB3222B1342CDF0008FC946 /* Foundation.framework */; }; 19 | 4CB322461342CDF1008FC946 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CB3222D1342CDF0008FC946 /* CoreGraphics.framework */; }; 20 | 4CB3224E1342CDF1008FC946 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4CB3224C1342CDF1008FC946 /* InfoPlist.strings */; }; 21 | 4CB322511342CDF1008FC946 /* FBProgressViewTests.h in Resources */ = {isa = PBXBuildFile; fileRef = 4CB322501342CDF1008FC946 /* FBProgressViewTests.h */; }; 22 | 4CB322531342CDF1008FC946 /* FBProgressViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB322521342CDF1008FC946 /* FBProgressViewTests.m */; }; 23 | 4CB3225E1342CE11008FC946 /* FBProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CB3225D1342CE11008FC946 /* FBProgressView.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 4CB322471342CDF1008FC946 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 4CB3221C1342CDF0008FC946 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 4CB322241342CDF0008FC946; 32 | remoteInfo = FBProgressView; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 4CB322251342CDF0008FC946 /* FBProgressView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FBProgressView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 4CB322291342CDF0008FC946 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 39 | 4CB3222B1342CDF0008FC946 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 40 | 4CB3222D1342CDF0008FC946 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 41 | 4CB322311342CDF0008FC946 /* FBProgressView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FBProgressView-Info.plist"; sourceTree = ""; }; 42 | 4CB322331342CDF0008FC946 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 43 | 4CB322351342CDF0008FC946 /* FBProgressView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FBProgressView-Prefix.pch"; sourceTree = ""; }; 44 | 4CB322361342CDF0008FC946 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 45 | 4CB322381342CDF0008FC946 /* FBProgressViewAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBProgressViewAppDelegate.h; sourceTree = ""; }; 46 | 4CB322391342CDF0008FC946 /* FBProgressViewAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBProgressViewAppDelegate.m; sourceTree = ""; }; 47 | 4CB3223C1342CDF1008FC946 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; 48 | 4CB322431342CDF1008FC946 /* FBProgressViewTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FBProgressViewTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 4CB3224B1342CDF1008FC946 /* FBProgressViewTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FBProgressViewTests-Info.plist"; sourceTree = ""; }; 50 | 4CB3224D1342CDF1008FC946 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | 4CB3224F1342CDF1008FC946 /* FBProgressViewTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FBProgressViewTests-Prefix.pch"; sourceTree = ""; }; 52 | 4CB322501342CDF1008FC946 /* FBProgressViewTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FBProgressViewTests.h; sourceTree = ""; }; 53 | 4CB322521342CDF1008FC946 /* FBProgressViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FBProgressViewTests.m; sourceTree = ""; }; 54 | 4CB3225C1342CE11008FC946 /* FBProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBProgressView.h; sourceTree = ""; }; 55 | 4CB3225D1342CE11008FC946 /* FBProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBProgressView.m; sourceTree = ""; }; 56 | 4CB3227213436738008FC946 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 4CB322221342CDF0008FC946 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 4CB3222A1342CDF0008FC946 /* UIKit.framework in Frameworks */, 65 | 4CB3222C1342CDF0008FC946 /* Foundation.framework in Frameworks */, 66 | 4CB3222E1342CDF0008FC946 /* CoreGraphics.framework in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | 4CB3223F1342CDF1008FC946 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | 4CB322441342CDF1008FC946 /* UIKit.framework in Frameworks */, 75 | 4CB322451342CDF1008FC946 /* Foundation.framework in Frameworks */, 76 | 4CB322461342CDF1008FC946 /* CoreGraphics.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 4CB3221A1342CDF0008FC946 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 4CB3227213436738008FC946 /* README.md */, 87 | 4CB3222F1342CDF0008FC946 /* FBProgressView */, 88 | 4CB322491342CDF1008FC946 /* FBProgressViewTests */, 89 | 4CB322281342CDF0008FC946 /* Frameworks */, 90 | 4CB322261342CDF0008FC946 /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 4CB322261342CDF0008FC946 /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 4CB322251342CDF0008FC946 /* FBProgressView.app */, 98 | 4CB322431342CDF1008FC946 /* FBProgressViewTests.octest */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 4CB322281342CDF0008FC946 /* Frameworks */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 4CB322291342CDF0008FC946 /* UIKit.framework */, 107 | 4CB3222B1342CDF0008FC946 /* Foundation.framework */, 108 | 4CB3222D1342CDF0008FC946 /* CoreGraphics.framework */, 109 | ); 110 | name = Frameworks; 111 | sourceTree = ""; 112 | }; 113 | 4CB3222F1342CDF0008FC946 /* FBProgressView */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 4CB322301342CDF0008FC946 /* Supporting Files */, 117 | 4CB322381342CDF0008FC946 /* FBProgressViewAppDelegate.h */, 118 | 4CB322391342CDF0008FC946 /* FBProgressViewAppDelegate.m */, 119 | 4CB3223B1342CDF1008FC946 /* MainWindow.xib */, 120 | 4CB3225C1342CE11008FC946 /* FBProgressView.h */, 121 | 4CB3225D1342CE11008FC946 /* FBProgressView.m */, 122 | ); 123 | path = FBProgressView; 124 | sourceTree = ""; 125 | }; 126 | 4CB322301342CDF0008FC946 /* Supporting Files */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 4CB322311342CDF0008FC946 /* FBProgressView-Info.plist */, 130 | 4CB322321342CDF0008FC946 /* InfoPlist.strings */, 131 | 4CB322351342CDF0008FC946 /* FBProgressView-Prefix.pch */, 132 | 4CB322361342CDF0008FC946 /* main.m */, 133 | ); 134 | name = "Supporting Files"; 135 | sourceTree = ""; 136 | }; 137 | 4CB322491342CDF1008FC946 /* FBProgressViewTests */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 4CB322501342CDF1008FC946 /* FBProgressViewTests.h */, 141 | 4CB322521342CDF1008FC946 /* FBProgressViewTests.m */, 142 | 4CB3224A1342CDF1008FC946 /* Supporting Files */, 143 | ); 144 | path = FBProgressViewTests; 145 | sourceTree = ""; 146 | }; 147 | 4CB3224A1342CDF1008FC946 /* Supporting Files */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 4CB3224B1342CDF1008FC946 /* FBProgressViewTests-Info.plist */, 151 | 4CB3224C1342CDF1008FC946 /* InfoPlist.strings */, 152 | 4CB3224F1342CDF1008FC946 /* FBProgressViewTests-Prefix.pch */, 153 | ); 154 | name = "Supporting Files"; 155 | sourceTree = ""; 156 | }; 157 | /* End PBXGroup section */ 158 | 159 | /* Begin PBXNativeTarget section */ 160 | 4CB322241342CDF0008FC946 /* FBProgressView */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = 4CB322561342CDF1008FC946 /* Build configuration list for PBXNativeTarget "FBProgressView" */; 163 | buildPhases = ( 164 | 4CB322211342CDF0008FC946 /* Sources */, 165 | 4CB322221342CDF0008FC946 /* Frameworks */, 166 | 4CB322231342CDF0008FC946 /* Resources */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = FBProgressView; 173 | productName = FBProgressView; 174 | productReference = 4CB322251342CDF0008FC946 /* FBProgressView.app */; 175 | productType = "com.apple.product-type.application"; 176 | }; 177 | 4CB322421342CDF1008FC946 /* FBProgressViewTests */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = 4CB322591342CDF1008FC946 /* Build configuration list for PBXNativeTarget "FBProgressViewTests" */; 180 | buildPhases = ( 181 | 4CB3223E1342CDF1008FC946 /* Sources */, 182 | 4CB3223F1342CDF1008FC946 /* Frameworks */, 183 | 4CB322401342CDF1008FC946 /* Resources */, 184 | 4CB322411342CDF1008FC946 /* ShellScript */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | 4CB322481342CDF1008FC946 /* PBXTargetDependency */, 190 | ); 191 | name = FBProgressViewTests; 192 | productName = FBProgressViewTests; 193 | productReference = 4CB322431342CDF1008FC946 /* FBProgressViewTests.octest */; 194 | productType = "com.apple.product-type.bundle"; 195 | }; 196 | /* End PBXNativeTarget section */ 197 | 198 | /* Begin PBXProject section */ 199 | 4CB3221C1342CDF0008FC946 /* Project object */ = { 200 | isa = PBXProject; 201 | buildConfigurationList = 4CB3221F1342CDF0008FC946 /* Build configuration list for PBXProject "FBProgressView" */; 202 | compatibilityVersion = "Xcode 3.2"; 203 | developmentRegion = English; 204 | hasScannedForEncodings = 0; 205 | knownRegions = ( 206 | en, 207 | ); 208 | mainGroup = 4CB3221A1342CDF0008FC946; 209 | productRefGroup = 4CB322261342CDF0008FC946 /* Products */; 210 | projectDirPath = ""; 211 | projectRoot = ""; 212 | targets = ( 213 | 4CB322241342CDF0008FC946 /* FBProgressView */, 214 | 4CB322421342CDF1008FC946 /* FBProgressViewTests */, 215 | ); 216 | }; 217 | /* End PBXProject section */ 218 | 219 | /* Begin PBXResourcesBuildPhase section */ 220 | 4CB322231342CDF0008FC946 /* Resources */ = { 221 | isa = PBXResourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | 4CB322341342CDF0008FC946 /* InfoPlist.strings in Resources */, 225 | 4CB3223D1342CDF1008FC946 /* MainWindow.xib in Resources */, 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | }; 229 | 4CB322401342CDF1008FC946 /* Resources */ = { 230 | isa = PBXResourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 4CB3224E1342CDF1008FC946 /* InfoPlist.strings in Resources */, 234 | 4CB322511342CDF1008FC946 /* FBProgressViewTests.h in Resources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXResourcesBuildPhase section */ 239 | 240 | /* Begin PBXShellScriptBuildPhase section */ 241 | 4CB322411342CDF1008FC946 /* ShellScript */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputPaths = ( 247 | ); 248 | outputPaths = ( 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | shellPath = /bin/sh; 252 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; 253 | }; 254 | /* End PBXShellScriptBuildPhase section */ 255 | 256 | /* Begin PBXSourcesBuildPhase section */ 257 | 4CB322211342CDF0008FC946 /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 4CB322371342CDF0008FC946 /* main.m in Sources */, 262 | 4CB3223A1342CDF0008FC946 /* FBProgressViewAppDelegate.m in Sources */, 263 | 4CB3225E1342CE11008FC946 /* FBProgressView.m in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | 4CB3223E1342CDF1008FC946 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 4CB322531342CDF1008FC946 /* FBProgressViewTests.m in Sources */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | /* End PBXSourcesBuildPhase section */ 276 | 277 | /* Begin PBXTargetDependency section */ 278 | 4CB322481342CDF1008FC946 /* PBXTargetDependency */ = { 279 | isa = PBXTargetDependency; 280 | target = 4CB322241342CDF0008FC946 /* FBProgressView */; 281 | targetProxy = 4CB322471342CDF1008FC946 /* PBXContainerItemProxy */; 282 | }; 283 | /* End PBXTargetDependency section */ 284 | 285 | /* Begin PBXVariantGroup section */ 286 | 4CB322321342CDF0008FC946 /* InfoPlist.strings */ = { 287 | isa = PBXVariantGroup; 288 | children = ( 289 | 4CB322331342CDF0008FC946 /* en */, 290 | ); 291 | name = InfoPlist.strings; 292 | sourceTree = ""; 293 | }; 294 | 4CB3223B1342CDF1008FC946 /* MainWindow.xib */ = { 295 | isa = PBXVariantGroup; 296 | children = ( 297 | 4CB3223C1342CDF1008FC946 /* en */, 298 | ); 299 | name = MainWindow.xib; 300 | sourceTree = ""; 301 | }; 302 | 4CB3224C1342CDF1008FC946 /* InfoPlist.strings */ = { 303 | isa = PBXVariantGroup; 304 | children = ( 305 | 4CB3224D1342CDF1008FC946 /* en */, 306 | ); 307 | name = InfoPlist.strings; 308 | sourceTree = ""; 309 | }; 310 | /* End PBXVariantGroup section */ 311 | 312 | /* Begin XCBuildConfiguration section */ 313 | 4CB322541342CDF1008FC946 /* Debug */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 318 | GCC_C_LANGUAGE_STANDARD = gnu99; 319 | GCC_OPTIMIZATION_LEVEL = 0; 320 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 321 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 322 | GCC_VERSION = com.apple.compilers.llvmgcc42; 323 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 324 | GCC_WARN_UNUSED_VARIABLE = YES; 325 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 326 | SDKROOT = iphoneos; 327 | }; 328 | name = Debug; 329 | }; 330 | 4CB322551342CDF1008FC946 /* Release */ = { 331 | isa = XCBuildConfiguration; 332 | buildSettings = { 333 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_VERSION = com.apple.compilers.llvmgcc42; 337 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 338 | GCC_WARN_UNUSED_VARIABLE = YES; 339 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 340 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 341 | SDKROOT = iphoneos; 342 | }; 343 | name = Release; 344 | }; 345 | 4CB322571342CDF1008FC946 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | COPY_PHASE_STRIP = NO; 351 | GCC_DYNAMIC_NO_PIC = NO; 352 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 353 | GCC_PREFIX_HEADER = "FBProgressView/FBProgressView-Prefix.pch"; 354 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 355 | INFOPLIST_FILE = "FBProgressView/FBProgressView-Info.plist"; 356 | PRODUCT_NAME = "$(TARGET_NAME)"; 357 | WRAPPER_EXTENSION = app; 358 | }; 359 | name = Debug; 360 | }; 361 | 4CB322581342CDF1008FC946 /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | COPY_PHASE_STRIP = YES; 367 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 368 | GCC_PREFIX_HEADER = "FBProgressView/FBProgressView-Prefix.pch"; 369 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 370 | INFOPLIST_FILE = "FBProgressView/FBProgressView-Info.plist"; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | VALIDATE_PRODUCT = YES; 373 | WRAPPER_EXTENSION = app; 374 | }; 375 | name = Release; 376 | }; 377 | 4CB3225A1342CDF1008FC946 /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FBProgressView.app/FBProgressView"; 382 | CLANG_ENABLE_OBJC_ARC = YES; 383 | FRAMEWORK_SEARCH_PATHS = ( 384 | "$(SDKROOT)/Developer/Library/Frameworks", 385 | "$(DEVELOPER_LIBRARY_DIR)/Frameworks", 386 | ); 387 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 388 | GCC_PREFIX_HEADER = "FBProgressViewTests/FBProgressViewTests-Prefix.pch"; 389 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 390 | INFOPLIST_FILE = "FBProgressViewTests/FBProgressViewTests-Info.plist"; 391 | OTHER_LDFLAGS = ( 392 | "-framework", 393 | SenTestingKit, 394 | ); 395 | PRODUCT_NAME = "$(TARGET_NAME)"; 396 | TEST_HOST = "$(BUNDLE_LOADER)"; 397 | WRAPPER_EXTENSION = octest; 398 | }; 399 | name = Debug; 400 | }; 401 | 4CB3225B1342CDF1008FC946 /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ALWAYS_SEARCH_USER_PATHS = NO; 405 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FBProgressView.app/FBProgressView"; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | FRAMEWORK_SEARCH_PATHS = ( 408 | "$(SDKROOT)/Developer/Library/Frameworks", 409 | "$(DEVELOPER_LIBRARY_DIR)/Frameworks", 410 | ); 411 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 412 | GCC_PREFIX_HEADER = "FBProgressViewTests/FBProgressViewTests-Prefix.pch"; 413 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 414 | INFOPLIST_FILE = "FBProgressViewTests/FBProgressViewTests-Info.plist"; 415 | OTHER_LDFLAGS = ( 416 | "-framework", 417 | SenTestingKit, 418 | ); 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | TEST_HOST = "$(BUNDLE_LOADER)"; 421 | WRAPPER_EXTENSION = octest; 422 | }; 423 | name = Release; 424 | }; 425 | /* End XCBuildConfiguration section */ 426 | 427 | /* Begin XCConfigurationList section */ 428 | 4CB3221F1342CDF0008FC946 /* Build configuration list for PBXProject "FBProgressView" */ = { 429 | isa = XCConfigurationList; 430 | buildConfigurations = ( 431 | 4CB322541342CDF1008FC946 /* Debug */, 432 | 4CB322551342CDF1008FC946 /* Release */, 433 | ); 434 | defaultConfigurationIsVisible = 0; 435 | defaultConfigurationName = Release; 436 | }; 437 | 4CB322561342CDF1008FC946 /* Build configuration list for PBXNativeTarget "FBProgressView" */ = { 438 | isa = XCConfigurationList; 439 | buildConfigurations = ( 440 | 4CB322571342CDF1008FC946 /* Debug */, 441 | 4CB322581342CDF1008FC946 /* Release */, 442 | ); 443 | defaultConfigurationIsVisible = 0; 444 | defaultConfigurationName = Release; 445 | }; 446 | 4CB322591342CDF1008FC946 /* Build configuration list for PBXNativeTarget "FBProgressViewTests" */ = { 447 | isa = XCConfigurationList; 448 | buildConfigurations = ( 449 | 4CB3225A1342CDF1008FC946 /* Debug */, 450 | 4CB3225B1342CDF1008FC946 /* Release */, 451 | ); 452 | defaultConfigurationIsVisible = 0; 453 | defaultConfigurationName = Release; 454 | }; 455 | /* End XCConfigurationList section */ 456 | }; 457 | rootObject = 4CB3221C1342CDF0008FC946 /* Project object */; 458 | } 459 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | jp.5tec.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'FBProgressView' target in the 'FBProgressView' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressView 3 | // 4 | // Copyright (c) 2011 Five-technology Co.,Ltd. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | 27 | typedef enum { 28 | FBProgressViewStyleDefault = 0, 29 | FBProgressViewStyleGray, 30 | FBProgressViewStyleWhite 31 | } FBProgressViewStyle; 32 | 33 | @interface FBProgressView : UIView 34 | 35 | @property (nonatomic, assign) CGFloat lineWidth; 36 | @property (nonatomic, assign) FBProgressViewStyle progressViewStyle; 37 | @property (nonatomic, assign) float progress; 38 | @property (nonatomic, assign) BOOL hidesUntilStart; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressView 3 | // 4 | // Copyright (c) 2011 Five-technology Co.,Ltd. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import "FBProgressView.h" 26 | 27 | @interface FBProgressView() 28 | @property (nonatomic, strong) UIColor* color; 29 | @property (nonatomic) BOOL started; 30 | @property (nonatomic, strong) UIBezierPath *outlinePath; 31 | @end 32 | 33 | @implementation FBProgressView 34 | 35 | #pragma mark - 36 | #pragma mark Private Services 37 | - (void)_createOutlinePath 38 | { 39 | _outlinePath = [UIBezierPath bezierPath]; 40 | 41 | CGSize size = self.bounds.size; 42 | CGFloat unit = size.height/2.0 - self.lineWidth; 43 | 44 | CGPoint c1 = CGPointMake(unit+self.lineWidth, unit+self.lineWidth); 45 | [_outlinePath addArcWithCenter:c1 46 | radius:unit 47 | startAngle:3*M_PI/2 endAngle:M_PI/2 48 | clockwise:NO]; 49 | 50 | [_outlinePath addLineToPoint:CGPointMake(size.width - c1.x, 51 | size.height - self.lineWidth)]; 52 | CGPoint c2 = CGPointMake(size.width - unit - self.lineWidth, 53 | unit+self.lineWidth); 54 | [_outlinePath addArcWithCenter:c2 55 | radius:unit 56 | startAngle:M_PI/2 endAngle:-M_PI/2 57 | clockwise:NO]; 58 | 59 | [_outlinePath addLineToPoint:CGPointMake(c1.x, self.lineWidth)]; 60 | 61 | [_outlinePath setLineWidth:self.lineWidth]; 62 | 63 | } 64 | 65 | - (void)_init 66 | { 67 | self.progressViewStyle = FBProgressViewStyleDefault; 68 | self.lineWidth = 3.0; 69 | self.backgroundColor = [UIColor clearColor]; 70 | [self _createOutlinePath]; 71 | 72 | self.hidesUntilStart = YES; 73 | _started = NO; 74 | } 75 | 76 | 77 | #define MARGIN_UNIT 3.0 78 | - (void)_drawProgressBar 79 | { 80 | CGFloat margin = self.lineWidth + MARGIN_UNIT; 81 | CGSize size = self.bounds.size; 82 | size.width -= margin*2; 83 | size.height -= margin*2; 84 | CGFloat unit = size.height/2.0; 85 | 86 | CGFloat progressWidth = size.width * self.progress; 87 | if (progressWidth < unit*2) { 88 | progressWidth = unit*2; 89 | } 90 | 91 | CGRect barRect = CGRectMake(margin, 92 | margin, 93 | progressWidth, 94 | size.height); 95 | UIBezierPath* path = [UIBezierPath bezierPathWithRoundedRect:barRect 96 | cornerRadius:unit]; 97 | [path fill]; 98 | 99 | } 100 | 101 | 102 | #pragma mark - 103 | #pragma mark Initialization and deallocation 104 | 105 | - (id)initWithFrame:(CGRect)frame 106 | { 107 | self = [super initWithFrame:frame]; 108 | if (self) { 109 | [self _init]; 110 | } 111 | return self; 112 | } 113 | - (id)initWithCoder:(NSCoder *)aDecoder 114 | { 115 | self = [super initWithCoder:aDecoder]; 116 | if (self) { 117 | [self _init]; 118 | } 119 | return self; 120 | } 121 | 122 | 123 | #pragma mark - 124 | #pragma mark UIView 125 | 126 | - (void)drawRect:(CGRect)rect 127 | { 128 | if (!self.hidesUntilStart || _started) { 129 | [self.color set]; 130 | [_outlinePath stroke]; 131 | 132 | if (self.progress) { 133 | [self _drawProgressBar]; 134 | } 135 | } 136 | } 137 | 138 | 139 | #pragma mark - 140 | #pragma mark Properties 141 | - (void)setProgressViewStyle:(FBProgressViewStyle)progressViewStyle 142 | { 143 | _progressViewStyle = progressViewStyle; 144 | 145 | switch (progressViewStyle) { 146 | case FBProgressViewStyleGray: 147 | self.color = [UIColor lightGrayColor]; 148 | break; 149 | 150 | case FBProgressViewStyleWhite: 151 | self.color = [UIColor whiteColor]; 152 | break; 153 | 154 | default: 155 | self.color = [UIColor lightGrayColor]; 156 | break; 157 | } 158 | } 159 | 160 | - (void)setLineWidth:(CGFloat)lineWidth 161 | { 162 | _lineWidth = lineWidth; 163 | [self _createOutlinePath]; 164 | } 165 | 166 | - (void)setProgress:(float)progress 167 | { 168 | if (progress > 1.0) { 169 | progress = 1.0; 170 | } else if (progress < 0.0) { 171 | progress = 0.0; 172 | } 173 | _progress = progress; 174 | _started = YES; 175 | 176 | [self setNeedsDisplay]; 177 | } 178 | 179 | @end 180 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressViewAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressViewAppDelegate.h 3 | // FBProgressView 4 | // 5 | // Created by Hiroshi Hashiguchi on 11/03/30. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class FBProgressView; 12 | @interface FBProgressViewAppDelegate : NSObject { 13 | 14 | } 15 | 16 | @property (nonatomic, strong) IBOutlet UIWindow *window; 17 | @property (nonatomic, strong) IBOutlet FBProgressView* view1; 18 | @property (nonatomic, strong) IBOutlet FBProgressView* view2; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /FBProgressView/FBProgressViewAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressViewAppDelegate.m 3 | // FBProgressView 4 | // 5 | // Created by Hiroshi Hashiguchi on 11/03/30. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FBProgressViewAppDelegate.h" 10 | #import "FBProgressView.h" 11 | 12 | @implementation FBProgressViewAppDelegate 13 | 14 | 15 | @synthesize window=_window; 16 | @synthesize view1, view2; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 19 | { 20 | // Override point for customization after application launch. 21 | [self.window makeKeyAndVisible]; 22 | 23 | 24 | self.view1.progress = 0; 25 | self.view2.progress = 0; 26 | 27 | self.view2.progressViewStyle = FBProgressViewStyleWhite; 28 | 29 | [NSTimer scheduledTimerWithTimeInterval:0.1 30 | target:self 31 | selector:@selector(fire:) 32 | userInfo:nil 33 | repeats:YES]; 34 | 35 | return YES; 36 | } 37 | 38 | - (void)fire:(NSTimer*)timer 39 | { 40 | self.view1.progress = self.view1.progress + 0.01; 41 | self.view2.progress = self.view2.progress + 0.01; 42 | NSLog(@"fired: %f", self.view1.progress); 43 | 44 | if (self.view1.progress >= 1.0) { 45 | [timer invalidate]; 46 | NSLog(@"timer stopped"); 47 | } 48 | } 49 | 50 | - (void)applicationWillResignActive:(UIApplication *)application 51 | { 52 | /* 53 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 54 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 55 | */ 56 | } 57 | 58 | - (void)applicationDidEnterBackground:(UIApplication *)application 59 | { 60 | /* 61 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 62 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 63 | */ 64 | } 65 | 66 | - (void)applicationWillEnterForeground:(UIApplication *)application 67 | { 68 | /* 69 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 70 | */ 71 | } 72 | 73 | - (void)applicationDidBecomeActive:(UIApplication *)application 74 | { 75 | /* 76 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 77 | */ 78 | } 79 | 80 | - (void)applicationWillTerminate:(UIApplication *)application 81 | { 82 | /* 83 | Called when the application is about to terminate. 84 | Save data if appropriate. 85 | See also applicationDidEnterBackground:. 86 | */ 87 | } 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /FBProgressView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /FBProgressView/en.lproj/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J869 6 | 1305 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 300 12 | 13 | 14 | YES 15 | IBUIWindow 16 | IBUICustomObject 17 | IBUIView 18 | IBProxyObject 19 | 20 | 21 | YES 22 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 23 | 24 | 25 | YES 26 | 27 | YES 28 | 29 | 30 | 31 | 32 | YES 33 | 34 | IBFilesOwner 35 | IBCocoaTouchFramework 36 | 37 | 38 | IBFirstResponder 39 | IBCocoaTouchFramework 40 | 41 | 42 | IBCocoaTouchFramework 43 | 44 | 45 | 46 | 1316 47 | 48 | YES 49 | 50 | 51 | 1298 52 | {{60, 127}, {200, 30}} 53 | 54 | 55 | 56 | 57 | 3 58 | MQA 59 | 60 | 2 61 | 62 | 63 | IBCocoaTouchFramework 64 | 65 | 66 | 67 | 1316 68 | 69 | YES 70 | 71 | 72 | 1298 73 | {{60, 80}, {200, 30}} 74 | 75 | 76 | 77 | 3 78 | MQA 79 | 80 | 81 | IBCocoaTouchFramework 82 | 83 | 84 | {{0, 253}, {320, 227}} 85 | 86 | 87 | 88 | 3 89 | MAA 90 | 91 | IBCocoaTouchFramework 92 | 93 | 94 | 95 | {320, 480} 96 | 97 | 98 | 99 | 100 | 1 101 | MSAxIDEAA 102 | 103 | NO 104 | NO 105 | 106 | IBCocoaTouchFramework 107 | YES 108 | 109 | 110 | 111 | 112 | YES 113 | 114 | 115 | delegate 116 | 117 | 118 | 119 | 4 120 | 121 | 122 | 123 | window 124 | 125 | 126 | 127 | 5 128 | 129 | 130 | 131 | view1 132 | 133 | 134 | 135 | 13 136 | 137 | 138 | 139 | view2 140 | 141 | 142 | 143 | 14 144 | 145 | 146 | 147 | 148 | YES 149 | 150 | 0 151 | 152 | 153 | 154 | 155 | 156 | 2 157 | 158 | 159 | YES 160 | 161 | 162 | 163 | 164 | 165 | 166 | -1 167 | 168 | 169 | File's Owner 170 | 171 | 172 | 3 173 | 174 | 175 | 176 | 177 | -2 178 | 179 | 180 | 181 | 182 | 10 183 | 184 | 185 | 186 | 187 | 11 188 | 189 | 190 | YES 191 | 192 | 193 | 194 | 195 | 196 | 12 197 | 198 | 199 | 200 | 201 | 202 | 203 | YES 204 | 205 | YES 206 | -1.CustomClassName 207 | -2.CustomClassName 208 | 10.CustomClassName 209 | 10.IBPluginDependency 210 | 11.IBPluginDependency 211 | 12.CustomClassName 212 | 12.IBPluginDependency 213 | 2.IBAttributePlaceholdersKey 214 | 2.IBEditorWindowLastContentRect 215 | 2.IBPluginDependency 216 | 3.CustomClassName 217 | 3.IBPluginDependency 218 | 219 | 220 | YES 221 | UIApplication 222 | UIResponder 223 | FBProgressView 224 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 225 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 226 | FBProgressView 227 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 228 | 229 | YES 230 | 231 | 232 | 233 | {{198, 376}, {320, 480}} 234 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 235 | FBProgressViewAppDelegate 236 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 237 | 238 | 239 | 240 | YES 241 | 242 | 243 | 244 | 245 | 246 | YES 247 | 248 | 249 | 250 | 251 | 14 252 | 253 | 254 | 255 | YES 256 | 257 | FBProgressView 258 | UIView 259 | 260 | IBProjectSource 261 | ./Classes/FBProgressView.h 262 | 263 | 264 | 265 | FBProgressViewAppDelegate 266 | NSObject 267 | 268 | YES 269 | 270 | YES 271 | view1 272 | view2 273 | window 274 | 275 | 276 | YES 277 | FBProgressView 278 | FBProgressView 279 | UIWindow 280 | 281 | 282 | 283 | YES 284 | 285 | YES 286 | view1 287 | view2 288 | window 289 | 290 | 291 | YES 292 | 293 | view1 294 | FBProgressView 295 | 296 | 297 | view2 298 | FBProgressView 299 | 300 | 301 | window 302 | UIWindow 303 | 304 | 305 | 306 | 307 | IBProjectSource 308 | ./Classes/FBProgressViewAppDelegate.h 309 | 310 | 311 | 312 | 313 | 0 314 | IBCocoaTouchFramework 315 | 316 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 317 | 318 | 319 | YES 320 | 3 321 | 300 322 | 323 | 324 | -------------------------------------------------------------------------------- /FBProgressView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FBProgressView 4 | // 5 | // Created by Hiroshi Hashiguchi on 11/03/30. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /FBProgressViewTests/FBProgressViewTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | jp.5tec.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /FBProgressViewTests/FBProgressViewTests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'FBProgressViewTests' target in the 'FBProgressViewTests' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /FBProgressViewTests/FBProgressViewTests.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressViewTests.h 3 | // FBProgressViewTests 4 | // 5 | // Created by Hiroshi Hashiguchi on 11/03/30. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface FBProgressViewTests : SenTestCase { 13 | @private 14 | 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /FBProgressViewTests/FBProgressViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBProgressViewTests.m 3 | // FBProgressViewTests 4 | // 5 | // Created by Hiroshi Hashiguchi on 11/03/30. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FBProgressViewTests.h" 10 | 11 | 12 | @implementation FBProgressViewTests 13 | 14 | - (void)setUp 15 | { 16 | [super setUp]; 17 | 18 | // Set-up code here. 19 | } 20 | 21 | - (void)tearDown 22 | { 23 | // Tear-down code here. 24 | 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample 29 | { 30 | STFail(@"Unit tests are not implemented yet in FBProgressViewTests"); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /FBProgressViewTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Custom Progress View 2 | ==================== 3 | 4 | FBProgressView class is simple view for representing the progress of an activity. It works like UIProgressView. 5 | 6 | ![](https://github.com/dev5tec/FBProgressView/raw/master/image1.png) 7 | 8 | Usage 9 | ----- 10 | 11 | (1) Create a FBProgressView instance by using interface builder or write code below: 12 | 13 | FBProgressView* progressView = [[FBProgressView alloc] initWithFrame:CGRectMake(100, 100, 200, 30)]; 14 | [self.view addSubView:progressView]; 15 | 16 | (2) Set the progress value through the property 'progress' 17 | 18 | progressView.progress = 0.5; // 50% done 19 | 20 | 21 | You can set these properties: 22 | 23 | progressViewStyle // default: FBProgressViewStyleDefault 24 | lineWidth // default: 5.0 25 | hidesUntilStart // default: YES 26 | 27 | typedef enum { 28 | FBProgressViewStyleDefault = 0, 29 | FBProgressViewStyleGray, 30 | FBProgressViewStyleWhite 31 | } FBProgressViewStyle; 32 | 33 | 34 | Installation 35 | ----------- 36 | 37 | You should copy below files to your projects. 38 | 39 | FBProgressView.h 40 | FBProgressView.m 41 | 42 | 43 | 44 | License 45 | ------- 46 | MIT 47 | 48 | Copyright (c) 2011 Five-technology Co.,Ltd. 49 | 50 | Permission is hereby granted, free of charge, to any person obtaining a copy 51 | of this software and associated documentation files (the "Software"), to deal 52 | in the Software without restriction, including without limitation the rights 53 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 54 | copies of the Software, and to permit persons to whom the Software is 55 | furnished to do so, subject to the following conditions: 56 | 57 | The above copyright notice and this permission notice shall be included in 58 | all copies or substantial portions of the Software. 59 | 60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 61 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 62 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 63 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 64 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 65 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 66 | THE SOFTWARE. 67 | 68 | -------------------------------------------------------------------------------- /image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev5tec/FBProgressView/5e1f959cdbb9d44b6d36e77ab5c72a9e09e88b45/image1.png --------------------------------------------------------------------------------