├── .DS_Store ├── CGBaseProject.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── gongjunping.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── gongjunping.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── CGBaseProject.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── gongjunping.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── CGBaseProject ├── .DS_Store ├── ADUtilHelper.h ├── ADUtilHelper.m ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FileHandleTool.h ├── FileHandleTool.m ├── Info.plist ├── SwitchData │ ├── NSData+SwitchData.h │ ├── NSData+SwitchData.m │ ├── NSString+SwitchData.h │ ├── NSString+SwitchData.m │ └── SwitchHeader.h ├── ViewController.h ├── ViewController.m ├── ceshi.jpeg └── main.m ├── Podfile ├── Podfile.lock └── Pods ├── Headers ├── Private │ └── SVProgressHUD │ │ ├── SVIndefiniteAnimatedView.h │ │ ├── SVProgressAnimatedView.h │ │ ├── SVProgressHUD.h │ │ └── SVRadialGradientLayer.h └── Public │ └── SVProgressHUD │ ├── SVIndefiniteAnimatedView.h │ ├── SVProgressAnimatedView.h │ ├── SVProgressHUD.h │ └── SVRadialGradientLayer.h ├── Manifest.lock ├── Pods.xcodeproj ├── project.pbxproj └── xcuserdata │ └── gongjunping.xcuserdatad │ └── xcschemes │ ├── Pods-CGBaseProject.xcscheme │ ├── SVProgressHUD.xcscheme │ └── xcschememanagement.plist ├── SVProgressHUD ├── LICENSE ├── README.md └── SVProgressHUD │ ├── SVIndefiniteAnimatedView.h │ ├── SVIndefiniteAnimatedView.m │ ├── SVProgressAnimatedView.h │ ├── SVProgressAnimatedView.m │ ├── SVProgressHUD.bundle │ ├── angle-mask.png │ ├── angle-mask@2x.png │ ├── angle-mask@3x.png │ ├── error.png │ ├── error@2x.png │ ├── error@3x.png │ ├── info.png │ ├── info@2x.png │ ├── info@3x.png │ ├── success.png │ ├── success@2x.png │ └── success@3x.png │ ├── SVProgressHUD.h │ ├── SVProgressHUD.m │ ├── SVRadialGradientLayer.h │ └── SVRadialGradientLayer.m └── Target Support Files ├── Pods-CGBaseProject ├── Pods-CGBaseProject-acknowledgements.markdown ├── Pods-CGBaseProject-acknowledgements.plist ├── Pods-CGBaseProject-dummy.m ├── Pods-CGBaseProject-frameworks.sh ├── Pods-CGBaseProject-resources.sh ├── Pods-CGBaseProject.debug.xcconfig └── Pods-CGBaseProject.release.xcconfig └── SVProgressHUD ├── SVProgressHUD-dummy.m ├── SVProgressHUD-prefix.pch └── SVProgressHUD.xcconfig /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/.DS_Store -------------------------------------------------------------------------------- /CGBaseProject.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6E9C8B8D7D2424EB92B0D441 /* libPods-CGBaseProject.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BDB103DCEACD55B40DFE2AD7 /* libPods-CGBaseProject.a */; }; 11 | C2610E60205B501D005E931F /* FileHandleTool.m in Sources */ = {isa = PBXBuildFile; fileRef = C2610E5F205B501C005E931F /* FileHandleTool.m */; }; 12 | C2610E63205B504A005E931F /* ADUtilHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = C2610E62205B5049005E931F /* ADUtilHelper.m */; }; 13 | C2EC08E3205A077300A6D23F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EC08E2205A077300A6D23F /* AppDelegate.m */; }; 14 | C2EC08E6205A077300A6D23F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EC08E5205A077300A6D23F /* ViewController.m */; }; 15 | C2EC08E9205A077300A6D23F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2EC08E7205A077300A6D23F /* Main.storyboard */; }; 16 | C2EC08EB205A077300A6D23F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C2EC08EA205A077300A6D23F /* Assets.xcassets */; }; 17 | C2EC08EE205A077300A6D23F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2EC08EC205A077300A6D23F /* LaunchScreen.storyboard */; }; 18 | C2EC08F1205A077300A6D23F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EC08F0205A077300A6D23F /* main.m */; }; 19 | C2EC0968205A43E400A6D23F /* NSData+SwitchData.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EC0967205A43E400A6D23F /* NSData+SwitchData.m */; }; 20 | C2EC096B205A43FE00A6D23F /* NSString+SwitchData.m in Sources */ = {isa = PBXBuildFile; fileRef = C2EC096A205A43FE00A6D23F /* NSString+SwitchData.m */; }; 21 | C2EC096E205A57C000A6D23F /* ceshi.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = C2EC096D205A57C000A6D23F /* ceshi.jpeg */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | 16E0BA8BCC6CAD74FCD0362C /* Pods-CGBaseProject.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CGBaseProject.release.xcconfig"; path = "Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject.release.xcconfig"; sourceTree = ""; }; 26 | BDB103DCEACD55B40DFE2AD7 /* libPods-CGBaseProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CGBaseProject.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | C2610E5E205B501C005E931F /* FileHandleTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileHandleTool.h; sourceTree = ""; }; 28 | C2610E5F205B501C005E931F /* FileHandleTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileHandleTool.m; sourceTree = ""; }; 29 | C2610E61205B5049005E931F /* ADUtilHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADUtilHelper.h; sourceTree = ""; }; 30 | C2610E62205B5049005E931F /* ADUtilHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ADUtilHelper.m; sourceTree = ""; }; 31 | C2EC08DE205A077300A6D23F /* CGBaseProject.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CGBaseProject.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | C2EC08E1205A077300A6D23F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 33 | C2EC08E2205A077300A6D23F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 34 | C2EC08E4205A077300A6D23F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 35 | C2EC08E5205A077300A6D23F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 36 | C2EC08E8205A077300A6D23F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 37 | C2EC08EA205A077300A6D23F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 38 | C2EC08ED205A077300A6D23F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 39 | C2EC08EF205A077300A6D23F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | C2EC08F0205A077300A6D23F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | C2EC0966205A43E400A6D23F /* NSData+SwitchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+SwitchData.h"; sourceTree = ""; }; 42 | C2EC0967205A43E400A6D23F /* NSData+SwitchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+SwitchData.m"; sourceTree = ""; }; 43 | C2EC0969205A43FE00A6D23F /* NSString+SwitchData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+SwitchData.h"; sourceTree = ""; }; 44 | C2EC096A205A43FE00A6D23F /* NSString+SwitchData.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+SwitchData.m"; sourceTree = ""; }; 45 | C2EC096C205A441600A6D23F /* SwitchHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwitchHeader.h; sourceTree = ""; }; 46 | C2EC096D205A57C000A6D23F /* ceshi.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = ceshi.jpeg; sourceTree = ""; }; 47 | F5AE34E4BFF33202D884A663 /* Pods-CGBaseProject.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CGBaseProject.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject.debug.xcconfig"; sourceTree = ""; }; 48 | /* End PBXFileReference section */ 49 | 50 | /* Begin PBXFrameworksBuildPhase section */ 51 | C2EC08DB205A077300A6D23F /* Frameworks */ = { 52 | isa = PBXFrameworksBuildPhase; 53 | buildActionMask = 2147483647; 54 | files = ( 55 | 6E9C8B8D7D2424EB92B0D441 /* libPods-CGBaseProject.a in Frameworks */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | /* End PBXFrameworksBuildPhase section */ 60 | 61 | /* Begin PBXGroup section */ 62 | 6EF7662F676B11643ABBC59A /* Pods */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | F5AE34E4BFF33202D884A663 /* Pods-CGBaseProject.debug.xcconfig */, 66 | 16E0BA8BCC6CAD74FCD0362C /* Pods-CGBaseProject.release.xcconfig */, 67 | ); 68 | name = Pods; 69 | sourceTree = ""; 70 | }; 71 | 8DAB35608B434490CAC9F300 /* Frameworks */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | BDB103DCEACD55B40DFE2AD7 /* libPods-CGBaseProject.a */, 75 | ); 76 | name = Frameworks; 77 | sourceTree = ""; 78 | }; 79 | C2EC08D5205A077300A6D23F = { 80 | isa = PBXGroup; 81 | children = ( 82 | C2EC08E0205A077300A6D23F /* CGBaseProject */, 83 | C2EC08DF205A077300A6D23F /* Products */, 84 | 6EF7662F676B11643ABBC59A /* Pods */, 85 | 8DAB35608B434490CAC9F300 /* Frameworks */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | C2EC08DF205A077300A6D23F /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | C2EC08DE205A077300A6D23F /* CGBaseProject.app */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | C2EC08E0205A077300A6D23F /* CGBaseProject */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | C2610E61205B5049005E931F /* ADUtilHelper.h */, 101 | C2610E62205B5049005E931F /* ADUtilHelper.m */, 102 | C2610E5E205B501C005E931F /* FileHandleTool.h */, 103 | C2610E5F205B501C005E931F /* FileHandleTool.m */, 104 | C2EC0965205A43C900A6D23F /* SwitchData */, 105 | C2EC08E1205A077300A6D23F /* AppDelegate.h */, 106 | C2EC08E2205A077300A6D23F /* AppDelegate.m */, 107 | C2EC08E4205A077300A6D23F /* ViewController.h */, 108 | C2EC08E5205A077300A6D23F /* ViewController.m */, 109 | C2EC096D205A57C000A6D23F /* ceshi.jpeg */, 110 | C2EC08E7205A077300A6D23F /* Main.storyboard */, 111 | C2EC08EA205A077300A6D23F /* Assets.xcassets */, 112 | C2EC08EC205A077300A6D23F /* LaunchScreen.storyboard */, 113 | C2EC08EF205A077300A6D23F /* Info.plist */, 114 | C2EC08F0205A077300A6D23F /* main.m */, 115 | ); 116 | path = CGBaseProject; 117 | sourceTree = ""; 118 | }; 119 | C2EC0965205A43C900A6D23F /* SwitchData */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | C2EC0966205A43E400A6D23F /* NSData+SwitchData.h */, 123 | C2EC0967205A43E400A6D23F /* NSData+SwitchData.m */, 124 | C2EC0969205A43FE00A6D23F /* NSString+SwitchData.h */, 125 | C2EC096A205A43FE00A6D23F /* NSString+SwitchData.m */, 126 | C2EC096C205A441600A6D23F /* SwitchHeader.h */, 127 | ); 128 | path = SwitchData; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | C2EC08DD205A077300A6D23F /* CGBaseProject */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = C2EC08F4205A077300A6D23F /* Build configuration list for PBXNativeTarget "CGBaseProject" */; 137 | buildPhases = ( 138 | A3FE982D2BAEDBBAA4EA0EA7 /* [CP] Check Pods Manifest.lock */, 139 | C2EC08DA205A077300A6D23F /* Sources */, 140 | C2EC08DB205A077300A6D23F /* Frameworks */, 141 | C2EC08DC205A077300A6D23F /* Resources */, 142 | 6ED754620E0E4020D1DCC822 /* [CP] Embed Pods Frameworks */, 143 | E72CD9A7F3D068D3BBB3ACE3 /* [CP] Copy Pods Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = CGBaseProject; 150 | productName = CGBaseProject; 151 | productReference = C2EC08DE205A077300A6D23F /* CGBaseProject.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | /* End PBXNativeTarget section */ 155 | 156 | /* Begin PBXProject section */ 157 | C2EC08D6205A077300A6D23F /* Project object */ = { 158 | isa = PBXProject; 159 | attributes = { 160 | LastUpgradeCheck = 0920; 161 | ORGANIZATIONNAME = chrise; 162 | TargetAttributes = { 163 | C2EC08DD205A077300A6D23F = { 164 | CreatedOnToolsVersion = 9.2; 165 | ProvisioningStyle = Automatic; 166 | }; 167 | }; 168 | }; 169 | buildConfigurationList = C2EC08D9205A077300A6D23F /* Build configuration list for PBXProject "CGBaseProject" */; 170 | compatibilityVersion = "Xcode 8.0"; 171 | developmentRegion = en; 172 | hasScannedForEncodings = 0; 173 | knownRegions = ( 174 | en, 175 | Base, 176 | ); 177 | mainGroup = C2EC08D5205A077300A6D23F; 178 | productRefGroup = C2EC08DF205A077300A6D23F /* Products */; 179 | projectDirPath = ""; 180 | projectRoot = ""; 181 | targets = ( 182 | C2EC08DD205A077300A6D23F /* CGBaseProject */, 183 | ); 184 | }; 185 | /* End PBXProject section */ 186 | 187 | /* Begin PBXResourcesBuildPhase section */ 188 | C2EC08DC205A077300A6D23F /* Resources */ = { 189 | isa = PBXResourcesBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | C2EC08EE205A077300A6D23F /* LaunchScreen.storyboard in Resources */, 193 | C2EC08EB205A077300A6D23F /* Assets.xcassets in Resources */, 194 | C2EC096E205A57C000A6D23F /* ceshi.jpeg in Resources */, 195 | C2EC08E9205A077300A6D23F /* Main.storyboard in Resources */, 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | }; 199 | /* End PBXResourcesBuildPhase section */ 200 | 201 | /* Begin PBXShellScriptBuildPhase section */ 202 | 6ED754620E0E4020D1DCC822 /* [CP] Embed Pods Frameworks */ = { 203 | isa = PBXShellScriptBuildPhase; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputPaths = ( 208 | ); 209 | name = "[CP] Embed Pods Frameworks"; 210 | outputPaths = ( 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | shellPath = /bin/sh; 214 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-frameworks.sh\"\n"; 215 | showEnvVarsInLog = 0; 216 | }; 217 | A3FE982D2BAEDBBAA4EA0EA7 /* [CP] Check Pods Manifest.lock */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 224 | "${PODS_ROOT}/Manifest.lock", 225 | ); 226 | name = "[CP] Check Pods Manifest.lock"; 227 | outputPaths = ( 228 | "$(DERIVED_FILE_DIR)/Pods-CGBaseProject-checkManifestLockResult.txt", 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | shellPath = /bin/sh; 232 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 233 | showEnvVarsInLog = 0; 234 | }; 235 | E72CD9A7F3D068D3BBB3ACE3 /* [CP] Copy Pods Resources */ = { 236 | isa = PBXShellScriptBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | ); 240 | inputPaths = ( 241 | "${SRCROOT}/Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-resources.sh", 242 | "${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle", 243 | ); 244 | name = "[CP] Copy Pods Resources"; 245 | outputPaths = ( 246 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SVProgressHUD.bundle", 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | shellPath = /bin/sh; 250 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-resources.sh\"\n"; 251 | showEnvVarsInLog = 0; 252 | }; 253 | /* End PBXShellScriptBuildPhase section */ 254 | 255 | /* Begin PBXSourcesBuildPhase section */ 256 | C2EC08DA205A077300A6D23F /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | C2EC08E6205A077300A6D23F /* ViewController.m in Sources */, 261 | C2610E60205B501D005E931F /* FileHandleTool.m in Sources */, 262 | C2EC0968205A43E400A6D23F /* NSData+SwitchData.m in Sources */, 263 | C2EC096B205A43FE00A6D23F /* NSString+SwitchData.m in Sources */, 264 | C2EC08F1205A077300A6D23F /* main.m in Sources */, 265 | C2610E63205B504A005E931F /* ADUtilHelper.m in Sources */, 266 | C2EC08E3205A077300A6D23F /* AppDelegate.m in Sources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | /* End PBXSourcesBuildPhase section */ 271 | 272 | /* Begin PBXVariantGroup section */ 273 | C2EC08E7205A077300A6D23F /* Main.storyboard */ = { 274 | isa = PBXVariantGroup; 275 | children = ( 276 | C2EC08E8205A077300A6D23F /* Base */, 277 | ); 278 | name = Main.storyboard; 279 | sourceTree = ""; 280 | }; 281 | C2EC08EC205A077300A6D23F /* LaunchScreen.storyboard */ = { 282 | isa = PBXVariantGroup; 283 | children = ( 284 | C2EC08ED205A077300A6D23F /* Base */, 285 | ); 286 | name = LaunchScreen.storyboard; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXVariantGroup section */ 290 | 291 | /* Begin XCBuildConfiguration section */ 292 | C2EC08F2205A077300A6D23F /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | ALWAYS_SEARCH_USER_PATHS = NO; 296 | CLANG_ANALYZER_NONNULL = YES; 297 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 298 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 299 | CLANG_CXX_LIBRARY = "libc++"; 300 | CLANG_ENABLE_MODULES = YES; 301 | CLANG_ENABLE_OBJC_ARC = YES; 302 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 303 | CLANG_WARN_BOOL_CONVERSION = YES; 304 | CLANG_WARN_COMMA = YES; 305 | CLANG_WARN_CONSTANT_CONVERSION = YES; 306 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 307 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 308 | CLANG_WARN_EMPTY_BODY = YES; 309 | CLANG_WARN_ENUM_CONVERSION = YES; 310 | CLANG_WARN_INFINITE_RECURSION = YES; 311 | CLANG_WARN_INT_CONVERSION = YES; 312 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 313 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 315 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 316 | CLANG_WARN_STRICT_PROTOTYPES = YES; 317 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 318 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 319 | CLANG_WARN_UNREACHABLE_CODE = YES; 320 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 321 | CODE_SIGN_IDENTITY = "iPhone Developer"; 322 | COPY_PHASE_STRIP = NO; 323 | DEBUG_INFORMATION_FORMAT = dwarf; 324 | ENABLE_STRICT_OBJC_MSGSEND = YES; 325 | ENABLE_TESTABILITY = YES; 326 | GCC_C_LANGUAGE_STANDARD = gnu11; 327 | GCC_DYNAMIC_NO_PIC = NO; 328 | GCC_NO_COMMON_BLOCKS = YES; 329 | GCC_OPTIMIZATION_LEVEL = 0; 330 | GCC_PREPROCESSOR_DEFINITIONS = ( 331 | "DEBUG=1", 332 | "$(inherited)", 333 | ); 334 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 335 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 336 | GCC_WARN_UNDECLARED_SELECTOR = YES; 337 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 338 | GCC_WARN_UNUSED_FUNCTION = YES; 339 | GCC_WARN_UNUSED_VARIABLE = YES; 340 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 341 | MTL_ENABLE_DEBUG_INFO = YES; 342 | ONLY_ACTIVE_ARCH = YES; 343 | SDKROOT = iphoneos; 344 | }; 345 | name = Debug; 346 | }; 347 | C2EC08F3205A077300A6D23F /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ALWAYS_SEARCH_USER_PATHS = NO; 351 | CLANG_ANALYZER_NONNULL = YES; 352 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 353 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 354 | CLANG_CXX_LIBRARY = "libc++"; 355 | CLANG_ENABLE_MODULES = YES; 356 | CLANG_ENABLE_OBJC_ARC = YES; 357 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_COMMA = YES; 360 | CLANG_WARN_CONSTANT_CONVERSION = YES; 361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 362 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 363 | CLANG_WARN_EMPTY_BODY = YES; 364 | CLANG_WARN_ENUM_CONVERSION = YES; 365 | CLANG_WARN_INFINITE_RECURSION = YES; 366 | CLANG_WARN_INT_CONVERSION = YES; 367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 368 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 370 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 371 | CLANG_WARN_STRICT_PROTOTYPES = YES; 372 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 373 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | CODE_SIGN_IDENTITY = "iPhone Developer"; 377 | COPY_PHASE_STRIP = NO; 378 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 379 | ENABLE_NS_ASSERTIONS = NO; 380 | ENABLE_STRICT_OBJC_MSGSEND = YES; 381 | GCC_C_LANGUAGE_STANDARD = gnu11; 382 | GCC_NO_COMMON_BLOCKS = YES; 383 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 384 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 385 | GCC_WARN_UNDECLARED_SELECTOR = YES; 386 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 387 | GCC_WARN_UNUSED_FUNCTION = YES; 388 | GCC_WARN_UNUSED_VARIABLE = YES; 389 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 390 | MTL_ENABLE_DEBUG_INFO = NO; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | C2EC08F5205A077300A6D23F /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | baseConfigurationReference = F5AE34E4BFF33202D884A663 /* Pods-CGBaseProject.debug.xcconfig */; 399 | buildSettings = { 400 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 401 | CODE_SIGN_STYLE = Automatic; 402 | DEVELOPMENT_TEAM = WN9GC3KCG4; 403 | INFOPLIST_FILE = CGBaseProject/Info.plist; 404 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 405 | PRODUCT_BUNDLE_IDENTIFIER = SDWebImage.jysz.CGBaseProject; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | }; 409 | name = Debug; 410 | }; 411 | C2EC08F6205A077300A6D23F /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | baseConfigurationReference = 16E0BA8BCC6CAD74FCD0362C /* Pods-CGBaseProject.release.xcconfig */; 414 | buildSettings = { 415 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 416 | CODE_SIGN_STYLE = Automatic; 417 | DEVELOPMENT_TEAM = WN9GC3KCG4; 418 | INFOPLIST_FILE = CGBaseProject/Info.plist; 419 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 420 | PRODUCT_BUNDLE_IDENTIFIER = SDWebImage.jysz.CGBaseProject; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | }; 424 | name = Release; 425 | }; 426 | /* End XCBuildConfiguration section */ 427 | 428 | /* Begin XCConfigurationList section */ 429 | C2EC08D9205A077300A6D23F /* Build configuration list for PBXProject "CGBaseProject" */ = { 430 | isa = XCConfigurationList; 431 | buildConfigurations = ( 432 | C2EC08F2205A077300A6D23F /* Debug */, 433 | C2EC08F3205A077300A6D23F /* Release */, 434 | ); 435 | defaultConfigurationIsVisible = 0; 436 | defaultConfigurationName = Release; 437 | }; 438 | C2EC08F4205A077300A6D23F /* Build configuration list for PBXNativeTarget "CGBaseProject" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | C2EC08F5205A077300A6D23F /* Debug */, 442 | C2EC08F6205A077300A6D23F /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | /* End XCConfigurationList section */ 448 | }; 449 | rootObject = C2EC08D6205A077300A6D23F /* Project object */; 450 | } 451 | -------------------------------------------------------------------------------- /CGBaseProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CGBaseProject.xcodeproj/project.xcworkspace/xcuserdata/gongjunping.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/CGBaseProject.xcodeproj/project.xcworkspace/xcuserdata/gongjunping.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CGBaseProject.xcodeproj/xcuserdata/gongjunping.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CGBaseProject.xcodeproj/xcuserdata/gongjunping.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CGBaseProject.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /CGBaseProject.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /CGBaseProject.xcworkspace/xcuserdata/gongjunping.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/CGBaseProject.xcworkspace/xcuserdata/gongjunping.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CGBaseProject.xcworkspace/xcuserdata/gongjunping.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CGBaseProject/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/CGBaseProject/.DS_Store -------------------------------------------------------------------------------- /CGBaseProject/ADUtilHelper.h: -------------------------------------------------------------------------------- 1 | // 2 | // ADUtilHelper.h 3 | // Adas 4 | // 5 | // Created by dulingkang on 16/2/18. 6 | // Copyright © 2016年 Smartereye. All rights reserved. 7 | // 获取文件的MD5值 8 | 9 | #import 10 | #import 11 | @interface ADUtilHelper : NSObject 12 | 13 | +(NSString *)getFileMD5WithPath:(NSString*)path; 14 | +(NSString *)getWifiName; 15 | @end 16 | -------------------------------------------------------------------------------- /CGBaseProject/ADUtilHelper.m: -------------------------------------------------------------------------------- 1 | // 2 | // ADUtilHelper.m 3 | // Adas 4 | // 5 | // Created by dulingkang on 16/2/18. 6 | // Copyright © 2016年 Smartereye. All rights reserved. 7 | // 8 | #define FileHashDefaultChunkSizeForReadingData 1024*8 9 | 10 | #import "ADUtilHelper.h" 11 | #include 12 | 13 | @implementation ADUtilHelper 14 | 15 | +(NSString*)getFileMD5WithPath:(NSString*)path 16 | { 17 | if (path) { 18 | return (__bridge_transfer NSString *)FileMD5HashCreateWithPath((__bridge CFStringRef)path, FileHashDefaultChunkSizeForReadingData); 19 | }else{ 20 | return @""; 21 | } 22 | 23 | } 24 | 25 | CFStringRef FileMD5HashCreateWithPath(CFStringRef filePath,size_t chunkSizeForReadingData) { 26 | // Declare needed variables 27 | CFStringRef result = NULL; 28 | CFReadStreamRef readStream = NULL; 29 | // Get the file URL 30 | CFURLRef fileURL = 31 | CFURLCreateWithFileSystemPath(kCFAllocatorDefault, 32 | (CFStringRef)filePath, 33 | kCFURLPOSIXPathStyle, 34 | (Boolean)false); 35 | if (!fileURL) goto done; 36 | // Create and open the read stream 37 | readStream = CFReadStreamCreateWithFile(kCFAllocatorDefault, 38 | (CFURLRef)fileURL); 39 | if (!readStream) goto done; 40 | bool didSucceed = (bool)CFReadStreamOpen(readStream); 41 | if (!didSucceed) goto done; 42 | // Initialize the hash object 43 | CC_MD5_CTX hashObject; 44 | CC_MD5_Init(&hashObject); 45 | // Make sure chunkSizeForReadingData is valid 46 | if (!chunkSizeForReadingData) { 47 | chunkSizeForReadingData = FileHashDefaultChunkSizeForReadingData; 48 | } 49 | // Feed the data to the hash object 50 | bool hasMoreData = true; 51 | while (hasMoreData) { 52 | uint8_t buffer[chunkSizeForReadingData]; 53 | CFIndex readBytesCount = CFReadStreamRead(readStream,(UInt8 *)buffer,(CFIndex)sizeof(buffer)); 54 | if (readBytesCount == -1) break; 55 | if (readBytesCount == 0) { 56 | hasMoreData = false; 57 | continue; 58 | } 59 | CC_MD5_Update(&hashObject,(const void *)buffer,(CC_LONG)readBytesCount); 60 | } 61 | // Check if the read operation succeeded 62 | didSucceed = !hasMoreData; 63 | // Compute the hash digest 64 | unsigned char digest[CC_MD5_DIGEST_LENGTH]; 65 | CC_MD5_Final(digest, &hashObject); 66 | // Abort if the read operation failed 67 | if (!didSucceed) goto done; 68 | // Compute the string result 69 | char hash[2 * sizeof(digest) + 1]; 70 | for (size_t i = 0; i < sizeof(digest); ++i) { 71 | snprintf(hash + (2 * i), 3, "%02x", (int)(digest[i])); 72 | } 73 | result = CFStringCreateWithCString(kCFAllocatorDefault,(const char *)hash,kCFStringEncodingUTF8); 74 | 75 | done: 76 | if (readStream) { 77 | CFReadStreamClose(readStream); 78 | CFRelease(readStream); 79 | } 80 | if (fileURL) { 81 | CFRelease(fileURL); 82 | } 83 | return result; 84 | } 85 | 86 | +(NSString *)getWifiName{ 87 | NSString *wifiName = @""; 88 | 89 | CFArrayRef wifiInterfaces = CNCopySupportedInterfaces(); 90 | 91 | if (!wifiInterfaces) { 92 | return nil; 93 | } 94 | 95 | NSArray *interfaces = (__bridge NSArray *)wifiInterfaces; 96 | 97 | for (NSString *interfaceName in interfaces) { 98 | CFDictionaryRef dictRef = CNCopyCurrentNetworkInfo((__bridge CFStringRef)(interfaceName)); 99 | 100 | if (dictRef) { 101 | NSDictionary *networkInfo = (__bridge NSDictionary *)dictRef; 102 | NSLog(@"network info -> %@", networkInfo); 103 | wifiName = [networkInfo objectForKey:(__bridge NSString *)kCNNetworkInfoKeySSID]; 104 | NSLog(@"wifiName----%@",wifiName); 105 | CFRelease(dictRef); 106 | } 107 | } 108 | 109 | CFRelease(wifiInterfaces); 110 | return wifiName; 111 | 112 | 113 | } 114 | @end 115 | -------------------------------------------------------------------------------- /CGBaseProject/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CGBaseProject/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /CGBaseProject/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /CGBaseProject/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /CGBaseProject/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 32 | 39 | 49 | 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 | -------------------------------------------------------------------------------- /CGBaseProject/FileHandleTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // FileHandleTool.h 3 | // TestAPlayerIOS 4 | // 5 | // Created by chrise on 2018/3/14. 6 | // Copyright © 2018年 xlxmp. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | @interface FileHandleTool : NSObject 14 | 15 | //读句柄 16 | @property (strong, nonatomic) NSFileHandle * readHandle; 17 | //写句柄 18 | @property (strong, nonatomic) NSFileHandle *descHandle; 19 | //句柄偏移量 20 | @property (assign, nonatomic) unsigned long long offset; 21 | 22 | //总包数 23 | @property (assign, nonatomic) NSUInteger totalPackage; 24 | 25 | //当前包数 26 | @property (assign, nonatomic) NSUInteger currentPackage; 27 | 28 | @property (strong, nonatomic) NSString *checksum; 29 | 30 | #pragma mark 读数据 31 | -(NSData *)readData; 32 | #pragma mark 读写数据 33 | -(void)readAndWriteData; 34 | #pragma mark 写数据 35 | -(void)writeDataWithData:(NSData*)data; 36 | 37 | #pragma mark 创建服务器写句柄 38 | -(void)creatReadServerFileHandelFileName:(NSString*)fileName totalPackage:(NSUInteger)total; 39 | #pragma mark 创建读本读句柄 40 | -(void)creatReadLocalFileHandelName:(NSString*)fileName; 41 | #pragma mark 创建读写句柄 42 | -(void)creatReadAndWriteFileHandelName:(NSString*)fileName; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /CGBaseProject/FileHandleTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // FileHandleTool.m 3 | // TestAPlayerIOS 4 | // 5 | // Created by chrise on 2018/3/14. 6 | // Copyright © 2018年 xlxmp. All rights reserved. 7 | // 8 | 9 | #import "FileHandleTool.h" 10 | #import "ADUtilHelper.h" 11 | #import 12 | //包大小10KB 13 | #define PackgeSize (1024*10) 14 | 15 | 16 | @implementation FileHandleTool 17 | 18 | #pragma mark 创建服务器写句柄 19 | -(void)creatReadServerFileHandelFileName:(NSString*)fileName totalPackage:(NSUInteger)total 20 | { 21 | 22 | //目标 23 | NSString * docpath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; 24 | NSString *destFile =[docpath stringByAppendingPathComponent:fileName]; 25 | //创建文件 26 | [[NSFileManager defaultManager] createFileAtPath:destFile contents:nil attributes:nil]; 27 | 28 | self.descHandle = [NSFileHandle fileHandleForWritingAtPath:destFile]; 29 | 30 | 31 | self.offset = 0; 32 | 33 | self.totalPackage = total; 34 | self.currentPackage = 0; 35 | 36 | } 37 | 38 | #pragma mark 创建读本读句柄 39 | -(void)creatReadLocalFileHandelName:(NSString*)fileName 40 | { 41 | //获取文件路径 42 | NSString *path= [[NSBundle mainBundle] pathForResource:@"ceshi" ofType:@"jpeg"]; 43 | //读取文件MD5值 44 | self.checksum = [ADUtilHelper getFileMD5WithPath:path]; 45 | //创建读文件的句柄 46 | self.readHandle = [NSFileHandle fileHandleForReadingAtPath:path]; 47 | //用来记录偏移量 48 | self.offset = 0; 49 | //获取文件大小 50 | unsigned long long totalRet = [self.readHandle seekToEndOfFile];//返回文件大小 51 | 52 | //计算总包数 53 | self.totalPackage = (int)ceilf(totalRet*1.0/PackgeSize); 54 | self.currentPackage = 0; 55 | } 56 | 57 | #pragma mark 创建读写句柄 58 | -(void)creatReadAndWriteFileHandelName:(NSString*)fileName 59 | { 60 | 61 | //待复制的文件 62 | NSString *path= [[NSBundle mainBundle] pathForResource:@"ceshi" ofType:@"jpeg"]; 63 | //创建读文件的句柄 64 | self.readHandle = [NSFileHandle fileHandleForReadingAtPath:path];//读到内存 65 | //目标路径 66 | NSString * docpath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; 67 | NSString *destFile =[docpath stringByAppendingPathComponent:fileName]; 68 | //创建文件 69 | [[NSFileManager defaultManager] createFileAtPath:destFile contents:nil attributes:nil]; 70 | //创建写文件的句柄 71 | self.descHandle = [NSFileHandle fileHandleForWritingAtPath:destFile]; 72 | 73 | 74 | self.offset = 0; 75 | 76 | 77 | unsigned long long totalRet = [self.readHandle seekToEndOfFile];//返回文件大小 78 | //计算总包数 79 | self.totalPackage = (int)ceilf(totalRet/PackgeSize); 80 | self.currentPackage = 0; 81 | } 82 | 83 | 84 | #pragma mark 读数据 85 | -(NSData *)readData{ 86 | 87 | NSData * data = nil; 88 | 89 | if ((self.totalPackage - self.currentPackage)==1) {//最后一次 90 | //将句柄移动到已读取内容的最后 91 | [self.readHandle seekToFileOffset:self.offset]; 92 | //从指定位置读到文件最后 93 | data = [self.readHandle readDataToEndOfFile]; 94 | //关闭读句柄 95 | [self.readHandle closeFile]; 96 | 97 | [SVProgressHUD showSuccessWithStatus:@"下载成功"]; 98 | [SVProgressHUD dismissWithDelay:1]; 99 | NSLog(@"读完了文件:%llu",self.offset); 100 | }else{ 101 | [SVProgressHUD showWithStatus:@"下载中"]; 102 | //将句柄移动到已读取内容的最后 103 | [self.readHandle seekToFileOffset:self.offset]; 104 | //读取指定大小的内容(PackgeSize) 105 | data = [self.readHandle readDataOfLength:PackgeSize]; 106 | //偏移量累加 107 | self.offset += PackgeSize; 108 | NSLog(@"读了:%@",data); 109 | 110 | } 111 | self.currentPackage += 1; 112 | return data; 113 | } 114 | 115 | #pragma mark 写数据 116 | -(void)writeDataWithData:(NSData*)data{ 117 | 118 | //偏移量设置为目标文件的最后,要不然会覆盖原来的内容 119 | [self.descHandle seekToEndOfFile]; 120 | //写数据 121 | [self.descHandle writeData:data]; 122 | 123 | self.offset += data.length; 124 | NSLog(@"写了:%@",data); 125 | self.currentPackage += 1; 126 | if (self.currentPackage == self.totalPackage) { 127 | [self.descHandle closeFile]; 128 | NSLog(@"写完了"); 129 | } 130 | 131 | } 132 | 133 | 134 | #pragma mark 读写数据 135 | -(void)readAndWriteData{ 136 | 137 | NSData * _data = nil; 138 | 139 | if ((self.totalPackage - self.currentPackage)==1) { 140 | [self.readHandle seekToFileOffset:self.offset]; 141 | _data = [self.readHandle readDataToEndOfFile]; 142 | 143 | //偏移量设置为目标文件的最后,要不然会覆盖原来的内容 144 | [self.descHandle seekToEndOfFile]; 145 | //写数据 146 | [self.descHandle writeData:_data]; 147 | [self.descHandle closeFile]; 148 | [self.readHandle closeFile]; 149 | 150 | 151 | NSLog(@"写完了:写入了文件:%llu",self.offset); 152 | }else{ 153 | //大于1M的文件多次读写 154 | [self.readHandle seekToFileOffset:self.offset]; 155 | 156 | _data = [self.readHandle readDataOfLength:PackgeSize]; 157 | 158 | //偏移量设置为目标文件的最后,要不然会覆盖原来的内容 159 | [self.descHandle seekToEndOfFile]; 160 | //写数据 161 | [self.descHandle writeData:_data]; 162 | 163 | self.offset += PackgeSize; 164 | 165 | [self performSelector:@selector(readAndWriteData) withObject:nil afterDelay:1]; 166 | NSLog(@"写入了文件:%llu",self.offset); 167 | } 168 | self.currentPackage += 1; 169 | } 170 | 171 | 172 | 173 | @end 174 | -------------------------------------------------------------------------------- /CGBaseProject/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CGBaseProject/SwitchData/NSData+SwitchData.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+SwitchData.h 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (SwitchData) 12 | /** 13 | NSData 转 十六进制string 14 | 15 | @return NSString类型的十六进制string 16 | */ 17 | - (NSString *)convertDataToHexStr; 18 | 19 | 20 | 21 | 22 | /** 23 | NSData 转 NSString 24 | 25 | @return NSString类型的字符串 26 | */ 27 | - (NSString *)dataToString; 28 | @end 29 | -------------------------------------------------------------------------------- /CGBaseProject/SwitchData/NSData+SwitchData.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+SwitchData.m 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import "NSData+SwitchData.h" 10 | 11 | @implementation NSData (SwitchData) 12 | 13 | /** 14 | NSData 转 十六进制string 15 | 16 | @return NSString类型的十六进制string 17 | */ 18 | - (NSString *)convertDataToHexStr{ 19 | if (!self || [self length] == 0) { 20 | return @""; 21 | } 22 | NSMutableString *string = [[NSMutableString alloc] initWithCapacity:[self length]]; 23 | 24 | [self enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) { 25 | unsigned char *dataBytes = (unsigned char*)bytes; 26 | for (NSInteger i = 0; i < byteRange.length; i++) { 27 | NSString *hexStr = [NSString stringWithFormat:@"%x", (dataBytes[i]) & 0xff]; 28 | if ([hexStr length] == 2) { 29 | [string appendString:hexStr]; 30 | } else { 31 | [string appendFormat:@"0%@", hexStr]; 32 | } 33 | } 34 | }]; 35 | 36 | return string; 37 | } 38 | 39 | /** 40 | NSData 转 NSString 41 | 42 | @return NSString类型的字符串 43 | */ 44 | - (NSString *)dataToString { 45 | Byte *bytes = (Byte *)[self bytes]; 46 | NSMutableString *string = [[NSMutableString alloc] init]; 47 | for(int i = 0; i< [self length]; i++) { 48 | if (i == 0) { 49 | [string appendString:[NSString stringWithFormat:@"%hhu",bytes[i]]]; 50 | }else { 51 | [string appendString:[NSString stringWithFormat:@",%hhu",bytes[i]]]; 52 | } 53 | } 54 | return string; 55 | } 56 | @end 57 | -------------------------------------------------------------------------------- /CGBaseProject/SwitchData/NSString+SwitchData.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SwitchData.h 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (SwitchData) 12 | /** 13 | 带子节的string转为NSData 14 | 15 | @return NSData类型 16 | */ 17 | -(NSData*) convertBytesStringToData ; 18 | 19 | 20 | /** 21 | 十进制转十六进制 22 | 23 | @return 十六进制字符串 24 | */ 25 | - (NSString *)decimalToHex; 26 | 27 | /** 28 | 十进制转十六进制 29 | length 总长度,不足补0 30 | @return 十六进制字符串 31 | */ 32 | - (NSString *)decimalToHexWithLength:(NSUInteger)length; 33 | 34 | /** 35 | 十六进制转十进制 36 | 37 | @return 十进制字符串 38 | */ 39 | - (NSString *)hexToDecimal; 40 | /* 41 | 二进制转十进制 42 | 43 | @return 十进制字符串 44 | */ 45 | - (NSString *)binaryToDecimal; 46 | 47 | /** 48 | 十进制转二进制 49 | 50 | @return 二进制字符串 51 | */ 52 | - (NSString *)decimalToBinary; 53 | /** 54 | 时间戳转标准时间 55 | 56 | @return 标准时间 YYYY-MM-dd HH:mm:ss 57 | */ 58 | - (NSString *)timestampToStandardtime; 59 | 60 | /** 61 | 时间戳转标准时间 62 | 63 | @return 标准时间数组 @[YYYY-MM-dd, HH:mm:ss] 64 | */ 65 | - (NSArray *)timestampToStandardtimes; 66 | @end 67 | -------------------------------------------------------------------------------- /CGBaseProject/SwitchData/NSString+SwitchData.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+SwitchData.m 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import "NSString+SwitchData.h" 10 | 11 | @implementation NSString (SwitchData) 12 | /** 13 | 带子节的string转为NSData 14 | 15 | @return NSData类型 16 | */ 17 | -(NSData*) convertBytesStringToData { 18 | NSMutableData* data = [NSMutableData data]; 19 | int idx; 20 | for (idx = 0; idx+2 <= self.length; idx+=2) { 21 | NSRange range = NSMakeRange(idx, 2); 22 | NSString* hexStr = [self substringWithRange:range]; 23 | NSScanner* scanner = [NSScanner scannerWithString:hexStr]; 24 | unsigned int intValue; 25 | [scanner scanHexInt:&intValue]; 26 | [data appendBytes:&intValue length:1]; 27 | } 28 | return data; 29 | } 30 | /** 31 | 十进制转十六进制 32 | 33 | @return 十六进制字符串 34 | */ 35 | - (NSString *)decimalToHex { 36 | long long int tmpid = [self intValue]; 37 | NSString *nLetterValue; 38 | NSString *str = @""; 39 | long long int ttmpig; 40 | for (int i = 0; i < 9; i++) { 41 | ttmpig = tmpid % 16; 42 | tmpid = tmpid / 16; 43 | switch (ttmpig) { 44 | case 10: 45 | nLetterValue = @"A"; 46 | break; 47 | case 11: 48 | nLetterValue = @"B"; 49 | break; 50 | case 12: 51 | nLetterValue = @"C"; 52 | break; 53 | case 13: 54 | nLetterValue = @"D"; 55 | break; 56 | case 14: 57 | nLetterValue = @"E"; 58 | break; 59 | case 15: 60 | nLetterValue = @"F"; 61 | break; 62 | default: 63 | nLetterValue = [[NSString alloc]initWithFormat:@"%lli", ttmpig]; 64 | } 65 | str = [nLetterValue stringByAppendingString:str]; 66 | if (tmpid == 0) { 67 | break; 68 | } 69 | } 70 | return str; 71 | } 72 | /** 73 | 十进制转十六进制 74 | length 总长度,不足补0 75 | @return 十六进制字符串 76 | */ 77 | - (NSString *)decimalToHexWithLength:(NSUInteger)length{ 78 | NSString* subString = [self decimalToHex]; 79 | NSUInteger moreL = length - subString.length; 80 | if (moreL>0) { 81 | for (int i = 0; i= 0; i --) { 135 | result = [result stringByAppendingFormat:@"%@", 136 | [prepare substringWithRange:NSMakeRange(i , 1)]]; 137 | } 138 | return [NSString stringWithFormat:@"%08d",[result intValue]]; 139 | } 140 | - (NSString *)timestampToStandardtime { 141 | NSTimeInterval secs = self.doubleValue; 142 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 143 | [formatter setTimeZone:[NSTimeZone timeZoneWithName:@"Asia/Shanghai"]]; 144 | [formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"]; 145 | NSDate *date = [NSDate dateWithTimeIntervalSince1970:secs]; 146 | return [formatter stringFromDate:date]; 147 | } 148 | 149 | - (NSArray *)timestampToStandardtimes { 150 | NSString *standardTime = [self timestampToStandardtime]; 151 | return [standardTime componentsSeparatedByString:@" "]; 152 | } 153 | @end 154 | -------------------------------------------------------------------------------- /CGBaseProject/SwitchData/SwitchHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwitchHeader.h 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #ifndef SwitchHeader_h 10 | #define SwitchHeader_h 11 | 12 | #import "NSData+SwitchData.h" 13 | #import "NSString+SwitchData.h" 14 | 15 | 16 | #endif /* SwitchHeader_h */ 17 | -------------------------------------------------------------------------------- /CGBaseProject/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CGBaseProject/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | #import "SwitchHeader.h" 13 | #import "FileHandleTool.h" 14 | #import 15 | 16 | @interface ViewController () 17 | 18 | @property (weak, nonatomic) IBOutlet UIImageView *resultImage; 19 | 20 | ///读取到的数据 21 | @property (strong, nonatomic) NSMutableData *readData; 22 | 23 | // 句柄工具 24 | @property (strong, nonatomic) FileHandleTool *fileTool; 25 | @end 26 | 27 | @implementation ViewController 28 | 29 | -(FileHandleTool *)fileTool{ 30 | if (!_fileTool) { 31 | //读取本地图片 32 | NSString *path= [[NSBundle mainBundle] pathForResource:@"ceshi" ofType:@"jpeg"]; 33 | self.fileTool = [[FileHandleTool alloc]init]; 34 | [self.fileTool creatReadLocalFileHandelName:path]; 35 | } 36 | return _fileTool; 37 | } 38 | 39 | -(NSMutableData *)readData{ 40 | if (!_readData) { 41 | _readData = [NSMutableData data]; 42 | 43 | } 44 | return _readData; 45 | } 46 | 47 | - (void)viewDidLoad { 48 | [super viewDidLoad]; 49 | // Do any additional setup after loading the view, typically from a nib. 50 | [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack]; 51 | 52 | 53 | 54 | } 55 | - (IBAction)readLocalData:(id)sender { 56 | 57 | [self readLocalData]; 58 | } 59 | 60 | -(void)readLocalData{ 61 | 62 | NSData* data = [self.fileTool readData]; 63 | [self.readData appendData:data]; 64 | if ((self.fileTool.totalPackage - self.fileTool.currentPackage)!=0) {//不是最后一次 65 | 66 | [self performSelector:@selector(readLocalData) withObject:nil afterDelay:0.5]; 67 | } 68 | } 69 | 70 | #pragma mark 拼接数据第一种 71 | - (IBAction)firstBtnClick:(UIButton *)sender { 72 | 73 | 74 | int value = (int)self.readData.length; 75 | 76 | //开始转换为4个字节 77 | Byte byteData[4] = {}; 78 | 79 | byteData[0] =(Byte)((value & 0xFF000000)>>24); 80 | 81 | byteData[1] =(Byte)((value & 0x00FF0000)>>16); 82 | 83 | byteData[2] =(Byte)((value & 0x0000FF00)>>8); 84 | 85 | byteData[3] =(Byte)((value & 0x000000FF)); 86 | //转换为4个字节 87 | 88 | //开始拼接 89 | Byte byte[] = {0x80,0x9B,byteData[0],byteData[1],byteData[2],byteData[3]}; 90 | //转为NSData 91 | NSData *temphead = [[NSData alloc]initWithBytes:byte length:6]; 92 | 93 | //拼接content 94 | NSMutableData *m_data = [[NSMutableData alloc] init]; 95 | [m_data appendData:temphead]; 96 | [m_data appendData:self.readData]; 97 | 98 | [self readData:m_data]; 99 | 100 | //输出 101 | NSLog(@"byteData:%hhu%hhu%hhu%hhu", byteData[0], byteData[1], byteData[2], byteData[3]); 102 | NSLog(@"byte[]:%s", byte); 103 | NSLog(@"temphead:%@", temphead); 104 | 105 | NSLog(@"m_data:%@", m_data); 106 | } 107 | #pragma mark 拼接数据第二种 108 | - (IBAction)secondBtnClick:(UIButton *)sender { 109 | 110 | int value = (int)self.readData.length; 111 | 112 | //将长度转为十进制string 113 | NSString* decimalString = [NSString stringWithFormat:@"%d",value]; 114 | //将十进制string转为十六进制并保证长度为8 115 | NSString* firstHex = [decimalString decimalToHexWithLength:8]; 116 | //将十六进制拼接上809B 117 | NSString* hexString = [NSString stringWithFormat:@"809B%@",firstHex]; 118 | //将十六进制转为NSData 119 | NSData* temphead = [hexString convertBytesStringToData]; 120 | 121 | //拼接content 122 | NSMutableData *m_data = [[NSMutableData alloc] init]; 123 | [m_data appendData:temphead]; 124 | [m_data appendData:self.readData]; 125 | 126 | [self readData:m_data]; 127 | 128 | 129 | //输出 130 | NSLog(@"decimalString:%@", decimalString); 131 | NSLog(@"firstHex:%@", firstHex); 132 | NSLog(@"hexString:%@", hexString); 133 | NSLog(@"temphead:%@", temphead); 134 | NSLog(@"m_data:%@", m_data); 135 | } 136 | 137 | #pragma mark 解析数据 138 | -(void)readData:(NSData*)_receiveData{ 139 | //1 获取头部数据 140 | NSData *head = [_receiveData subdataWithRange:NSMakeRange(0, 6)];//取得头部数据 141 | NSData *lengthData = [head subdataWithRange:NSMakeRange(2, 4)];//取得长度数据 142 | //2 将4个字节的数据还原为content的长度 143 | //2.1 将lengthData转为16进制数 144 | NSString* hexString = [lengthData convertDataToHexStr]; 145 | //2.2 将16进制数转为10进制 146 | NSInteger length = [[hexString hexToDecimal]integerValue];//得出内容长度 147 | 148 | NSInteger complateDataLength = length + 6;//算出一个包完整的长度(内容长度+头长度) 149 | if (_receiveData.length >= complateDataLength)//如果缓存中数据够一个整包的长度 150 | { 151 | NSData *data = [_receiveData subdataWithRange:NSMakeRange(6, length)];//截取一个包的长度(处理粘包) 152 | 153 | [self.resultImage setImage:[UIImage imageWithData:data]]; 154 | } 155 | 156 | } 157 | #pragma mark 清除图片 158 | - (IBAction)clearImage:(UIButton *)sender { 159 | 160 | [self.resultImage setImage:nil]; 161 | self.fileTool = nil; 162 | self.readData = nil; 163 | } 164 | 165 | - (void)didReceiveMemoryWarning { 166 | [super didReceiveMemoryWarning]; 167 | // Dispose of any resources that can be recreated. 168 | } 169 | 170 | 171 | @end 172 | -------------------------------------------------------------------------------- /CGBaseProject/ceshi.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/CGBaseProject/ceshi.jpeg -------------------------------------------------------------------------------- /CGBaseProject/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CGBaseProject 4 | // 5 | // Created by chrise on 2018/3/15. 6 | // Copyright © 2018年 chrise. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'CGBaseProject' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | pod 'SVProgressHUD', '~> 2.2.5' 8 | # Pods for CGBaseProject 9 | 10 | end 11 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SVProgressHUD (2.2.5) 3 | 4 | DEPENDENCIES: 5 | - SVProgressHUD (~> 2.2.5) 6 | 7 | SPEC CHECKSUMS: 8 | SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 9 | 10 | PODFILE CHECKSUM: 641cd48618b82dfaaba240ae17995b2472bdcbf7 11 | 12 | COCOAPODS: 1.4.0 13 | -------------------------------------------------------------------------------- /Pods/Headers/Private/SVProgressHUD/SVIndefiniteAnimatedView.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SVProgressHUD/SVProgressAnimatedView.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SVProgressHUD/SVProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h -------------------------------------------------------------------------------- /Pods/Headers/Private/SVProgressHUD/SVRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SVProgressHUD/SVIndefiniteAnimatedView.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SVProgressHUD/SVProgressAnimatedView.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SVProgressHUD/SVProgressHUD.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h -------------------------------------------------------------------------------- /Pods/Headers/Public/SVProgressHUD/SVRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | ../../../SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SVProgressHUD (2.2.5) 3 | 4 | DEPENDENCIES: 5 | - SVProgressHUD (~> 2.2.5) 6 | 7 | SPEC CHECKSUMS: 8 | SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 9 | 10 | PODFILE CHECKSUM: 641cd48618b82dfaaba240ae17995b2472bdcbf7 11 | 12 | COCOAPODS: 1.4.0 13 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 22BC35AE417FE7EAB1E8B2E64245BE94 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54F9A0E952988935C32EDDB1429D7133 /* Foundation.framework */; }; 11 | 298A5D4C3B6FDE381C6BB806B633D2D3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC2770B482BFE91273C8560623F1422C /* QuartzCore.framework */; }; 12 | 333C209C69EF8D061581720536600DDA /* SVProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = DBAD9287DEE246626CE463AB766658E4 /* SVProgressHUD.h */; settings = {ATTRIBUTES = (Project, ); }; }; 13 | 55897A2A83F1EE9ED41E05B80F6D2D7A /* SVIndefiniteAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = DD6F6957AD861C2D16D4AAF6524973A8 /* SVIndefiniteAnimatedView.h */; settings = {ATTRIBUTES = (Project, ); }; }; 14 | 7A31F2DA85BDAE02A2211210667B4706 /* SVProgressHUD-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A6073EEDABEA90F4218E48202444AB6 /* SVProgressHUD-dummy.m */; }; 15 | 8206E2D47454419AB13BFF989B618CE0 /* SVProgressAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = C447657581C0A5726D1B490667A418D4 /* SVProgressAnimatedView.h */; settings = {ATTRIBUTES = (Project, ); }; }; 16 | 90419AB55941261EA2F3577950B0EF7E /* Pods-CGBaseProject-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B48661977099BE1D61A1A202DDD6DB02 /* Pods-CGBaseProject-dummy.m */; }; 17 | 97A3AAAE108012558AE87F0C6A8D2F13 /* SVIndefiniteAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 64C68F19C7FDB89739A12A754AC192B9 /* SVIndefiniteAnimatedView.m */; }; 18 | C8C10EB1069E57387F6207F2E623B3C6 /* SVProgressAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C80D8A3D824F9A8BECF1041F91261A4 /* SVProgressAnimatedView.m */; }; 19 | CDFFBE2963CF8D5DB309C00D5D5C3536 /* SVRadialGradientLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 68F7D46BED1E968333C3A6BF1D08EF35 /* SVRadialGradientLayer.h */; settings = {ATTRIBUTES = (Project, ); }; }; 20 | EA6F683D1D702CC6060B74A792DEE8EF /* SVProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D3444AE0273523AC57BAC6A7EBE004B0 /* SVProgressHUD.m */; }; 21 | F3D0EA241E68F0CAF6E02F2D094A0434 /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = E6A374AB1310EA4B32513CEB3F350671 /* SVRadialGradientLayer.m */; }; 22 | F6E4254F86529CEC547B2E877769FC4A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54F9A0E952988935C32EDDB1429D7133 /* Foundation.framework */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 3497734E15E1D0755B8103158B9D1457 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = E4E70AEC57AB3D327AC48FA42C73191B; 31 | remoteInfo = SVProgressHUD; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 2D619B9ACB8981FDEB8B6C16926AD452 /* SVProgressHUD.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = SVProgressHUD.bundle; path = SVProgressHUD/SVProgressHUD.bundle; sourceTree = ""; }; 37 | 54F9A0E952988935C32EDDB1429D7133 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 38 | 64C68F19C7FDB89739A12A754AC192B9 /* SVIndefiniteAnimatedView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVIndefiniteAnimatedView.m; path = SVProgressHUD/SVIndefiniteAnimatedView.m; sourceTree = ""; }; 39 | 68F7D46BED1E968333C3A6BF1D08EF35 /* SVRadialGradientLayer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVRadialGradientLayer.h; path = SVProgressHUD/SVRadialGradientLayer.h; sourceTree = ""; }; 40 | 6A6073EEDABEA90F4218E48202444AB6 /* SVProgressHUD-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SVProgressHUD-dummy.m"; sourceTree = ""; }; 41 | 7639CFC0D8B53A181379B3D35CF6B409 /* SVProgressHUD.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SVProgressHUD.xcconfig; sourceTree = ""; }; 42 | 83219C20C818F61FF84F7434D5E1A8E1 /* Pods-CGBaseProject-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CGBaseProject-resources.sh"; sourceTree = ""; }; 43 | 86E3DC48E40F8C3C553801CB0080D74D /* SVProgressHUD-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SVProgressHUD-prefix.pch"; sourceTree = ""; }; 44 | 8B4BA307B08F587A46E5162F775353F0 /* Pods-CGBaseProject-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-CGBaseProject-acknowledgements.plist"; sourceTree = ""; }; 45 | 92C9E5D53163B792B639C20A0B86513E /* Pods-CGBaseProject.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CGBaseProject.release.xcconfig"; sourceTree = ""; }; 46 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 47 | 98F773DEF87BB24B3E59A1B499DB3913 /* libSVProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libSVProgressHUD.a; path = libSVProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 9B46F1DBF7B8DCA14950F84255127945 /* Pods-CGBaseProject-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-CGBaseProject-frameworks.sh"; sourceTree = ""; }; 49 | 9C80D8A3D824F9A8BECF1041F91261A4 /* SVProgressAnimatedView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVProgressAnimatedView.m; path = SVProgressHUD/SVProgressAnimatedView.m; sourceTree = ""; }; 50 | B39763FA840936DB748326FAC1E9DB51 /* Pods-CGBaseProject.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-CGBaseProject.debug.xcconfig"; sourceTree = ""; }; 51 | B48661977099BE1D61A1A202DDD6DB02 /* Pods-CGBaseProject-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-CGBaseProject-dummy.m"; sourceTree = ""; }; 52 | C447657581C0A5726D1B490667A418D4 /* SVProgressAnimatedView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVProgressAnimatedView.h; path = SVProgressHUD/SVProgressAnimatedView.h; sourceTree = ""; }; 53 | C933F4C1CD4C47DFCA167250DDC0C88F /* Pods-CGBaseProject-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-CGBaseProject-acknowledgements.markdown"; sourceTree = ""; }; 54 | D3444AE0273523AC57BAC6A7EBE004B0 /* SVProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVProgressHUD.m; path = SVProgressHUD/SVProgressHUD.m; sourceTree = ""; }; 55 | D88129E365BD3AC4211E5307BBFAFC52 /* libPods-CGBaseProject.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-CGBaseProject.a"; path = "libPods-CGBaseProject.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | DBAD9287DEE246626CE463AB766658E4 /* SVProgressHUD.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVProgressHUD.h; path = SVProgressHUD/SVProgressHUD.h; sourceTree = ""; }; 57 | DD6F6957AD861C2D16D4AAF6524973A8 /* SVIndefiniteAnimatedView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SVIndefiniteAnimatedView.h; path = SVProgressHUD/SVIndefiniteAnimatedView.h; sourceTree = ""; }; 58 | E6A374AB1310EA4B32513CEB3F350671 /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SVRadialGradientLayer.m; path = SVProgressHUD/SVRadialGradientLayer.m; sourceTree = ""; }; 59 | FC2770B482BFE91273C8560623F1422C /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 6439BFECA69BF6492143B1DB85991BB7 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | F6E4254F86529CEC547B2E877769FC4A /* Foundation.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | C619FE0D238DA068C1F415EDC5AAE830 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 22BC35AE417FE7EAB1E8B2E64245BE94 /* Foundation.framework in Frameworks */, 76 | 298A5D4C3B6FDE381C6BB806B633D2D3 /* QuartzCore.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 035CB6C836B78EB37C4E6C442FF8BB1E /* Resources */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 2D619B9ACB8981FDEB8B6C16926AD452 /* SVProgressHUD.bundle */, 87 | ); 88 | name = Resources; 89 | sourceTree = ""; 90 | }; 91 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 978007DCB56F415BE390E0F949D4D4E5 /* iOS */, 95 | ); 96 | name = Frameworks; 97 | sourceTree = ""; 98 | }; 99 | 72FDCFBC08DC700F3200913B967EF686 /* Targets Support Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | FC77D3FA9D6B6059666A369F7F621440 /* Pods-CGBaseProject */, 103 | ); 104 | name = "Targets Support Files"; 105 | sourceTree = ""; 106 | }; 107 | 74588D48F629C3D7E6B7E12AB83072D6 /* Pods */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 95EB61328BDA1070876281302DF94ACF /* SVProgressHUD */, 111 | ); 112 | name = Pods; 113 | sourceTree = ""; 114 | }; 115 | 7DB346D0F39D3F0E887471402A8071AB = { 116 | isa = PBXGroup; 117 | children = ( 118 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 119 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, 120 | 74588D48F629C3D7E6B7E12AB83072D6 /* Pods */, 121 | 8A9B5A3A113F7B60AB9D8715EAC1A879 /* Products */, 122 | 72FDCFBC08DC700F3200913B967EF686 /* Targets Support Files */, 123 | ); 124 | sourceTree = ""; 125 | }; 126 | 8A9B5A3A113F7B60AB9D8715EAC1A879 /* Products */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | D88129E365BD3AC4211E5307BBFAFC52 /* libPods-CGBaseProject.a */, 130 | 98F773DEF87BB24B3E59A1B499DB3913 /* libSVProgressHUD.a */, 131 | ); 132 | name = Products; 133 | sourceTree = ""; 134 | }; 135 | 95EB61328BDA1070876281302DF94ACF /* SVProgressHUD */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | DD6F6957AD861C2D16D4AAF6524973A8 /* SVIndefiniteAnimatedView.h */, 139 | 64C68F19C7FDB89739A12A754AC192B9 /* SVIndefiniteAnimatedView.m */, 140 | C447657581C0A5726D1B490667A418D4 /* SVProgressAnimatedView.h */, 141 | 9C80D8A3D824F9A8BECF1041F91261A4 /* SVProgressAnimatedView.m */, 142 | DBAD9287DEE246626CE463AB766658E4 /* SVProgressHUD.h */, 143 | D3444AE0273523AC57BAC6A7EBE004B0 /* SVProgressHUD.m */, 144 | 68F7D46BED1E968333C3A6BF1D08EF35 /* SVRadialGradientLayer.h */, 145 | E6A374AB1310EA4B32513CEB3F350671 /* SVRadialGradientLayer.m */, 146 | 035CB6C836B78EB37C4E6C442FF8BB1E /* Resources */, 147 | BDE1D145F4A334224EB232EECAD63B61 /* Support Files */, 148 | ); 149 | name = SVProgressHUD; 150 | path = SVProgressHUD; 151 | sourceTree = ""; 152 | }; 153 | 978007DCB56F415BE390E0F949D4D4E5 /* iOS */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 54F9A0E952988935C32EDDB1429D7133 /* Foundation.framework */, 157 | FC2770B482BFE91273C8560623F1422C /* QuartzCore.framework */, 158 | ); 159 | name = iOS; 160 | sourceTree = ""; 161 | }; 162 | BDE1D145F4A334224EB232EECAD63B61 /* Support Files */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 7639CFC0D8B53A181379B3D35CF6B409 /* SVProgressHUD.xcconfig */, 166 | 6A6073EEDABEA90F4218E48202444AB6 /* SVProgressHUD-dummy.m */, 167 | 86E3DC48E40F8C3C553801CB0080D74D /* SVProgressHUD-prefix.pch */, 168 | ); 169 | name = "Support Files"; 170 | path = "../Target Support Files/SVProgressHUD"; 171 | sourceTree = ""; 172 | }; 173 | FC77D3FA9D6B6059666A369F7F621440 /* Pods-CGBaseProject */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | C933F4C1CD4C47DFCA167250DDC0C88F /* Pods-CGBaseProject-acknowledgements.markdown */, 177 | 8B4BA307B08F587A46E5162F775353F0 /* Pods-CGBaseProject-acknowledgements.plist */, 178 | B48661977099BE1D61A1A202DDD6DB02 /* Pods-CGBaseProject-dummy.m */, 179 | 9B46F1DBF7B8DCA14950F84255127945 /* Pods-CGBaseProject-frameworks.sh */, 180 | 83219C20C818F61FF84F7434D5E1A8E1 /* Pods-CGBaseProject-resources.sh */, 181 | B39763FA840936DB748326FAC1E9DB51 /* Pods-CGBaseProject.debug.xcconfig */, 182 | 92C9E5D53163B792B639C20A0B86513E /* Pods-CGBaseProject.release.xcconfig */, 183 | ); 184 | name = "Pods-CGBaseProject"; 185 | path = "Target Support Files/Pods-CGBaseProject"; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXGroup section */ 189 | 190 | /* Begin PBXHeadersBuildPhase section */ 191 | F246E8F9D7F0637BDFED709B9CC89557 /* Headers */ = { 192 | isa = PBXHeadersBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | 55897A2A83F1EE9ED41E05B80F6D2D7A /* SVIndefiniteAnimatedView.h in Headers */, 196 | 8206E2D47454419AB13BFF989B618CE0 /* SVProgressAnimatedView.h in Headers */, 197 | 333C209C69EF8D061581720536600DDA /* SVProgressHUD.h in Headers */, 198 | CDFFBE2963CF8D5DB309C00D5D5C3536 /* SVRadialGradientLayer.h in Headers */, 199 | ); 200 | runOnlyForDeploymentPostprocessing = 0; 201 | }; 202 | /* End PBXHeadersBuildPhase section */ 203 | 204 | /* Begin PBXNativeTarget section */ 205 | E14CECC5270D2402079F71109A489DBE /* Pods-CGBaseProject */ = { 206 | isa = PBXNativeTarget; 207 | buildConfigurationList = 2B3FAA45CF90AF3F6995EB7B103BE53D /* Build configuration list for PBXNativeTarget "Pods-CGBaseProject" */; 208 | buildPhases = ( 209 | A01159FFC939087423832B7777D7A422 /* Sources */, 210 | 6439BFECA69BF6492143B1DB85991BB7 /* Frameworks */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | F606BCA6AD13EBB4F2B0713D0D0722CA /* PBXTargetDependency */, 216 | ); 217 | name = "Pods-CGBaseProject"; 218 | productName = "Pods-CGBaseProject"; 219 | productReference = D88129E365BD3AC4211E5307BBFAFC52 /* libPods-CGBaseProject.a */; 220 | productType = "com.apple.product-type.library.static"; 221 | }; 222 | E4E70AEC57AB3D327AC48FA42C73191B /* SVProgressHUD */ = { 223 | isa = PBXNativeTarget; 224 | buildConfigurationList = EBCD85E639D554E9D334444DBD5DECAB /* Build configuration list for PBXNativeTarget "SVProgressHUD" */; 225 | buildPhases = ( 226 | A1FB0EFA396BE6CF1DBBDFA98E7911C1 /* Sources */, 227 | C619FE0D238DA068C1F415EDC5AAE830 /* Frameworks */, 228 | F246E8F9D7F0637BDFED709B9CC89557 /* Headers */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | ); 234 | name = SVProgressHUD; 235 | productName = SVProgressHUD; 236 | productReference = 98F773DEF87BB24B3E59A1B499DB3913 /* libSVProgressHUD.a */; 237 | productType = "com.apple.product-type.library.static"; 238 | }; 239 | /* End PBXNativeTarget section */ 240 | 241 | /* Begin PBXProject section */ 242 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 243 | isa = PBXProject; 244 | attributes = { 245 | LastSwiftUpdateCheck = 0930; 246 | LastUpgradeCheck = 0930; 247 | }; 248 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 249 | compatibilityVersion = "Xcode 3.2"; 250 | developmentRegion = English; 251 | hasScannedForEncodings = 0; 252 | knownRegions = ( 253 | en, 254 | ); 255 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 256 | productRefGroup = 8A9B5A3A113F7B60AB9D8715EAC1A879 /* Products */; 257 | projectDirPath = ""; 258 | projectRoot = ""; 259 | targets = ( 260 | E14CECC5270D2402079F71109A489DBE /* Pods-CGBaseProject */, 261 | E4E70AEC57AB3D327AC48FA42C73191B /* SVProgressHUD */, 262 | ); 263 | }; 264 | /* End PBXProject section */ 265 | 266 | /* Begin PBXSourcesBuildPhase section */ 267 | A01159FFC939087423832B7777D7A422 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | 90419AB55941261EA2F3577950B0EF7E /* Pods-CGBaseProject-dummy.m in Sources */, 272 | ); 273 | runOnlyForDeploymentPostprocessing = 0; 274 | }; 275 | A1FB0EFA396BE6CF1DBBDFA98E7911C1 /* Sources */ = { 276 | isa = PBXSourcesBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | 97A3AAAE108012558AE87F0C6A8D2F13 /* SVIndefiniteAnimatedView.m in Sources */, 280 | C8C10EB1069E57387F6207F2E623B3C6 /* SVProgressAnimatedView.m in Sources */, 281 | 7A31F2DA85BDAE02A2211210667B4706 /* SVProgressHUD-dummy.m in Sources */, 282 | EA6F683D1D702CC6060B74A792DEE8EF /* SVProgressHUD.m in Sources */, 283 | F3D0EA241E68F0CAF6E02F2D094A0434 /* SVRadialGradientLayer.m in Sources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXSourcesBuildPhase section */ 288 | 289 | /* Begin PBXTargetDependency section */ 290 | F606BCA6AD13EBB4F2B0713D0D0722CA /* PBXTargetDependency */ = { 291 | isa = PBXTargetDependency; 292 | name = SVProgressHUD; 293 | target = E4E70AEC57AB3D327AC48FA42C73191B /* SVProgressHUD */; 294 | targetProxy = 3497734E15E1D0755B8103158B9D1457 /* PBXContainerItemProxy */; 295 | }; 296 | /* End PBXTargetDependency section */ 297 | 298 | /* Begin XCBuildConfiguration section */ 299 | 0FD3EF00BF52715A8B2F2D4F83114E35 /* Debug */ = { 300 | isa = XCBuildConfiguration; 301 | baseConfigurationReference = B39763FA840936DB748326FAC1E9DB51 /* Pods-CGBaseProject.debug.xcconfig */; 302 | buildSettings = { 303 | CLANG_ENABLE_OBJC_WEAK = NO; 304 | CODE_SIGN_IDENTITY = "iPhone Developer"; 305 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 306 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 307 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 308 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 309 | MACH_O_TYPE = staticlib; 310 | OTHER_LDFLAGS = ""; 311 | OTHER_LIBTOOLFLAGS = ""; 312 | PODS_ROOT = "$(SRCROOT)"; 313 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 314 | SDKROOT = iphoneos; 315 | SKIP_INSTALL = YES; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 323A24856F1A4871A780301AF5C02A2A /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_ENABLE_OBJC_WEAK = YES; 331 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 332 | CLANG_WARN_BOOL_CONVERSION = YES; 333 | CLANG_WARN_COMMA = YES; 334 | CLANG_WARN_CONSTANT_CONVERSION = YES; 335 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 336 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 337 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 344 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 346 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 347 | CLANG_WARN_STRICT_PROTOTYPES = YES; 348 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 349 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 350 | CLANG_WARN_UNREACHABLE_CODE = YES; 351 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 352 | CODE_SIGNING_REQUIRED = NO; 353 | COPY_PHASE_STRIP = NO; 354 | DEBUG_INFORMATION_FORMAT = dwarf; 355 | ENABLE_STRICT_OBJC_MSGSEND = YES; 356 | ENABLE_TESTABILITY = YES; 357 | GCC_C_LANGUAGE_STANDARD = gnu11; 358 | GCC_DYNAMIC_NO_PIC = NO; 359 | GCC_NO_COMMON_BLOCKS = YES; 360 | GCC_OPTIMIZATION_LEVEL = 0; 361 | GCC_PREPROCESSOR_DEFINITIONS = ( 362 | "POD_CONFIGURATION_DEBUG=1", 363 | "DEBUG=1", 364 | "$(inherited)", 365 | ); 366 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 368 | GCC_WARN_UNDECLARED_SELECTOR = YES; 369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 370 | GCC_WARN_UNUSED_FUNCTION = YES; 371 | GCC_WARN_UNUSED_VARIABLE = YES; 372 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 373 | MTL_ENABLE_DEBUG_INFO = YES; 374 | ONLY_ACTIVE_ARCH = YES; 375 | PRODUCT_NAME = "$(TARGET_NAME)"; 376 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 377 | STRIP_INSTALLED_PRODUCT = NO; 378 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 379 | SYMROOT = "${SRCROOT}/../build"; 380 | }; 381 | name = Debug; 382 | }; 383 | 5AAB3A351DA1AF16579CE961C2B3A124 /* Debug */ = { 384 | isa = XCBuildConfiguration; 385 | baseConfigurationReference = 7639CFC0D8B53A181379B3D35CF6B409 /* SVProgressHUD.xcconfig */; 386 | buildSettings = { 387 | CODE_SIGN_IDENTITY = "iPhone Developer"; 388 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 390 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 391 | GCC_PREFIX_HEADER = "Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch"; 392 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 393 | OTHER_LDFLAGS = ""; 394 | OTHER_LIBTOOLFLAGS = ""; 395 | PRIVATE_HEADERS_FOLDER_PATH = ""; 396 | PUBLIC_HEADERS_FOLDER_PATH = ""; 397 | SDKROOT = iphoneos; 398 | SKIP_INSTALL = YES; 399 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 400 | TARGETED_DEVICE_FAMILY = "1,2"; 401 | }; 402 | name = Debug; 403 | }; 404 | 81275A733AA51B79170558C32F83FE1F /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | baseConfigurationReference = 92C9E5D53163B792B639C20A0B86513E /* Pods-CGBaseProject.release.xcconfig */; 407 | buildSettings = { 408 | CLANG_ENABLE_OBJC_WEAK = NO; 409 | CODE_SIGN_IDENTITY = "iPhone Developer"; 410 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 411 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 412 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 413 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 414 | MACH_O_TYPE = staticlib; 415 | OTHER_LDFLAGS = ""; 416 | OTHER_LIBTOOLFLAGS = ""; 417 | PODS_ROOT = "$(SRCROOT)"; 418 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 419 | SDKROOT = iphoneos; 420 | SKIP_INSTALL = YES; 421 | TARGETED_DEVICE_FAMILY = "1,2"; 422 | VALIDATE_PRODUCT = YES; 423 | }; 424 | name = Release; 425 | }; 426 | 8A743F3F45A3A409B82D232B42CCFB9E /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | baseConfigurationReference = 7639CFC0D8B53A181379B3D35CF6B409 /* SVProgressHUD.xcconfig */; 429 | buildSettings = { 430 | CODE_SIGN_IDENTITY = "iPhone Developer"; 431 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 432 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 433 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 434 | GCC_PREFIX_HEADER = "Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch"; 435 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 436 | OTHER_LDFLAGS = ""; 437 | OTHER_LIBTOOLFLAGS = ""; 438 | PRIVATE_HEADERS_FOLDER_PATH = ""; 439 | PUBLIC_HEADERS_FOLDER_PATH = ""; 440 | SDKROOT = iphoneos; 441 | SKIP_INSTALL = YES; 442 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 443 | TARGETED_DEVICE_FAMILY = "1,2"; 444 | VALIDATE_PRODUCT = YES; 445 | }; 446 | name = Release; 447 | }; 448 | CA33F186435244FD0FD5B7325332656C /* Release */ = { 449 | isa = XCBuildConfiguration; 450 | buildSettings = { 451 | ALWAYS_SEARCH_USER_PATHS = NO; 452 | CLANG_ANALYZER_NONNULL = YES; 453 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 454 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 455 | CLANG_CXX_LIBRARY = "libc++"; 456 | CLANG_ENABLE_MODULES = YES; 457 | CLANG_ENABLE_OBJC_ARC = YES; 458 | CLANG_ENABLE_OBJC_WEAK = YES; 459 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 460 | CLANG_WARN_BOOL_CONVERSION = YES; 461 | CLANG_WARN_COMMA = YES; 462 | CLANG_WARN_CONSTANT_CONVERSION = YES; 463 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 464 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 465 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 466 | CLANG_WARN_EMPTY_BODY = YES; 467 | CLANG_WARN_ENUM_CONVERSION = YES; 468 | CLANG_WARN_INFINITE_RECURSION = YES; 469 | CLANG_WARN_INT_CONVERSION = YES; 470 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 471 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 472 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 473 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 474 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 475 | CLANG_WARN_STRICT_PROTOTYPES = YES; 476 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 477 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 478 | CLANG_WARN_UNREACHABLE_CODE = YES; 479 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 480 | CODE_SIGNING_REQUIRED = NO; 481 | COPY_PHASE_STRIP = NO; 482 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 483 | ENABLE_NS_ASSERTIONS = NO; 484 | ENABLE_STRICT_OBJC_MSGSEND = YES; 485 | GCC_C_LANGUAGE_STANDARD = gnu11; 486 | GCC_NO_COMMON_BLOCKS = YES; 487 | GCC_PREPROCESSOR_DEFINITIONS = ( 488 | "POD_CONFIGURATION_RELEASE=1", 489 | "$(inherited)", 490 | ); 491 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 492 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 493 | GCC_WARN_UNDECLARED_SELECTOR = YES; 494 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 495 | GCC_WARN_UNUSED_FUNCTION = YES; 496 | GCC_WARN_UNUSED_VARIABLE = YES; 497 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 498 | MTL_ENABLE_DEBUG_INFO = NO; 499 | PRODUCT_NAME = "$(TARGET_NAME)"; 500 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 501 | STRIP_INSTALLED_PRODUCT = NO; 502 | SYMROOT = "${SRCROOT}/../build"; 503 | }; 504 | name = Release; 505 | }; 506 | /* End XCBuildConfiguration section */ 507 | 508 | /* Begin XCConfigurationList section */ 509 | 2B3FAA45CF90AF3F6995EB7B103BE53D /* Build configuration list for PBXNativeTarget "Pods-CGBaseProject" */ = { 510 | isa = XCConfigurationList; 511 | buildConfigurations = ( 512 | 0FD3EF00BF52715A8B2F2D4F83114E35 /* Debug */, 513 | 81275A733AA51B79170558C32F83FE1F /* Release */, 514 | ); 515 | defaultConfigurationIsVisible = 0; 516 | defaultConfigurationName = Release; 517 | }; 518 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 519 | isa = XCConfigurationList; 520 | buildConfigurations = ( 521 | 323A24856F1A4871A780301AF5C02A2A /* Debug */, 522 | CA33F186435244FD0FD5B7325332656C /* Release */, 523 | ); 524 | defaultConfigurationIsVisible = 0; 525 | defaultConfigurationName = Release; 526 | }; 527 | EBCD85E639D554E9D334444DBD5DECAB /* Build configuration list for PBXNativeTarget "SVProgressHUD" */ = { 528 | isa = XCConfigurationList; 529 | buildConfigurations = ( 530 | 5AAB3A351DA1AF16579CE961C2B3A124 /* Debug */, 531 | 8A743F3F45A3A409B82D232B42CCFB9E /* Release */, 532 | ); 533 | defaultConfigurationIsVisible = 0; 534 | defaultConfigurationName = Release; 535 | }; 536 | /* End XCConfigurationList section */ 537 | }; 538 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 539 | } 540 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/gongjunping.xcuserdatad/xcschemes/Pods-CGBaseProject.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/gongjunping.xcuserdatad/xcschemes/SVProgressHUD.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/gongjunping.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-CGBaseProject.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | SVProgressHUD.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 1 20 | 21 | 22 | SuppressBuildableAutocreation 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 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 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/README.md: -------------------------------------------------------------------------------- 1 | # SVProgressHUD 2 | 3 | ![Pod Version](https://img.shields.io/cocoapods/v/SVProgressHUD.svg?style=flat) 4 | ![Pod Platform](https://img.shields.io/cocoapods/p/SVProgressHUD.svg?style=flat) 5 | ![Pod License](https://img.shields.io/cocoapods/l/SVProgressHUD.svg?style=flat) 6 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-green.svg?style=flat)](https://github.com/Carthage/Carthage) 7 | [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-green.svg?style=flat)](https://cocoapods.org) 8 | 9 | `SVProgressHUD` is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS. 10 | 11 | ![SVProgressHUD](http://f.cl.ly/items/2G1F1Z0M0k0h2U3V1p39/SVProgressHUD.gif) 12 | 13 | ## Demo 14 | 15 | Try `SVProgressHUD` on [Appetize.io](https://appetize.io/app/p8r2cvy8kq74x7q7tjqf5gyatr). 16 | 17 | ## Installation 18 | 19 | ### From CocoaPods 20 | 21 | [CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like `SVProgressHUD` in your projects. First, add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html): 22 | 23 | ```ruby 24 | pod 'SVProgressHUD' 25 | ``` 26 | 27 | If you want to use the latest features of `SVProgressHUD` use normal external source dependencies. 28 | 29 | ```ruby 30 | pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git' 31 | ``` 32 | 33 | This pulls from the `master` branch directly. 34 | 35 | Second, install `SVProgressHUD` into your project: 36 | 37 | ```ruby 38 | pod install 39 | ``` 40 | 41 | ### Carthage 42 | 43 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate `SVProgressHUD` into your Xcode project using Carthage, specify it in your `Cartfile`: 44 | 45 | ```ogdl 46 | github "SVProgressHUD/SVProgressHUD" 47 | ``` 48 | 49 | Run `carthage bootstrap` to build the framework in your repository's Carthage directory. You can then include it in your target's `carthage copy-frameworks` build phase. For more information on this, please see [Carthage's documentation](https://github.com/carthage/carthage#if-youre-building-for-ios-tvos-or-watchos). 50 | 51 | ### Manually 52 | 53 | * Drag the `SVProgressHUD/SVProgressHUD` folder into your project. 54 | * Take care that `SVProgressHUD.bundle` is added to `Targets->Build Phases->Copy Bundle Resources`. 55 | * Add the **QuartzCore** framework to your project. 56 | 57 | ## Swift 58 | 59 | Even though `SVProgressHUD` is written in Objective-C, it can be used in Swift with no hassle. If you use [CocoaPods](http://cocoapods.org) add the following line to your [Podfile](http://guides.cocoapods.org/using/using-cocoapods.html): 60 | 61 | ```ruby 62 | use_frameworks! 63 | ``` 64 | 65 | If you added `SVProgressHUD` manually, just add a [bridging header](https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) file to your project with the `SVProgressHUD` header included. 66 | 67 | ## Usage 68 | 69 | (see sample Xcode project in `/Demo`) 70 | 71 | `SVProgressHUD` is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[SVProgressHUD method]`). 72 | 73 | **Use `SVProgressHUD` wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.** 74 | 75 | Using `SVProgressHUD` in your app will usually look as simple as this (using Grand Central Dispatch): 76 | 77 | ```objective-c 78 | [SVProgressHUD show]; 79 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 80 | // time-consuming task 81 | dispatch_async(dispatch_get_main_queue(), ^{ 82 | [SVProgressHUD dismiss]; 83 | }); 84 | }); 85 | ``` 86 | 87 | ### Showing the HUD 88 | 89 | You can show the status of indeterminate tasks using one of the following: 90 | 91 | ```objective-c 92 | + (void)show; 93 | + (void)showWithStatus:(NSString*)string; 94 | ``` 95 | 96 | If you'd like the HUD to reflect the progress of a task, use one of these: 97 | 98 | ```objective-c 99 | + (void)showProgress:(CGFloat)progress; 100 | + (void)showProgress:(CGFloat)progress status:(NSString*)status; 101 | ``` 102 | 103 | ### Dismissing the HUD 104 | 105 | The HUD can be dismissed using: 106 | 107 | ```objective-c 108 | + (void)dismiss; 109 | + (void)dismissWithDelay:(NSTimeInterval)delay; 110 | ``` 111 | 112 | If you'd like to stack HUDs, you can balance out every show call using: 113 | 114 | ``` 115 | + (void)popActivity; 116 | ``` 117 | 118 | The HUD will get dismissed once the popActivity calls will match the number of show calls. 119 | 120 | Or show a confirmation glyph before before getting dismissed a little bit later. The display time depends on `minimumDismissTimeInterval` and the length of the given string. 121 | 122 | ```objective-c 123 | + (void)showInfoWithStatus:(NSString*)string; 124 | + (void)showSuccessWithStatus:(NSString*)string; 125 | + (void)showErrorWithStatus:(NSString*)string; 126 | + (void)showImage:(UIImage*)image status:(NSString*)string; 127 | ``` 128 | 129 | ## Customization 130 | 131 | `SVProgressHUD` can be customized via the following methods: 132 | 133 | ```objective-c 134 | + (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight 135 | + (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone 136 | + (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat 137 | + (void)setContainerView:(UIView*)containerView; // default is window level 138 | + (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing 139 | + (void)setRingThickness:(CGFloat)width; // default is 2 pt 140 | + (void)setRingRadius:(CGFloat)radius; // default is 18 pt 141 | + (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt 142 | + (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt 143 | + (void)setBorderColor:(nonnull UIColor*)color; // default is nil 144 | + (void)setBorderWidth:(CGFloat)width; // default is 0 145 | + (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 146 | + (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom 147 | + (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom 148 | + (void)setBackgroundLayerColor:(UIColor*)color; // default is [UIColor colorWithWhite:0 alpha:0.4], only used for SVProgressHUDMaskTypeCustom 149 | + (void)setImageViewSize:(CGSize)size; // default is 28x28 pt 150 | + (void)setShouldTintImages:(BOOL)shouldTintImages; // default is YES 151 | + (void)setInfoImage:(UIImage*)image; // default is the bundled info image provided by Freepik 152 | + (void)setSuccessImage:(UIImage*)image; // default is bundled success image from Freepik 153 | + (void)setErrorImage:(UIImage*)image; // default is bundled error image from Freepik 154 | + (void)setViewForExtension:(UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set 155 | + (void)setGraceTimeInterval:(NSTimeInterval)interval; // default is 0 seconds 156 | + (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds 157 | + (void)setMaximumDismissTimeInterval:(NSTimeInterval)interval; // default is CGFLOAT_MAX 158 | + (void)setFadeInAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 159 | + (void)setFadeOutAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 160 | + (void)setMaxSupportedWindowLevel:(UIWindowLevel)windowLevel; // default is UIWindowLevelNormal 161 | + (void)setHapticsEnabled:(BOOL)hapticsEnabled; // default is NO 162 | ``` 163 | 164 | Additionally `SVProgressHUD` supports the `UIAppearance` protocol for most of the above methods. 165 | 166 | ### Hint 167 | 168 | As standard `SVProgressHUD` offers two preconfigured styles: 169 | 170 | * `SVProgressHUDStyleLight`: White background with black spinner and text 171 | * `SVProgressHUDStyleDark`: Black background with white spinner and text 172 | 173 | If you want to use custom colors use `setForegroundColor` and `setBackgroundColor:`. These implicitly set the HUD's style to `SVProgressHUDStyleCustom`. 174 | 175 | ## Haptic Feedback 176 | 177 | For users with newer devices (starting with the iPhone 7), `SVProgressHUD` can automatically trigger haptic feedback depending on which HUD is being displayed. The feedback maps as follows: 178 | 179 | * `showSuccessWithStatus:` <-> `UINotificationFeedbackTypeSuccess` 180 | * `showInfoWithStatus:` <-> `UINotificationFeedbackTypeWarning` 181 | * `showErrorWithStatus:` <-> `UINotificationFeedbackTypeError` 182 | 183 | To enable this functionality, use `setHapticsEnabled:`. 184 | 185 | Users with devices prior to iPhone 7 will have no change in functionality. 186 | 187 | ## Notifications 188 | 189 | `SVProgressHUD` posts four notifications via `NSNotificationCenter` in response to being shown/dismissed: 190 | * `SVProgressHUDWillAppearNotification` when the show animation starts 191 | * `SVProgressHUDDidAppearNotification` when the show animation completes 192 | * `SVProgressHUDWillDisappearNotification` when the dismiss animation starts 193 | * `SVProgressHUDDidDisappearNotification` when the dismiss animation completes 194 | 195 | Each notification passes a `userInfo` dictionary holding the HUD's status string (if any), retrievable via `SVProgressHUDStatusUserInfoKey`. 196 | 197 | `SVProgressHUD` also posts `SVProgressHUDDidReceiveTouchEventNotification` when users touch on the overall screen or `SVProgressHUDDidTouchDownInsideNotification` when a user touches on the HUD directly. For this notifications `userInfo` is not passed but the object parameter contains the `UIEvent` that related to the touch. 198 | 199 | ## App Extensions 200 | 201 | When using `SVProgressHUD` in an App Extension, `#define SV_APP_EXTENSIONS` to avoid using unavailable APIs. Additionally call `setViewForExtension:` from your extensions view controller with `self.view`. 202 | 203 | ## Contributing to this project 204 | 205 | If you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/SVProgressHUD/SVProgressHUD/issues/new). Please take a moment to 206 | review the guidelines written by [Nicolas Gallagher](https://github.com/necolas): 207 | 208 | * [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs) 209 | * [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features) 210 | * [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests) 211 | 212 | ## License 213 | 214 | `SVProgressHUD` is distributed under the terms and conditions of the [MIT license](https://github.com/SVProgressHUD/SVProgressHUD/blob/master/LICENSE.txt). The success, error and info icons are made by [Freepik](http://www.freepik.com) from [Flaticon](http://www.flaticon.com) and are licensed under [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/). 215 | 216 | ## Credits 217 | 218 | `SVProgressHUD` is brought to you by [Sam Vermette](http://samvermette.com), [Tobias Tiemerding](http://tiemerding.com) and [contributors to the project](https://github.com/SVProgressHUD/SVProgressHUD/contributors). If you're using `SVProgressHUD` in your project, attribution would be very appreciated. 219 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVIndefiniteAnimatedView.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Guillaume Campagna. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVIndefiniteAnimatedView : UIView 11 | 12 | @property (nonatomic, assign) CGFloat strokeThickness; 13 | @property (nonatomic, assign) CGFloat radius; 14 | @property (nonatomic, strong) UIColor *strokeColor; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVIndefiniteAnimatedView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVIndefiniteAnimatedView.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Guillaume Campagna. All rights reserved. 6 | // 7 | 8 | #import "SVIndefiniteAnimatedView.h" 9 | #import "SVProgressHUD.h" 10 | 11 | @interface SVIndefiniteAnimatedView () 12 | 13 | @property (nonatomic, strong) CAShapeLayer *indefiniteAnimatedLayer; 14 | 15 | @end 16 | 17 | @implementation SVIndefiniteAnimatedView 18 | 19 | - (void)willMoveToSuperview:(UIView*)newSuperview { 20 | if (newSuperview) { 21 | [self layoutAnimatedLayer]; 22 | } else { 23 | [_indefiniteAnimatedLayer removeFromSuperlayer]; 24 | _indefiniteAnimatedLayer = nil; 25 | } 26 | } 27 | 28 | - (void)layoutAnimatedLayer { 29 | CALayer *layer = self.indefiniteAnimatedLayer; 30 | [self.layer addSublayer:layer]; 31 | 32 | CGFloat widthDiff = CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds); 33 | CGFloat heightDiff = CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds); 34 | layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2 - widthDiff / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2 - heightDiff / 2); 35 | } 36 | 37 | - (CAShapeLayer*)indefiniteAnimatedLayer { 38 | if(!_indefiniteAnimatedLayer) { 39 | CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5); 40 | UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter radius:self.radius startAngle:(CGFloat) (M_PI*3/2) endAngle:(CGFloat) (M_PI/2+M_PI*5) clockwise:YES]; 41 | 42 | _indefiniteAnimatedLayer = [CAShapeLayer layer]; 43 | _indefiniteAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale]; 44 | _indefiniteAnimatedLayer.frame = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2); 45 | _indefiniteAnimatedLayer.fillColor = [UIColor clearColor].CGColor; 46 | _indefiniteAnimatedLayer.strokeColor = self.strokeColor.CGColor; 47 | _indefiniteAnimatedLayer.lineWidth = self.strokeThickness; 48 | _indefiniteAnimatedLayer.lineCap = kCALineCapRound; 49 | _indefiniteAnimatedLayer.lineJoin = kCALineJoinBevel; 50 | _indefiniteAnimatedLayer.path = smoothedPath.CGPath; 51 | 52 | CALayer *maskLayer = [CALayer layer]; 53 | 54 | NSBundle *bundle = [NSBundle bundleForClass:[SVProgressHUD class]]; 55 | NSURL *url = [bundle URLForResource:@"SVProgressHUD" withExtension:@"bundle"]; 56 | NSBundle *imageBundle = [NSBundle bundleWithURL:url]; 57 | 58 | NSString *path = [imageBundle pathForResource:@"angle-mask" ofType:@"png"]; 59 | 60 | maskLayer.contents = (__bridge id)[[UIImage imageWithContentsOfFile:path] CGImage]; 61 | maskLayer.frame = _indefiniteAnimatedLayer.bounds; 62 | _indefiniteAnimatedLayer.mask = maskLayer; 63 | 64 | NSTimeInterval animationDuration = 1; 65 | CAMediaTimingFunction *linearCurve = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 66 | 67 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; 68 | animation.fromValue = (id) 0; 69 | animation.toValue = @(M_PI*2); 70 | animation.duration = animationDuration; 71 | animation.timingFunction = linearCurve; 72 | animation.removedOnCompletion = NO; 73 | animation.repeatCount = INFINITY; 74 | animation.fillMode = kCAFillModeForwards; 75 | animation.autoreverses = NO; 76 | [_indefiniteAnimatedLayer.mask addAnimation:animation forKey:@"rotate"]; 77 | 78 | CAAnimationGroup *animationGroup = [CAAnimationGroup animation]; 79 | animationGroup.duration = animationDuration; 80 | animationGroup.repeatCount = INFINITY; 81 | animationGroup.removedOnCompletion = NO; 82 | animationGroup.timingFunction = linearCurve; 83 | 84 | CABasicAnimation *strokeStartAnimation = [CABasicAnimation animationWithKeyPath:@"strokeStart"]; 85 | strokeStartAnimation.fromValue = @0.015; 86 | strokeStartAnimation.toValue = @0.515; 87 | 88 | CABasicAnimation *strokeEndAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; 89 | strokeEndAnimation.fromValue = @0.485; 90 | strokeEndAnimation.toValue = @0.985; 91 | 92 | animationGroup.animations = @[strokeStartAnimation, strokeEndAnimation]; 93 | [_indefiniteAnimatedLayer addAnimation:animationGroup forKey:@"progress"]; 94 | 95 | } 96 | return _indefiniteAnimatedLayer; 97 | } 98 | 99 | - (void)setFrame:(CGRect)frame { 100 | if(!CGRectEqualToRect(frame, super.frame)) { 101 | [super setFrame:frame]; 102 | 103 | if(self.superview) { 104 | [self layoutAnimatedLayer]; 105 | } 106 | } 107 | 108 | } 109 | 110 | - (void)setRadius:(CGFloat)radius { 111 | if(radius != _radius) { 112 | _radius = radius; 113 | 114 | [_indefiniteAnimatedLayer removeFromSuperlayer]; 115 | _indefiniteAnimatedLayer = nil; 116 | 117 | if(self.superview) { 118 | [self layoutAnimatedLayer]; 119 | } 120 | } 121 | } 122 | 123 | - (void)setStrokeColor:(UIColor*)strokeColor { 124 | _strokeColor = strokeColor; 125 | _indefiniteAnimatedLayer.strokeColor = strokeColor.CGColor; 126 | } 127 | 128 | - (void)setStrokeThickness:(CGFloat)strokeThickness { 129 | _strokeThickness = strokeThickness; 130 | _indefiniteAnimatedLayer.lineWidth = _strokeThickness; 131 | } 132 | 133 | - (CGSize)sizeThatFits:(CGSize)size { 134 | return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2); 135 | } 136 | 137 | @end 138 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressAnimatedView.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2017-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVProgressAnimatedView : UIView 11 | 12 | @property (nonatomic, assign) CGFloat radius; 13 | @property (nonatomic, assign) CGFloat strokeThickness; 14 | @property (nonatomic, strong) UIColor *strokeColor; 15 | @property (nonatomic, assign) CGFloat strokeEnd; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressAnimatedView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressAnimatedView.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2017-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import "SVProgressAnimatedView.h" 9 | 10 | @interface SVProgressAnimatedView () 11 | 12 | @property (nonatomic, strong) CAShapeLayer *ringAnimatedLayer; 13 | 14 | @end 15 | 16 | @implementation SVProgressAnimatedView 17 | 18 | - (void)willMoveToSuperview:(UIView*)newSuperview { 19 | if (newSuperview) { 20 | [self layoutAnimatedLayer]; 21 | } else { 22 | [_ringAnimatedLayer removeFromSuperlayer]; 23 | _ringAnimatedLayer = nil; 24 | } 25 | } 26 | 27 | - (void)layoutAnimatedLayer { 28 | CALayer *layer = self.ringAnimatedLayer; 29 | [self.layer addSublayer:layer]; 30 | 31 | CGFloat widthDiff = CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds); 32 | CGFloat heightDiff = CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds); 33 | layer.position = CGPointMake(CGRectGetWidth(self.bounds) - CGRectGetWidth(layer.bounds) / 2 - widthDiff / 2, CGRectGetHeight(self.bounds) - CGRectGetHeight(layer.bounds) / 2 - heightDiff / 2); 34 | } 35 | 36 | - (CAShapeLayer*)ringAnimatedLayer { 37 | if(!_ringAnimatedLayer) { 38 | CGPoint arcCenter = CGPointMake(self.radius+self.strokeThickness/2+5, self.radius+self.strokeThickness/2+5); 39 | UIBezierPath* smoothedPath = [UIBezierPath bezierPathWithArcCenter:arcCenter radius:self.radius startAngle:(CGFloat)-M_PI_2 endAngle:(CGFloat) (M_PI + M_PI_2) clockwise:YES]; 40 | 41 | _ringAnimatedLayer = [CAShapeLayer layer]; 42 | _ringAnimatedLayer.contentsScale = [[UIScreen mainScreen] scale]; 43 | _ringAnimatedLayer.frame = CGRectMake(0.0f, 0.0f, arcCenter.x*2, arcCenter.y*2); 44 | _ringAnimatedLayer.fillColor = [UIColor clearColor].CGColor; 45 | _ringAnimatedLayer.strokeColor = self.strokeColor.CGColor; 46 | _ringAnimatedLayer.lineWidth = self.strokeThickness; 47 | _ringAnimatedLayer.lineCap = kCALineCapRound; 48 | _ringAnimatedLayer.lineJoin = kCALineJoinBevel; 49 | _ringAnimatedLayer.path = smoothedPath.CGPath; 50 | } 51 | return _ringAnimatedLayer; 52 | } 53 | 54 | - (void)setFrame:(CGRect)frame { 55 | if(!CGRectEqualToRect(frame, super.frame)) { 56 | [super setFrame:frame]; 57 | 58 | if(self.superview) { 59 | [self layoutAnimatedLayer]; 60 | } 61 | } 62 | } 63 | 64 | - (void)setRadius:(CGFloat)radius { 65 | if(radius != _radius) { 66 | _radius = radius; 67 | 68 | [_ringAnimatedLayer removeFromSuperlayer]; 69 | _ringAnimatedLayer = nil; 70 | 71 | if(self.superview) { 72 | [self layoutAnimatedLayer]; 73 | } 74 | } 75 | } 76 | 77 | - (void)setStrokeColor:(UIColor*)strokeColor { 78 | _strokeColor = strokeColor; 79 | _ringAnimatedLayer.strokeColor = strokeColor.CGColor; 80 | } 81 | 82 | - (void)setStrokeThickness:(CGFloat)strokeThickness { 83 | _strokeThickness = strokeThickness; 84 | _ringAnimatedLayer.lineWidth = _strokeThickness; 85 | } 86 | 87 | - (void)setStrokeEnd:(CGFloat)strokeEnd { 88 | _strokeEnd = strokeEnd; 89 | _ringAnimatedLayer.strokeEnd = _strokeEnd; 90 | } 91 | 92 | - (CGSize)sizeThatFits:(CGSize)size { 93 | return CGSizeMake((self.radius+self.strokeThickness/2+5)*2, (self.radius+self.strokeThickness/2+5)*2); 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@2x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/angle-mask@3x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@2x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/error@3x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@2x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/info@3x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@2x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chriseleee/CGBaseProject/6c4112a7b8f20c1ada2d038e940662abbd378b02/Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle/success@3x.png -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVProgressHUD.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVProgressHUD.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2011-2018 Sam Vermette and contributors. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | extern NSString * _Nonnull const SVProgressHUDDidReceiveTouchEventNotification; 12 | extern NSString * _Nonnull const SVProgressHUDDidTouchDownInsideNotification; 13 | extern NSString * _Nonnull const SVProgressHUDWillDisappearNotification; 14 | extern NSString * _Nonnull const SVProgressHUDDidDisappearNotification; 15 | extern NSString * _Nonnull const SVProgressHUDWillAppearNotification; 16 | extern NSString * _Nonnull const SVProgressHUDDidAppearNotification; 17 | 18 | extern NSString * _Nonnull const SVProgressHUDStatusUserInfoKey; 19 | 20 | typedef NS_ENUM(NSInteger, SVProgressHUDStyle) { 21 | SVProgressHUDStyleLight, // default style, white HUD with black text, HUD background will be blurred 22 | SVProgressHUDStyleDark, // black HUD and white text, HUD background will be blurred 23 | SVProgressHUDStyleCustom // uses the fore- and background color properties 24 | }; 25 | 26 | typedef NS_ENUM(NSUInteger, SVProgressHUDMaskType) { 27 | SVProgressHUDMaskTypeNone = 1, // default mask type, allow user interactions while HUD is displayed 28 | SVProgressHUDMaskTypeClear, // don't allow user interactions with background objects 29 | SVProgressHUDMaskTypeBlack, // don't allow user interactions with background objects and dim the UI in the back of the HUD (as seen in iOS 7 and above) 30 | SVProgressHUDMaskTypeGradient, // don't allow user interactions with background objects and dim the UI with a a-la UIAlertView background gradient (as seen in iOS 6) 31 | SVProgressHUDMaskTypeCustom // don't allow user interactions with background objects and dim the UI in the back of the HUD with a custom color 32 | }; 33 | 34 | typedef NS_ENUM(NSUInteger, SVProgressHUDAnimationType) { 35 | SVProgressHUDAnimationTypeFlat, // default animation type, custom flat animation (indefinite animated ring) 36 | SVProgressHUDAnimationTypeNative // iOS native UIActivityIndicatorView 37 | }; 38 | 39 | typedef void (^SVProgressHUDShowCompletion)(void); 40 | typedef void (^SVProgressHUDDismissCompletion)(void); 41 | 42 | @interface SVProgressHUD : UIView 43 | 44 | #pragma mark - Customization 45 | 46 | @property (assign, nonatomic) SVProgressHUDStyle defaultStyle UI_APPEARANCE_SELECTOR; // default is SVProgressHUDStyleLight 47 | @property (assign, nonatomic) SVProgressHUDMaskType defaultMaskType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDMaskTypeNone 48 | @property (assign, nonatomic) SVProgressHUDAnimationType defaultAnimationType UI_APPEARANCE_SELECTOR; // default is SVProgressHUDAnimationTypeFlat 49 | @property (strong, nonatomic, nullable) UIView *containerView; // if nil then use default window level 50 | @property (assign, nonatomic) CGSize minimumSize UI_APPEARANCE_SELECTOR; // default is CGSizeZero, can be used to avoid resizing for a larger message 51 | @property (assign, nonatomic) CGFloat ringThickness UI_APPEARANCE_SELECTOR; // default is 2 pt 52 | @property (assign, nonatomic) CGFloat ringRadius UI_APPEARANCE_SELECTOR; // default is 18 pt 53 | @property (assign, nonatomic) CGFloat ringNoTextRadius UI_APPEARANCE_SELECTOR; // default is 24 pt 54 | @property (assign, nonatomic) CGFloat cornerRadius UI_APPEARANCE_SELECTOR; // default is 14 pt 55 | @property (strong, nonatomic, nonnull) UIFont *font UI_APPEARANCE_SELECTOR; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 56 | @property (strong, nonatomic, nonnull) UIColor *backgroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor whiteColor] 57 | @property (strong, nonatomic, nonnull) UIColor *foregroundColor UI_APPEARANCE_SELECTOR; // default is [UIColor blackColor] 58 | @property (strong, nonatomic, nonnull) UIColor *backgroundLayerColor UI_APPEARANCE_SELECTOR;// default is [UIColor colorWithWhite:0 alpha:0.4] 59 | @property (assign, nonatomic) CGSize imageViewSize UI_APPEARANCE_SELECTOR; // default is 28x28 pt 60 | @property (assign, nonatomic) BOOL shouldTintImages UI_APPEARANCE_SELECTOR; // default is YES 61 | @property (strong, nonatomic, nonnull) UIImage *infoImage UI_APPEARANCE_SELECTOR; // default is the bundled info image provided by Freepik 62 | @property (strong, nonatomic, nonnull) UIImage *successImage UI_APPEARANCE_SELECTOR; // default is the bundled success image provided by Freepik 63 | @property (strong, nonatomic, nonnull) UIImage *errorImage UI_APPEARANCE_SELECTOR; // default is the bundled error image provided by Freepik 64 | @property (strong, nonatomic, nonnull) UIView *viewForExtension UI_APPEARANCE_SELECTOR; // default is nil, only used if #define SV_APP_EXTENSIONS is set 65 | @property (assign, nonatomic) NSTimeInterval graceTimeInterval; // default is 0 seconds 66 | @property (assign, nonatomic) NSTimeInterval minimumDismissTimeInterval; // default is 5.0 seconds 67 | @property (assign, nonatomic) NSTimeInterval maximumDismissTimeInterval; // default is CGFLOAT_MAX 68 | 69 | @property (assign, nonatomic) UIOffset offsetFromCenter UI_APPEARANCE_SELECTOR; // default is 0, 0 70 | 71 | @property (assign, nonatomic) NSTimeInterval fadeInAnimationDuration UI_APPEARANCE_SELECTOR; // default is 0.15 72 | @property (assign, nonatomic) NSTimeInterval fadeOutAnimationDuration UI_APPEARANCE_SELECTOR; // default is 0.15 73 | 74 | @property (assign, nonatomic) UIWindowLevel maxSupportedWindowLevel; // default is UIWindowLevelNormal 75 | 76 | @property (assign, nonatomic) BOOL hapticsEnabled; // default is NO 77 | 78 | + (void)setDefaultStyle:(SVProgressHUDStyle)style; // default is SVProgressHUDStyleLight 79 | + (void)setDefaultMaskType:(SVProgressHUDMaskType)maskType; // default is SVProgressHUDMaskTypeNone 80 | + (void)setDefaultAnimationType:(SVProgressHUDAnimationType)type; // default is SVProgressHUDAnimationTypeFlat 81 | + (void)setContainerView:(nullable UIView*)containerView; // default is window level 82 | + (void)setMinimumSize:(CGSize)minimumSize; // default is CGSizeZero, can be used to avoid resizing for a larger message 83 | + (void)setRingThickness:(CGFloat)ringThickness; // default is 2 pt 84 | + (void)setRingRadius:(CGFloat)radius; // default is 18 pt 85 | + (void)setRingNoTextRadius:(CGFloat)radius; // default is 24 pt 86 | + (void)setCornerRadius:(CGFloat)cornerRadius; // default is 14 pt 87 | + (void)setBorderColor:(nonnull UIColor*)color; // default is nil 88 | + (void)setBorderWidth:(CGFloat)width; // default is 0 89 | + (void)setFont:(nonnull UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] 90 | + (void)setForegroundColor:(nonnull UIColor*)color; // default is [UIColor blackColor], only used for SVProgressHUDStyleCustom 91 | + (void)setBackgroundColor:(nonnull UIColor*)color; // default is [UIColor whiteColor], only used for SVProgressHUDStyleCustom 92 | + (void)setBackgroundLayerColor:(nonnull UIColor*)color; // default is [UIColor colorWithWhite:0 alpha:0.5], only used for SVProgressHUDMaskTypeCustom 93 | + (void)setImageViewSize:(CGSize)size; // default is 28x28 pt 94 | + (void)setShouldTintImages:(BOOL)shouldTintImages; // default is YES 95 | + (void)setInfoImage:(nonnull UIImage*)image; // default is the bundled info image provided by Freepik 96 | + (void)setSuccessImage:(nonnull UIImage*)image; // default is the bundled success image provided by Freepik 97 | + (void)setErrorImage:(nonnull UIImage*)image; // default is the bundled error image provided by Freepik 98 | + (void)setViewForExtension:(nonnull UIView*)view; // default is nil, only used if #define SV_APP_EXTENSIONS is set 99 | + (void)setGraceTimeInterval:(NSTimeInterval)interval; // default is 0 seconds 100 | + (void)setMinimumDismissTimeInterval:(NSTimeInterval)interval; // default is 5.0 seconds 101 | + (void)setMaximumDismissTimeInterval:(NSTimeInterval)interval; // default is infinite 102 | + (void)setFadeInAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 103 | + (void)setFadeOutAnimationDuration:(NSTimeInterval)duration; // default is 0.15 seconds 104 | + (void)setMaxSupportedWindowLevel:(UIWindowLevel)windowLevel; // default is UIWindowLevelNormal 105 | + (void)setHapticsEnabled:(BOOL)hapticsEnabled; // default is NO 106 | 107 | #pragma mark - Show Methods 108 | 109 | + (void)show; 110 | + (void)showWithMaskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use show and setDefaultMaskType: instead."))); 111 | + (void)showWithStatus:(nullable NSString*)status; 112 | + (void)showWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showWithStatus: and setDefaultMaskType: instead."))); 113 | 114 | + (void)showProgress:(float)progress; 115 | + (void)showProgress:(float)progress maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress: and setDefaultMaskType: instead."))); 116 | + (void)showProgress:(float)progress status:(nullable NSString*)status; 117 | + (void)showProgress:(float)progress status:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showProgress:status: and setDefaultMaskType: instead."))); 118 | 119 | + (void)setStatus:(nullable NSString*)status; // change the HUD loading status while it's showing 120 | 121 | // stops the activity indicator, shows a glyph + status, and dismisses the HUD a little bit later 122 | + (void)showInfoWithStatus:(nullable NSString*)status; 123 | + (void)showInfoWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showInfoWithStatus: and setDefaultMaskType: instead."))); 124 | + (void)showSuccessWithStatus:(nullable NSString*)status; 125 | + (void)showSuccessWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showSuccessWithStatus: and setDefaultMaskType: instead."))); 126 | + (void)showErrorWithStatus:(nullable NSString*)status; 127 | + (void)showErrorWithStatus:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showErrorWithStatus: and setDefaultMaskType: instead."))); 128 | 129 | // shows a image + status, use white PNGs with the imageViewSize (default is 28x28 pt) 130 | + (void)showImage:(nonnull UIImage*)image status:(nullable NSString*)status; 131 | + (void)showImage:(nonnull UIImage*)image status:(nullable NSString*)status maskType:(SVProgressHUDMaskType)maskType __attribute__((deprecated("Use showImage:status: and setDefaultMaskType: instead."))); 132 | 133 | + (void)setOffsetFromCenter:(UIOffset)offset; 134 | + (void)resetOffsetFromCenter; 135 | 136 | + (void)popActivity; // decrease activity count, if activity count == 0 the HUD is dismissed 137 | + (void)dismiss; 138 | + (void)dismissWithCompletion:(nullable SVProgressHUDDismissCompletion)completion; 139 | + (void)dismissWithDelay:(NSTimeInterval)delay; 140 | + (void)dismissWithDelay:(NSTimeInterval)delay completion:(nullable SVProgressHUDDismissCompletion)completion; 141 | 142 | + (BOOL)isVisible; 143 | 144 | + (NSTimeInterval)displayDurationForString:(nullable NSString*)string; 145 | 146 | @end 147 | 148 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVRadialGradientLayer.h 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface SVRadialGradientLayer : CALayer 11 | 12 | @property (nonatomic) CGPoint gradientCenter; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/SVProgressHUD/SVProgressHUD/SVRadialGradientLayer.m: -------------------------------------------------------------------------------- 1 | // 2 | // SVRadialGradientLayer.m 3 | // SVProgressHUD, https://github.com/SVProgressHUD/SVProgressHUD 4 | // 5 | // Copyright (c) 2014-2018 Tobias Tiemerding. All rights reserved. 6 | // 7 | 8 | #import "SVRadialGradientLayer.h" 9 | 10 | @implementation SVRadialGradientLayer 11 | 12 | - (void)drawInContext:(CGContextRef)context { 13 | size_t locationsCount = 2; 14 | CGFloat locations[2] = {0.0f, 1.0f}; 15 | CGFloat colors[8] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.75f}; 16 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 17 | CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, locationsCount); 18 | CGColorSpaceRelease(colorSpace); 19 | 20 | float radius = MIN(self.bounds.size.width , self.bounds.size.height); 21 | CGContextDrawRadialGradient (context, gradient, self.gradientCenter, 0, self.gradientCenter, radius, kCGGradientDrawsAfterEndLocation); 22 | CGGradientRelease(gradient); 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SVProgressHUD 5 | 6 | MIT License 7 | 8 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2011-2018 Sam Vermette, Tobias Tiemerding and contributors. 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | SVProgressHUD 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CGBaseProject : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CGBaseProject 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | # Used as a return value for each invocation of `strip_invalid_archs` function. 10 | STRIP_BINARY_RETVAL=0 11 | 12 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 13 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 14 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 15 | 16 | # Copies and strips a vendored framework 17 | install_framework() 18 | { 19 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 20 | local source="${BUILT_PRODUCTS_DIR}/$1" 21 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 22 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 23 | elif [ -r "$1" ]; then 24 | local source="$1" 25 | fi 26 | 27 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 28 | 29 | if [ -L "${source}" ]; then 30 | echo "Symlinked..." 31 | source="$(readlink "${source}")" 32 | fi 33 | 34 | # Use filter instead of exclude so missing patterns don't throw errors. 35 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 36 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 37 | 38 | local basename 39 | basename="$(basename -s .framework "$1")" 40 | binary="${destination}/${basename}.framework/${basename}" 41 | if ! [ -r "$binary" ]; then 42 | binary="${destination}/${basename}" 43 | fi 44 | 45 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 46 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 47 | strip_invalid_archs "$binary" 48 | fi 49 | 50 | # Resign the code if required by the build settings to avoid unstable apps 51 | code_sign_if_enabled "${destination}/$(basename "$1")" 52 | 53 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 54 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 55 | local swift_runtime_libs 56 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 57 | for lib in $swift_runtime_libs; do 58 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 59 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 60 | code_sign_if_enabled "${destination}/${lib}" 61 | done 62 | fi 63 | } 64 | 65 | # Copies and strips a vendored dSYM 66 | install_dsym() { 67 | local source="$1" 68 | if [ -r "$source" ]; then 69 | # Copy the dSYM into a the targets temp dir. 70 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 71 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 72 | 73 | local basename 74 | basename="$(basename -s .framework.dSYM "$source")" 75 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 76 | 77 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 78 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 79 | strip_invalid_archs "$binary" 80 | fi 81 | 82 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 83 | # Move the stripped file into its final destination. 84 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 85 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 86 | else 87 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 88 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 89 | fi 90 | fi 91 | } 92 | 93 | # Signs a framework with the provided identity 94 | code_sign_if_enabled() { 95 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 96 | # Use the current code_sign_identitiy 97 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 98 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 99 | 100 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 101 | code_sign_cmd="$code_sign_cmd &" 102 | fi 103 | echo "$code_sign_cmd" 104 | eval "$code_sign_cmd" 105 | fi 106 | } 107 | 108 | # Strip invalid architectures 109 | strip_invalid_archs() { 110 | binary="$1" 111 | # Get architectures for current target binary 112 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 113 | # Intersect them with the architectures we are building for 114 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 115 | # If there are no archs supported by this binary then warn the user 116 | if [[ -z "$intersected_archs" ]]; then 117 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 118 | STRIP_BINARY_RETVAL=0 119 | return 120 | fi 121 | stripped="" 122 | for arch in $binary_archs; do 123 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 124 | # Strip non-valid architectures in-place 125 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 126 | stripped="$stripped $arch" 127 | fi 128 | done 129 | if [[ "$stripped" ]]; then 130 | echo "Stripped $binary of architectures:$stripped" 131 | fi 132 | STRIP_BINARY_RETVAL=1 133 | } 134 | 135 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 136 | wait 137 | fi 138 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_resource "${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_resource "${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle" 91 | fi 92 | 93 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 94 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 96 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 98 | fi 99 | rm -f "$RESOURCES_TO_COPY" 100 | 101 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 102 | then 103 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 104 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 105 | while read line; do 106 | if [[ $line != "${PODS_ROOT}*" ]]; then 107 | XCASSET_FILES+=("$line") 108 | fi 109 | done <<<"$OTHER_XCASSETS" 110 | 111 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 112 | fi 113 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SVProgressHUD" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SVProgressHUD" -framework "QuartzCore" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-CGBaseProject/Pods-CGBaseProject.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SVProgressHUD" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/SVProgressHUD" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SVProgressHUD" -framework "QuartzCore" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SVProgressHUD/SVProgressHUD-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SVProgressHUD : NSObject 3 | @end 4 | @implementation PodsDummy_SVProgressHUD 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SVProgressHUD/SVProgressHUD-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/SVProgressHUD/SVProgressHUD.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SVProgressHUD" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SVProgressHUD" 4 | OTHER_LDFLAGS = -framework "QuartzCore" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SVProgressHUD 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | --------------------------------------------------------------------------------