├── .gitignore ├── GMDCircleLoader.podspec ├── GMDCircleLoader.xcodeproj └── project.pbxproj ├── GMDCircleLoader ├── Classes │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── ViewController.h │ └── ViewController.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-568h@2x-1.png │ │ ├── Default-568h@2x.png │ │ ├── Default.png │ │ ├── Default@2x-1.png │ │ └── Default@2x.png └── Resources │ ├── Info.plist │ └── main.m ├── GMDCircleLoaderTests ├── GMDCircleLoaderTests.m └── Info.plist ├── README.md └── Vendor └── GMDCircleLoader ├── GMDCircleLoader.h └── GMDCircleLoader.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | build 3 | ._* 4 | *.DS_Store 5 | -------------------------------------------------------------------------------- /GMDCircleLoader.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint GMDCircleLoader.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "GMDCircleLoader" 19 | s.version = "0.0.1" 20 | s.summary = "GMDCircleLoader is a neat and easy to use loading view." 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | s.description = "GMDCircleLoader is a neat and easy to use loading view meant to replicate Apple’s progress loading view of an ongoing task." 28 | 29 | s.homepage = "https://github.com/gabemdev/GMDCircleLoader" 30 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 31 | 32 | 33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 34 | # 35 | # Licensing your code is important. See http://choosealicense.com for more info. 36 | # CocoaPods will detect a license file if there is a named LICENSE* 37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 38 | # 39 | 40 | s.license = { :type => "MIT", :file => "README.md" } 41 | 42 | 43 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 44 | # 45 | # Specify the authors of the library, with email addresses. Email addresses 46 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 47 | # accepts just a name if you'd rather not provide an email address. 48 | # 49 | # Specify a social_media_url where others can refer to, for example a twitter 50 | # profile URL. 51 | # 52 | 53 | s.author = { "Gabe Morales" => "gabemdev" } 54 | # Or just: s.author = "Guillermo Sáenz" 55 | # s.authors = { "Guillermo Sáenz" => "gsaenz@proatomicdev.com" } 56 | # s.social_media_url = "http://twitter.com/Guillermo Sáenz" 57 | 58 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 59 | # 60 | # If this Pod runs only on iOS or OS X, then specify the platform and 61 | # the deployment target. You can optionally include the target after the platform. 62 | # 63 | 64 | s.platform = :ios 65 | # s.platform = :ios, "5.0" 66 | 67 | # When using multiple platforms 68 | # s.ios.deployment_target = "5.0" 69 | # s.osx.deployment_target = "10.7" 70 | # s.watchos.deployment_target = "2.0" 71 | # s.tvos.deployment_target = "9.0" 72 | 73 | 74 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 75 | # 76 | # Specify the location from where the source should be retrieved. 77 | # Supports git, hg, bzr, svn and HTTP. 78 | # 79 | 80 | s.source = { :git => "https://github.com/gabemdev/GMDCircleLoader.git", :tag => "#{s.version}" } 81 | 82 | 83 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 84 | # 85 | # CocoaPods is smart about how it includes source code. For source files 86 | # giving a folder will include any swift, h, m, mm, c & cpp files. 87 | # For header files it will include any header in the folder. 88 | # Not including the public_header_files will make all headers public. 89 | # 90 | 91 | s.source_files = "Vendor/**/*.{h,m}" 92 | 93 | # s.public_header_files = "Classes/**/*.h" 94 | 95 | 96 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 97 | # 98 | # A list of resources included with the Pod. These are copied into the 99 | # target bundle with a build phase script. Anything else will be cleaned. 100 | # You can preserve files from being cleaned, please don't preserve 101 | # non-essential files like tests, examples and documentation. 102 | # 103 | 104 | # s.resource = "icon.png" 105 | # s.resources = "Resources/*.png" 106 | 107 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 108 | 109 | 110 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 111 | # 112 | # Link your library with frameworks, or libraries. Libraries do not include 113 | # the lib prefix of their name. 114 | # 115 | 116 | # s.framework = "SomeFramework" 117 | # s.frameworks = "SomeFramework", "AnotherFramework" 118 | 119 | # s.library = "iconv" 120 | # s.libraries = "iconv", "xml2" 121 | 122 | 123 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 124 | # 125 | # If your library depends on compiler flags you can set them in the xcconfig hash 126 | # where they will only apply to your library. If you depend on other Podspecs 127 | # you can include multiple dependencies to ensure it works. 128 | 129 | # s.requires_arc = true 130 | 131 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 132 | # s.dependency "JSONKit", "~> 1.4" 133 | 134 | end 135 | -------------------------------------------------------------------------------- /GMDCircleLoader.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6DE752431A2D4AE2007525F7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6DE752421A2D4AE2007525F7 /* Images.xcassets */; }; 11 | 6DE752521A2D4AE2007525F7 /* GMDCircleLoaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE752511A2D4AE2007525F7 /* GMDCircleLoaderTests.m */; }; 12 | 6DE752641A2D4E61007525F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE752611A2D4E61007525F7 /* AppDelegate.m */; }; 13 | 6DE752651A2D4E61007525F7 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE752631A2D4E61007525F7 /* ViewController.m */; }; 14 | 6DE752691A2D4E75007525F7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE752671A2D4E75007525F7 /* main.m */; }; 15 | 6DE7526C1A2D4EA5007525F7 /* GMDCircleLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DE7526B1A2D4EA5007525F7 /* GMDCircleLoader.m */; }; 16 | 6DE7527A1A2D5294007525F7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE752711A2D523B007525F7 /* CoreGraphics.framework */; }; 17 | 6DE7527B1A2D5294007525F7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE7526F1A2D5236007525F7 /* QuartzCore.framework */; }; 18 | 6DE7527C1A2D5294007525F7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE7526D1A2D522E007525F7 /* UIKit.framework */; }; 19 | 6DE7527D1A2D5294007525F7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DE752771A2D526E007525F7 /* Foundation.framework */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 6DE7524C1A2D4AE2007525F7 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 6DE7522A1A2D4AE2007525F7 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 6DE752311A2D4AE2007525F7; 28 | remoteInfo = GMDCircleLoader; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 6DE752321A2D4AE2007525F7 /* GMDCircleLoader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GMDCircleLoader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 6DE752421A2D4AE2007525F7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 35 | 6DE7524B1A2D4AE2007525F7 /* GMDCircleLoaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GMDCircleLoaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 6DE752501A2D4AE2007525F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 6DE752511A2D4AE2007525F7 /* GMDCircleLoaderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GMDCircleLoaderTests.m; sourceTree = ""; }; 38 | 6DE752601A2D4E61007525F7 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = ""; }; 39 | 6DE752611A2D4E61007525F7 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = ""; }; 40 | 6DE752621A2D4E61007525F7 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = Classes/ViewController.h; sourceTree = ""; }; 41 | 6DE752631A2D4E61007525F7 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = Classes/ViewController.m; sourceTree = ""; }; 42 | 6DE752661A2D4E75007525F7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; 43 | 6DE752671A2D4E75007525F7 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Resources/main.m; sourceTree = ""; }; 44 | 6DE7526A1A2D4EA5007525F7 /* GMDCircleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMDCircleLoader.h; path = Vendor/GMDCircleLoader/GMDCircleLoader.h; sourceTree = SOURCE_ROOT; }; 45 | 6DE7526B1A2D4EA5007525F7 /* GMDCircleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GMDCircleLoader.m; path = Vendor/GMDCircleLoader/GMDCircleLoader.m; sourceTree = SOURCE_ROOT; }; 46 | 6DE7526D1A2D522E007525F7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 47 | 6DE7526F1A2D5236007525F7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 48 | 6DE752711A2D523B007525F7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 49 | 6DE752771A2D526E007525F7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 6DE7522F1A2D4AE2007525F7 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 6DE7527A1A2D5294007525F7 /* CoreGraphics.framework in Frameworks */, 58 | 6DE7527B1A2D5294007525F7 /* QuartzCore.framework in Frameworks */, 59 | 6DE7527C1A2D5294007525F7 /* UIKit.framework in Frameworks */, 60 | 6DE7527D1A2D5294007525F7 /* Foundation.framework in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 6DE752481A2D4AE2007525F7 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 6DE752291A2D4AE2007525F7 = { 75 | isa = PBXGroup; 76 | children = ( 77 | 6DE752341A2D4AE2007525F7 /* GMDCircleLoader */, 78 | 6DE752791A2D527A007525F7 /* Frameworks */, 79 | 6DE7524E1A2D4AE2007525F7 /* GMDCircleLoaderTests */, 80 | 6DE752331A2D4AE2007525F7 /* Products */, 81 | ); 82 | sourceTree = ""; 83 | }; 84 | 6DE752331A2D4AE2007525F7 /* Products */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 6DE752321A2D4AE2007525F7 /* GMDCircleLoader.app */, 88 | 6DE7524B1A2D4AE2007525F7 /* GMDCircleLoaderTests.xctest */, 89 | ); 90 | name = Products; 91 | sourceTree = ""; 92 | }; 93 | 6DE752341A2D4AE2007525F7 /* GMDCircleLoader */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 6DE7525C1A2D4E31007525F7 /* Classes */, 97 | 6DE7525D1A2D4E38007525F7 /* Vendor */, 98 | 6DE7525E1A2D4E48007525F7 /* Other Sources */, 99 | 6DE7525F1A2D4E51007525F7 /* Resources */, 100 | 6DE752731A2D5248007525F7 /* Frameworks */, 101 | 6DE752421A2D4AE2007525F7 /* Images.xcassets */, 102 | ); 103 | path = GMDCircleLoader; 104 | sourceTree = ""; 105 | }; 106 | 6DE7524E1A2D4AE2007525F7 /* GMDCircleLoaderTests */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 6DE752511A2D4AE2007525F7 /* GMDCircleLoaderTests.m */, 110 | 6DE7524F1A2D4AE2007525F7 /* Supporting Files */, 111 | ); 112 | path = GMDCircleLoaderTests; 113 | sourceTree = ""; 114 | }; 115 | 6DE7524F1A2D4AE2007525F7 /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 6DE752501A2D4AE2007525F7 /* Info.plist */, 119 | ); 120 | name = "Supporting Files"; 121 | sourceTree = ""; 122 | }; 123 | 6DE7525B1A2D4D63007525F7 /* GMDCircleLoader */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 6DE7526A1A2D4EA5007525F7 /* GMDCircleLoader.h */, 127 | 6DE7526B1A2D4EA5007525F7 /* GMDCircleLoader.m */, 128 | ); 129 | name = GMDCircleLoader; 130 | sourceTree = ""; 131 | }; 132 | 6DE7525C1A2D4E31007525F7 /* Classes */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 6DE752601A2D4E61007525F7 /* AppDelegate.h */, 136 | 6DE752611A2D4E61007525F7 /* AppDelegate.m */, 137 | 6DE752621A2D4E61007525F7 /* ViewController.h */, 138 | 6DE752631A2D4E61007525F7 /* ViewController.m */, 139 | ); 140 | name = Classes; 141 | sourceTree = ""; 142 | }; 143 | 6DE7525D1A2D4E38007525F7 /* Vendor */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 6DE7525B1A2D4D63007525F7 /* GMDCircleLoader */, 147 | ); 148 | name = Vendor; 149 | sourceTree = ""; 150 | }; 151 | 6DE7525E1A2D4E48007525F7 /* Other Sources */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | ); 155 | name = "Other Sources"; 156 | sourceTree = ""; 157 | }; 158 | 6DE7525F1A2D4E51007525F7 /* Resources */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 6DE752661A2D4E75007525F7 /* Info.plist */, 162 | 6DE752671A2D4E75007525F7 /* main.m */, 163 | ); 164 | name = Resources; 165 | sourceTree = ""; 166 | }; 167 | 6DE752731A2D5248007525F7 /* Frameworks */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | ); 171 | name = Frameworks; 172 | sourceTree = ""; 173 | }; 174 | 6DE752791A2D527A007525F7 /* Frameworks */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | 6DE752711A2D523B007525F7 /* CoreGraphics.framework */, 178 | 6DE7526F1A2D5236007525F7 /* QuartzCore.framework */, 179 | 6DE7526D1A2D522E007525F7 /* UIKit.framework */, 180 | 6DE752771A2D526E007525F7 /* Foundation.framework */, 181 | ); 182 | name = Frameworks; 183 | sourceTree = ""; 184 | }; 185 | /* End PBXGroup section */ 186 | 187 | /* Begin PBXNativeTarget section */ 188 | 6DE752311A2D4AE2007525F7 /* GMDCircleLoader */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = 6DE752551A2D4AE2007525F7 /* Build configuration list for PBXNativeTarget "GMDCircleLoader" */; 191 | buildPhases = ( 192 | 6DE7522E1A2D4AE2007525F7 /* Sources */, 193 | 6DE7522F1A2D4AE2007525F7 /* Frameworks */, 194 | 6DE752301A2D4AE2007525F7 /* Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | ); 200 | name = GMDCircleLoader; 201 | productName = GMDCircleLoader; 202 | productReference = 6DE752321A2D4AE2007525F7 /* GMDCircleLoader.app */; 203 | productType = "com.apple.product-type.application"; 204 | }; 205 | 6DE7524A1A2D4AE2007525F7 /* GMDCircleLoaderTests */ = { 206 | isa = PBXNativeTarget; 207 | buildConfigurationList = 6DE752581A2D4AE2007525F7 /* Build configuration list for PBXNativeTarget "GMDCircleLoaderTests" */; 208 | buildPhases = ( 209 | 6DE752471A2D4AE2007525F7 /* Sources */, 210 | 6DE752481A2D4AE2007525F7 /* Frameworks */, 211 | 6DE752491A2D4AE2007525F7 /* Resources */, 212 | ); 213 | buildRules = ( 214 | ); 215 | dependencies = ( 216 | 6DE7524D1A2D4AE2007525F7 /* PBXTargetDependency */, 217 | ); 218 | name = GMDCircleLoaderTests; 219 | productName = GMDCircleLoaderTests; 220 | productReference = 6DE7524B1A2D4AE2007525F7 /* GMDCircleLoaderTests.xctest */; 221 | productType = "com.apple.product-type.bundle.unit-test"; 222 | }; 223 | /* End PBXNativeTarget section */ 224 | 225 | /* Begin PBXProject section */ 226 | 6DE7522A1A2D4AE2007525F7 /* Project object */ = { 227 | isa = PBXProject; 228 | attributes = { 229 | LastUpgradeCheck = 0610; 230 | ORGANIZATIONNAME = "Gabe Morales"; 231 | TargetAttributes = { 232 | 6DE752311A2D4AE2007525F7 = { 233 | CreatedOnToolsVersion = 6.1; 234 | }; 235 | 6DE7524A1A2D4AE2007525F7 = { 236 | CreatedOnToolsVersion = 6.1; 237 | TestTargetID = 6DE752311A2D4AE2007525F7; 238 | }; 239 | }; 240 | }; 241 | buildConfigurationList = 6DE7522D1A2D4AE2007525F7 /* Build configuration list for PBXProject "GMDCircleLoader" */; 242 | compatibilityVersion = "Xcode 3.2"; 243 | developmentRegion = English; 244 | hasScannedForEncodings = 0; 245 | knownRegions = ( 246 | en, 247 | Base, 248 | ); 249 | mainGroup = 6DE752291A2D4AE2007525F7; 250 | productRefGroup = 6DE752331A2D4AE2007525F7 /* Products */; 251 | projectDirPath = ""; 252 | projectRoot = ""; 253 | targets = ( 254 | 6DE752311A2D4AE2007525F7 /* GMDCircleLoader */, 255 | 6DE7524A1A2D4AE2007525F7 /* GMDCircleLoaderTests */, 256 | ); 257 | }; 258 | /* End PBXProject section */ 259 | 260 | /* Begin PBXResourcesBuildPhase section */ 261 | 6DE752301A2D4AE2007525F7 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 6DE752431A2D4AE2007525F7 /* Images.xcassets in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | 6DE752491A2D4AE2007525F7 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXResourcesBuildPhase section */ 277 | 278 | /* Begin PBXSourcesBuildPhase section */ 279 | 6DE7522E1A2D4AE2007525F7 /* Sources */ = { 280 | isa = PBXSourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 6DE752651A2D4E61007525F7 /* ViewController.m in Sources */, 284 | 6DE7526C1A2D4EA5007525F7 /* GMDCircleLoader.m in Sources */, 285 | 6DE752691A2D4E75007525F7 /* main.m in Sources */, 286 | 6DE752641A2D4E61007525F7 /* AppDelegate.m in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 6DE752471A2D4AE2007525F7 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 6DE752521A2D4AE2007525F7 /* GMDCircleLoaderTests.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXTargetDependency section */ 301 | 6DE7524D1A2D4AE2007525F7 /* PBXTargetDependency */ = { 302 | isa = PBXTargetDependency; 303 | target = 6DE752311A2D4AE2007525F7 /* GMDCircleLoader */; 304 | targetProxy = 6DE7524C1A2D4AE2007525F7 /* PBXContainerItemProxy */; 305 | }; 306 | /* End PBXTargetDependency section */ 307 | 308 | /* Begin XCBuildConfiguration section */ 309 | 6DE752531A2D4AE2007525F7 /* Debug */ = { 310 | isa = XCBuildConfiguration; 311 | buildSettings = { 312 | ALWAYS_SEARCH_USER_PATHS = NO; 313 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 314 | CLANG_CXX_LIBRARY = "libc++"; 315 | CLANG_ENABLE_MODULES = YES; 316 | CLANG_ENABLE_OBJC_ARC = YES; 317 | CLANG_WARN_BOOL_CONVERSION = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INT_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_UNREACHABLE_CODE = YES; 325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 327 | COPY_PHASE_STRIP = NO; 328 | ENABLE_STRICT_OBJC_MSGSEND = YES; 329 | GCC_C_LANGUAGE_STANDARD = gnu99; 330 | GCC_DYNAMIC_NO_PIC = NO; 331 | GCC_OPTIMIZATION_LEVEL = 0; 332 | GCC_PREPROCESSOR_DEFINITIONS = ( 333 | "DEBUG=1", 334 | "$(inherited)", 335 | ); 336 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 344 | MTL_ENABLE_DEBUG_INFO = YES; 345 | ONLY_ACTIVE_ARCH = YES; 346 | SDKROOT = iphoneos; 347 | }; 348 | name = Debug; 349 | }; 350 | 6DE752541A2D4AE2007525F7 /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INT_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 368 | COPY_PHASE_STRIP = YES; 369 | ENABLE_NS_ASSERTIONS = NO; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 379 | MTL_ENABLE_DEBUG_INFO = NO; 380 | SDKROOT = iphoneos; 381 | VALIDATE_PRODUCT = YES; 382 | }; 383 | name = Release; 384 | }; 385 | 6DE752561A2D4AE2007525F7 /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 389 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 390 | FRAMEWORK_SEARCH_PATHS = ( 391 | "$(PROJECT_DIR)", 392 | "$(inherited)", 393 | ); 394 | INFOPLIST_FILE = GMDCircleLoader/Resources/Info.plist; 395 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 397 | PRODUCT_NAME = "$(TARGET_NAME)"; 398 | }; 399 | name = Debug; 400 | }; 401 | 6DE752571A2D4AE2007525F7 /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 405 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 406 | FRAMEWORK_SEARCH_PATHS = ( 407 | "$(PROJECT_DIR)", 408 | "$(inherited)", 409 | ); 410 | INFOPLIST_FILE = GMDCircleLoader/Resources/Info.plist; 411 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 412 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 413 | PRODUCT_NAME = "$(TARGET_NAME)"; 414 | }; 415 | name = Release; 416 | }; 417 | 6DE752591A2D4AE2007525F7 /* Debug */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | BUNDLE_LOADER = "$(TEST_HOST)"; 421 | FRAMEWORK_SEARCH_PATHS = ( 422 | "$(SDKROOT)/Developer/Library/Frameworks", 423 | "$(inherited)", 424 | ); 425 | GCC_PREPROCESSOR_DEFINITIONS = ( 426 | "DEBUG=1", 427 | "$(inherited)", 428 | ); 429 | INFOPLIST_FILE = GMDCircleLoaderTests/Info.plist; 430 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMDCircleLoader.app/GMDCircleLoader"; 433 | }; 434 | name = Debug; 435 | }; 436 | 6DE7525A1A2D4AE2007525F7 /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | BUNDLE_LOADER = "$(TEST_HOST)"; 440 | FRAMEWORK_SEARCH_PATHS = ( 441 | "$(SDKROOT)/Developer/Library/Frameworks", 442 | "$(inherited)", 443 | ); 444 | INFOPLIST_FILE = GMDCircleLoaderTests/Info.plist; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GMDCircleLoader.app/GMDCircleLoader"; 448 | }; 449 | name = Release; 450 | }; 451 | /* End XCBuildConfiguration section */ 452 | 453 | /* Begin XCConfigurationList section */ 454 | 6DE7522D1A2D4AE2007525F7 /* Build configuration list for PBXProject "GMDCircleLoader" */ = { 455 | isa = XCConfigurationList; 456 | buildConfigurations = ( 457 | 6DE752531A2D4AE2007525F7 /* Debug */, 458 | 6DE752541A2D4AE2007525F7 /* Release */, 459 | ); 460 | defaultConfigurationIsVisible = 0; 461 | defaultConfigurationName = Release; 462 | }; 463 | 6DE752551A2D4AE2007525F7 /* Build configuration list for PBXNativeTarget "GMDCircleLoader" */ = { 464 | isa = XCConfigurationList; 465 | buildConfigurations = ( 466 | 6DE752561A2D4AE2007525F7 /* Debug */, 467 | 6DE752571A2D4AE2007525F7 /* Release */, 468 | ); 469 | defaultConfigurationIsVisible = 0; 470 | }; 471 | 6DE752581A2D4AE2007525F7 /* Build configuration list for PBXNativeTarget "GMDCircleLoaderTests" */ = { 472 | isa = XCConfigurationList; 473 | buildConfigurations = ( 474 | 6DE752591A2D4AE2007525F7 /* Debug */, 475 | 6DE7525A1A2D4AE2007525F7 /* Release */, 476 | ); 477 | defaultConfigurationIsVisible = 0; 478 | }; 479 | /* End XCConfigurationList section */ 480 | }; 481 | rootObject = 6DE7522A1A2D4AE2007525F7 /* Project object */; 482 | } 483 | -------------------------------------------------------------------------------- /GMDCircleLoader/Classes/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // GMDCircleLoader 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. All rights reserved. 7 | // 8 | 9 | #import 10 | @class ViewController; 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | @property (strong, nonatomic) ViewController *viewController; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /GMDCircleLoader/Classes/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // GMDCircleLoader 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | _viewController = [[ViewController alloc] init]; 23 | _window.backgroundColor = [UIColor whiteColor]; 24 | _window.rootViewController = _viewController; 25 | [_window makeKeyAndVisible]; 26 | return YES; 27 | } 28 | 29 | - (void)applicationWillResignActive:(UIApplication *)application { 30 | // 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. 31 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 32 | } 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application { 40 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 41 | } 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // 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. 45 | } 46 | 47 | - (void)applicationWillTerminate:(UIApplication *)application { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /GMDCircleLoader/Classes/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // GMDCircleLoader 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /GMDCircleLoader/Classes/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // GMDCircleLoader 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "GMDCircleLoader.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib 22 | } 23 | 24 | - (void)viewDidAppear:(BOOL)animated { 25 | [super viewDidAppear:animated]; 26 | 27 | [self performSelector:@selector(showCircleLoader) withObject:nil afterDelay:5]; 28 | //[self performSelector:@selector(stopCircleLoader) withObject:nil afterDelay:8]; 29 | } 30 | 31 | - (void)showCircleLoader { 32 | [GMDCircleLoader setOnView:self.view withTitle:@"Loading..." animated:YES]; 33 | } 34 | 35 | - (void)stopCircleLoader { 36 | [GMDCircleLoader hideFromView:self.view animated:YES]; 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "8.0", 8 | "subtype" : "736h", 9 | "scale" : "3x" 10 | }, 11 | { 12 | "orientation" : "portrait", 13 | "idiom" : "iphone", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "8.0", 16 | "subtype" : "667h", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "orientation" : "portrait", 21 | "idiom" : "iphone", 22 | "extent" : "full-screen", 23 | "minimum-system-version" : "7.0", 24 | "filename" : "Default@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "extent" : "full-screen", 29 | "idiom" : "iphone", 30 | "subtype" : "retina4", 31 | "filename" : "Default-568h@2x-1.png", 32 | "minimum-system-version" : "7.0", 33 | "orientation" : "portrait", 34 | "scale" : "2x" 35 | }, 36 | { 37 | "orientation" : "portrait", 38 | "idiom" : "iphone", 39 | "extent" : "full-screen", 40 | "filename" : "Default.png", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "orientation" : "portrait", 45 | "idiom" : "iphone", 46 | "extent" : "full-screen", 47 | "filename" : "Default@2x-1.png", 48 | "scale" : "2x" 49 | }, 50 | { 51 | "orientation" : "portrait", 52 | "idiom" : "iphone", 53 | "extent" : "full-screen", 54 | "filename" : "Default-568h@2x.png", 55 | "subtype" : "retina4", 56 | "scale" : "2x" 57 | } 58 | ], 59 | "info" : { 60 | "version" : 1, 61 | "author" : "xcode" 62 | } 63 | } -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabemdev/GMDCircleLoader/f072f4f41f6eacafee90a1a88252f5bbac6a15e2/GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabemdev/GMDCircleLoader/f072f4f41f6eacafee90a1a88252f5bbac6a15e2/GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabemdev/GMDCircleLoader/f072f4f41f6eacafee90a1a88252f5bbac6a15e2/GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabemdev/GMDCircleLoader/f072f4f41f6eacafee90a1a88252f5bbac6a15e2/GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default@2x-1.png -------------------------------------------------------------------------------- /GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gabemdev/GMDCircleLoader/f072f4f41f6eacafee90a1a88252f5bbac6a15e2/GMDCircleLoader/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /GMDCircleLoader/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.gabemdev.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /GMDCircleLoader/Resources/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GMDCircleLoader 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. 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 | -------------------------------------------------------------------------------- /GMDCircleLoaderTests/GMDCircleLoaderTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GMDCircleLoaderTests.m 3 | // GMDCircleLoaderTests 4 | // 5 | // Created by Rockstar. on 12/1/14. 6 | // Copyright (c) 2014 Gabe Morales. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GMDCircleLoaderTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation GMDCircleLoaderTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /GMDCircleLoaderTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.gabemdev.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GMDCircleLoader 2 | GMDCircleLoader is a neat and easy to use loading view meant to replicate Apple’s progress loading view of an ongoing task. 3 | 4 | ![GMDCircleLoader](http://cl.ly/YmrY/GMDCircleLoader.gif) 5 | 6 | ## Installation 7 | * Drag the `GMDCircleLoader/GMDCircleLoader` folder into your project. 8 | * Add the **QuartzCore** framework to your project. 9 | * Update the definitions on your Header file if necessary. 10 | * #import “GMDCircleLoader.h” on your implementation file or add it to your projects prefix file. 11 | 12 | ## Usage 13 | (see sample Xcode project) 14 | 15 | **Use GMDCircleLoader wisely! Bad use case examples: pull to refresh, infinite scrolling, sending message.** 16 | 17 | Using GMDCircleLoader in your app will usually look as simple as this: 18 | ```objective-c 19 | - (void)loginTwitter:(id)sender { 20 | [GMDCircleLoader setOnView:self.view withTitle:@"Loading..." animated:YES]; 21 | [[Twitter sharedInstance] loginWithCompletion:^(TWTRSession *session, NSError *error) { 22 | if (session) { 23 | [GMDCircleLoading hideHUDFromView:self.view animated:YES]; 24 | } 25 | } 26 | ``` 27 | ### Showing the loading view 28 | You can show the status of indeterminate tasks using one of the following: 29 | ```objective-c 30 | + (GMDCircleLoader *)setOnView:(UIView *)view withTitle:(NSString *)title animated:(BOOL)animated; 31 | ``` 32 | ### Dismissing the loading view 33 | It can be dismissed right away using: 34 | ```objective-c 35 | + (BOOL)hideFromView:(UIView *)view animated:(BOOL)animated; 36 | ``` 37 | 38 | ### Alternate views 39 | You can include an image to show in the middle of the loading circle by simply uncommenting: 40 | ```objective-c 41 | UIImageView *img = [[UIImageView alloc] initWithFrame:GMD_SPINNER_IMAGE]; 42 | img.image = GMD_IMAGE; 43 | hud.center = img.center; 44 | [hud addSubview:img]; 45 | ``` 46 | 47 | ### Updates pending 48 | * Create singleton 49 | * Create additional status options, including no label loader. 50 | * Reduce view frame from bounds to something more manageable. 51 | 52 | ## Contributing to this project 53 | 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/gabemdev/GMDCircleLoader/issues/new). 54 | 55 | Please take a moment to review the guidelines written by [Nicolas Gallagher](https://github.com/necolas/): 56 | * [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs) 57 | * [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features) 58 | * [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests) 59 | 60 | ## Credits 61 | GMDCircleLoader is brought to you by [Gabe Morales](http://gabemdev.com) and [contributors to the project](https://github.com/gabemdev/GMDCircleLoader/contributors). 62 | 63 | If you're using GMDCircleLoader in your project, attribution would be nice. 64 | 65 | ## License 66 | GMDCircleLoader is released under MIT License. 67 | -------------------------------------------------------------------------------- /Vendor/GMDCircleLoader/GMDCircleLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // GMDCircleLoader.h 3 | // 4 | // Copyright (c) 2014 Gabe Morales 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | #import 26 | #import 27 | #import 28 | 29 | #pragma mark - Definitions 30 | //---------------------------------- 31 | // To change the color and frame size of the spinner, simply change the color and frame definition here. 32 | //---------------------------------- 33 | #define GMD_SPINNER_COLOR [UIColor colorWithRed:0.129 green:0.455 blue:0.627 alpha:1.0] 34 | #define GMD_SPINNER_FRAME CGRectMake(40.0f, 40.0f, 40.0f, 40.0f) 35 | #define GMD_SPINNER_IMAGE CGRectMake(15, 15,30,30) 36 | #define GMD_IMAGE [UIImage imageNamed:@"image"] 37 | #define GMD_SPINNER_LINE_WIDTH fmaxf(self.frame.size.width * 0.025, 1.f) 38 | 39 | #pragma mark - Interface 40 | 41 | @interface GMDCircleLoader : UIView 42 | 43 | @property (nonatomic, assign) CGFloat lineWidth; 44 | 45 | @property (nonatomic, assign) UIColor *lineTintColor; 46 | 47 | - (void)start; 48 | 49 | - (void)stop; 50 | 51 | + (GMDCircleLoader *)setOnView:(UIView *)view withTitle:(NSString *)title animated:(BOOL)animated; 52 | 53 | + (BOOL)hideFromView:(UIView *)view animated:(BOOL)animated; 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Vendor/GMDCircleLoader/GMDCircleLoader.m: -------------------------------------------------------------------------------- 1 | // 2 | // GMDCircleLoader.m 3 | // 4 | // Copyright (c) 2014 Gabe Morales 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "GMDCircleLoader.h" 25 | 26 | #pragma mark - Interface 27 | @interface GMDCircleLoader () 28 | @property (nonatomic, strong) CAShapeLayer *backgroundLayer; 29 | @property (nonatomic, assign) BOOL isSpinning; 30 | @end 31 | 32 | @implementation GMDCircleLoader 33 | 34 | //----------------------------------- 35 | // Add the loader to view 36 | //----------------------------------- 37 | 38 | + (GMDCircleLoader *)setOnView:(UIView *)view withTitle:(NSString *)title animated:(BOOL)animated { 39 | GMDCircleLoader *hud = [[GMDCircleLoader alloc] initWithFrame:GMD_SPINNER_FRAME]; 40 | 41 | //You can add an image to the center of the spinner view 42 | // UIImageView *img = [[UIImageView alloc] initWithFrame:GMD_SPINNER_IMAGE]; 43 | // img.image = GMD_IMAGE; 44 | // hud.center = img.center; 45 | // [hud addSubview:img]; 46 | 47 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(-70.0f, 40.0f, 200.0f, 42.0f)]; 48 | label.font = [UIFont boldSystemFontOfSize:18.0f]; 49 | label.textColor = GMD_SPINNER_COLOR; 50 | label.textAlignment = NSTextAlignmentCenter; 51 | label.text = title; 52 | [hud addSubview:label]; 53 | 54 | [hud start]; 55 | [view addSubview:hud]; 56 | float height = [[UIScreen mainScreen] bounds].size.height; 57 | float width = [[UIScreen mainScreen] bounds].size.width; 58 | CGPoint center = CGPointMake(width/2, height/2); 59 | hud.center = center; 60 | 61 | if (animated) { 62 | [hud setAlpha:.0f]; 63 | [UIView animateWithDuration:.3f animations:^{ 64 | [hud setAlpha:1.0f]; 65 | }]; 66 | } 67 | 68 | return hud; 69 | } 70 | 71 | //------------------------------------ 72 | // Hide the leader in view 73 | //------------------------------------ 74 | + (BOOL)hideFromView:(UIView *)view animated:(BOOL)animated { 75 | GMDCircleLoader *hud = [GMDCircleLoader HUDForView:view]; 76 | [hud stop]; 77 | if (hud) { 78 | if (animated) { 79 | [UIView animateWithDuration:.3f animations:^{ 80 | [hud setAlpha:.0f]; 81 | } completion:^(BOOL finished) { 82 | [hud removeFromSuperview]; 83 | }]; 84 | }else{ 85 | [hud removeFromSuperview]; 86 | } 87 | return YES; 88 | } 89 | return NO; 90 | } 91 | 92 | //------------------------------------ 93 | // Perform search for loader and hide it 94 | //------------------------------------ 95 | + (GMDCircleLoader *)HUDForView: (UIView *)view { 96 | GMDCircleLoader *hud = nil; 97 | NSArray *subViewsArray = view.subviews; 98 | Class hudClass = [GMDCircleLoader class]; 99 | for (UIView *aView in subViewsArray) { 100 | if ([aView isKindOfClass:hudClass]) { 101 | hud = (GMDCircleLoader *)aView; 102 | } 103 | } 104 | return hud; 105 | } 106 | 107 | #pragma mark - Initialization 108 | - (instancetype)initWithFrame:(CGRect)frame { 109 | self = [super initWithFrame:frame]; 110 | if (self) { 111 | [self setup]; 112 | } 113 | return self; 114 | } 115 | 116 | - (instancetype)initWithCoder:(NSCoder *)aDecoder { 117 | self = [super initWithCoder:aDecoder]; 118 | if (self) { 119 | [self setup]; 120 | } 121 | return self; 122 | } 123 | 124 | #pragma mark - Setup 125 | - (void)setup { 126 | self.backgroundColor = [UIColor clearColor]; 127 | 128 | //--------------------------- 129 | // Set line width 130 | //--------------------------- 131 | _lineWidth = GMD_SPINNER_LINE_WIDTH; 132 | 133 | //--------------------------- 134 | // Round Progress View 135 | //--------------------------- 136 | self.backgroundLayer = [CAShapeLayer layer]; 137 | _backgroundLayer.strokeColor = GMD_SPINNER_COLOR.CGColor; 138 | _backgroundLayer.fillColor = self.backgroundColor.CGColor; 139 | _backgroundLayer.lineCap = kCALineCapRound; 140 | _backgroundLayer.lineWidth = _lineWidth; 141 | [self.layer addSublayer:_backgroundLayer]; 142 | 143 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(restartAnimations) name:UIApplicationWillEnterForegroundNotification object:NULL]; 144 | } 145 | 146 | - (void)dealloc { 147 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 148 | } 149 | 150 | - (void)drawRect:(CGRect)rect { 151 | //------------------------- 152 | // Make sure layers cover the whole view 153 | //------------------------- 154 | _backgroundLayer.frame = self.bounds; 155 | } 156 | 157 | #pragma mark - Drawing 158 | 159 | - (void)drawBackgroundCircle:(BOOL) partial { 160 | CGFloat startAngle = - ((float)M_PI / 2); // 90 Degrees 161 | CGFloat endAngle = (2 * (float)M_PI) + startAngle; 162 | CGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); 163 | CGFloat radius = (self.bounds.size.width - _lineWidth)/2; 164 | 165 | //---------------------- 166 | // Begin draw background 167 | //---------------------- 168 | 169 | UIBezierPath *processBackgroundPath = [UIBezierPath bezierPath]; 170 | processBackgroundPath.lineWidth = _lineWidth; 171 | 172 | //--------------------------------------- 173 | // Make end angle to 90% of the progress 174 | //--------------------------------------- 175 | if (partial) { 176 | endAngle = (1.8f * (float)M_PI) + startAngle; 177 | } 178 | [processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; 179 | _backgroundLayer.path = processBackgroundPath.CGPath; 180 | } 181 | 182 | #pragma mark - Spin 183 | 184 | - (void)restartAnimations { 185 | if (self.isSpinning) { 186 | [self start]; 187 | } 188 | } 189 | 190 | - (void)start { 191 | 192 | if (!self.isSpinning) { 193 | self.isSpinning = YES; 194 | [self drawBackgroundCircle:YES]; 195 | 196 | CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; 197 | rotationAnimation.toValue = [NSNumber numberWithFloat:M_PI * 2.0]; 198 | rotationAnimation.duration = 1; 199 | rotationAnimation.cumulative = YES; 200 | rotationAnimation.repeatCount = HUGE_VALF; 201 | [_backgroundLayer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; 202 | } 203 | } 204 | 205 | - (void)stop{ 206 | 207 | if (self.isSpinning) { 208 | [self drawBackgroundCircle:NO]; 209 | [_backgroundLayer removeAllAnimations]; 210 | self.isSpinning = NO; 211 | } 212 | } 213 | 214 | @end 215 | --------------------------------------------------------------------------------