├── .gitignore ├── LICENSE ├── MFLTextFillLoading.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── MFLTextFillLoading.xcscmblueprint ├── MFLTextFillLoading ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Franklin_Gothic_Book.ttf ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── MFLFillableText │ ├── MFLFillableTextLoader.h │ ├── MFLFillableTextLoader.m │ ├── MFLFillableTextLoader.xib │ └── Text Paths │ │ ├── MFLBorderLabel.h │ │ └── MFLBorderLabel.m ├── MFLTextFillLoading.xcdatamodeld │ ├── .xccurrentversion │ └── MFLTextFillLoading.xcdatamodel │ │ └── contents ├── SWCrawlBody.ttf ├── SWCrawlTitle.ttf ├── StarJediBig.ttf ├── Starjedi.ttf ├── ViewController.h ├── ViewController.m ├── main.m └── starBg.png ├── MFLTextFillLoadingTests ├── Info.plist └── MFLTextFillLoadingTests.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Tj 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 | 23 | -------------------------------------------------------------------------------- /MFLTextFillLoading.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 324195491B2DED9C002E9021 /* StarJediBig.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 324195481B2DED9C002E9021 /* StarJediBig.ttf */; }; 11 | 3241954D1B2DF0EC002E9021 /* Franklin_Gothic_Book.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3241954A1B2DF0EC002E9021 /* Franklin_Gothic_Book.ttf */; }; 12 | 3241954E1B2DF0EC002E9021 /* SWCrawlBody.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3241954B1B2DF0EC002E9021 /* SWCrawlBody.ttf */; }; 13 | 3241954F1B2DF0EC002E9021 /* SWCrawlTitle.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3241954C1B2DF0EC002E9021 /* SWCrawlTitle.ttf */; }; 14 | 324195511B2DF7E2002E9021 /* starBg.png in Resources */ = {isa = PBXBuildFile; fileRef = 324195501B2DF7E2002E9021 /* starBg.png */; }; 15 | 324E3D231B2C632000A28F84 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 324E3D221B2C632000A28F84 /* main.m */; }; 16 | 324E3D261B2C632000A28F84 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 324E3D251B2C632000A28F84 /* AppDelegate.m */; }; 17 | 324E3D291B2C632000A28F84 /* MFLTextFillLoading.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 324E3D271B2C632000A28F84 /* MFLTextFillLoading.xcdatamodeld */; }; 18 | 324E3D2C1B2C632000A28F84 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 324E3D2B1B2C632000A28F84 /* ViewController.m */; }; 19 | 324E3D2F1B2C632000A28F84 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 324E3D2D1B2C632000A28F84 /* Main.storyboard */; }; 20 | 324E3D311B2C632000A28F84 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 324E3D301B2C632000A28F84 /* Images.xcassets */; }; 21 | 324E3D341B2C632000A28F84 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 324E3D321B2C632000A28F84 /* LaunchScreen.xib */; }; 22 | 324E3D401B2C632000A28F84 /* MFLTextFillLoadingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 324E3D3F1B2C632000A28F84 /* MFLTextFillLoadingTests.m */; }; 23 | 3289D1A91B2CF28A0064543F /* MFLFillableTextLoader.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3289D1A81B2CF28A0064543F /* MFLFillableTextLoader.xib */; }; 24 | 32BEEADE1B2C71E700BAF657 /* MFLFillableTextLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BEEADB1B2C71E700BAF657 /* MFLFillableTextLoader.m */; }; 25 | 32BEEAF91B2CAA8A00BAF657 /* MFLBorderLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 32BEEAF81B2CAA8A00BAF657 /* MFLBorderLabel.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 324E3D3A1B2C632000A28F84 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 324E3D151B2C632000A28F84 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 324E3D1C1B2C632000A28F84; 34 | remoteInfo = MFLTextFillLoading; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 324195481B2DED9C002E9021 /* StarJediBig.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = StarJediBig.ttf; sourceTree = ""; }; 40 | 3241954A1B2DF0EC002E9021 /* Franklin_Gothic_Book.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Franklin_Gothic_Book.ttf; sourceTree = ""; }; 41 | 3241954B1B2DF0EC002E9021 /* SWCrawlBody.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SWCrawlBody.ttf; sourceTree = ""; }; 42 | 3241954C1B2DF0EC002E9021 /* SWCrawlTitle.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SWCrawlTitle.ttf; sourceTree = ""; }; 43 | 324195501B2DF7E2002E9021 /* starBg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = starBg.png; sourceTree = ""; }; 44 | 324E3D1D1B2C632000A28F84 /* MFLTextFillLoading.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MFLTextFillLoading.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 324E3D211B2C632000A28F84 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 324E3D221B2C632000A28F84 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 324E3D241B2C632000A28F84 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 324E3D251B2C632000A28F84 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 324E3D281B2C632000A28F84 /* MFLTextFillLoading.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MFLTextFillLoading.xcdatamodel; sourceTree = ""; }; 50 | 324E3D2A1B2C632000A28F84 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 51 | 324E3D2B1B2C632000A28F84 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 52 | 324E3D2E1B2C632000A28F84 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 324E3D301B2C632000A28F84 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 54 | 324E3D331B2C632000A28F84 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 55 | 324E3D391B2C632000A28F84 /* MFLTextFillLoadingTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MFLTextFillLoadingTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 324E3D3E1B2C632000A28F84 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | 324E3D3F1B2C632000A28F84 /* MFLTextFillLoadingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MFLTextFillLoadingTests.m; sourceTree = ""; }; 58 | 3289D1A81B2CF28A0064543F /* MFLFillableTextLoader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MFLFillableTextLoader.xib; sourceTree = ""; }; 59 | 32BEEADA1B2C71E700BAF657 /* MFLFillableTextLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFLFillableTextLoader.h; sourceTree = ""; }; 60 | 32BEEADB1B2C71E700BAF657 /* MFLFillableTextLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFLFillableTextLoader.m; sourceTree = ""; }; 61 | 32BEEAF71B2CAA8A00BAF657 /* MFLBorderLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFLBorderLabel.h; sourceTree = ""; }; 62 | 32BEEAF81B2CAA8A00BAF657 /* MFLBorderLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFLBorderLabel.m; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 324E3D1A1B2C632000A28F84 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 324E3D361B2C632000A28F84 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXFrameworksBuildPhase section */ 81 | 82 | /* Begin PBXGroup section */ 83 | 324E3D141B2C632000A28F84 = { 84 | isa = PBXGroup; 85 | children = ( 86 | 324E3D1F1B2C632000A28F84 /* MFLTextFillLoading */, 87 | 324E3D3C1B2C632000A28F84 /* MFLTextFillLoadingTests */, 88 | 324E3D1E1B2C632000A28F84 /* Products */, 89 | ); 90 | sourceTree = ""; 91 | }; 92 | 324E3D1E1B2C632000A28F84 /* Products */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 324E3D1D1B2C632000A28F84 /* MFLTextFillLoading.app */, 96 | 324E3D391B2C632000A28F84 /* MFLTextFillLoadingTests.xctest */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 324E3D1F1B2C632000A28F84 /* MFLTextFillLoading */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 32BEEAD91B2C71E700BAF657 /* MFLFillableText */, 105 | 324E3D241B2C632000A28F84 /* AppDelegate.h */, 106 | 324E3D251B2C632000A28F84 /* AppDelegate.m */, 107 | 324E3D2A1B2C632000A28F84 /* ViewController.h */, 108 | 324E3D2B1B2C632000A28F84 /* ViewController.m */, 109 | 324E3D2D1B2C632000A28F84 /* Main.storyboard */, 110 | 324E3D301B2C632000A28F84 /* Images.xcassets */, 111 | 324195481B2DED9C002E9021 /* StarJediBig.ttf */, 112 | 3241954A1B2DF0EC002E9021 /* Franklin_Gothic_Book.ttf */, 113 | 3241954B1B2DF0EC002E9021 /* SWCrawlBody.ttf */, 114 | 3241954C1B2DF0EC002E9021 /* SWCrawlTitle.ttf */, 115 | 324195501B2DF7E2002E9021 /* starBg.png */, 116 | 324E3D321B2C632000A28F84 /* LaunchScreen.xib */, 117 | 324E3D271B2C632000A28F84 /* MFLTextFillLoading.xcdatamodeld */, 118 | 324E3D201B2C632000A28F84 /* Supporting Files */, 119 | ); 120 | path = MFLTextFillLoading; 121 | sourceTree = ""; 122 | }; 123 | 324E3D201B2C632000A28F84 /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 324E3D211B2C632000A28F84 /* Info.plist */, 127 | 324E3D221B2C632000A28F84 /* main.m */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | 324E3D3C1B2C632000A28F84 /* MFLTextFillLoadingTests */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 324E3D3F1B2C632000A28F84 /* MFLTextFillLoadingTests.m */, 136 | 324E3D3D1B2C632000A28F84 /* Supporting Files */, 137 | ); 138 | path = MFLTextFillLoadingTests; 139 | sourceTree = ""; 140 | }; 141 | 324E3D3D1B2C632000A28F84 /* Supporting Files */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | 324E3D3E1B2C632000A28F84 /* Info.plist */, 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | 32BEEAD91B2C71E700BAF657 /* MFLFillableText */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 32BEEADA1B2C71E700BAF657 /* MFLFillableTextLoader.h */, 153 | 32BEEADB1B2C71E700BAF657 /* MFLFillableTextLoader.m */, 154 | 3289D1A81B2CF28A0064543F /* MFLFillableTextLoader.xib */, 155 | 32BEEAE71B2C7C1600BAF657 /* Text Paths */, 156 | ); 157 | path = MFLFillableText; 158 | sourceTree = ""; 159 | }; 160 | 32BEEAE71B2C7C1600BAF657 /* Text Paths */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 32BEEAF71B2CAA8A00BAF657 /* MFLBorderLabel.h */, 164 | 32BEEAF81B2CAA8A00BAF657 /* MFLBorderLabel.m */, 165 | ); 166 | path = "Text Paths"; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXGroup section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | 324E3D1C1B2C632000A28F84 /* MFLTextFillLoading */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = 324E3D431B2C632000A28F84 /* Build configuration list for PBXNativeTarget "MFLTextFillLoading" */; 175 | buildPhases = ( 176 | 324E3D191B2C632000A28F84 /* Sources */, 177 | 324E3D1A1B2C632000A28F84 /* Frameworks */, 178 | 324E3D1B1B2C632000A28F84 /* Resources */, 179 | ); 180 | buildRules = ( 181 | ); 182 | dependencies = ( 183 | ); 184 | name = MFLTextFillLoading; 185 | productName = MFLTextFillLoading; 186 | productReference = 324E3D1D1B2C632000A28F84 /* MFLTextFillLoading.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | 324E3D381B2C632000A28F84 /* MFLTextFillLoadingTests */ = { 190 | isa = PBXNativeTarget; 191 | buildConfigurationList = 324E3D461B2C632000A28F84 /* Build configuration list for PBXNativeTarget "MFLTextFillLoadingTests" */; 192 | buildPhases = ( 193 | 324E3D351B2C632000A28F84 /* Sources */, 194 | 324E3D361B2C632000A28F84 /* Frameworks */, 195 | 324E3D371B2C632000A28F84 /* Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | 324E3D3B1B2C632000A28F84 /* PBXTargetDependency */, 201 | ); 202 | name = MFLTextFillLoadingTests; 203 | productName = MFLTextFillLoadingTests; 204 | productReference = 324E3D391B2C632000A28F84 /* MFLTextFillLoadingTests.xctest */; 205 | productType = "com.apple.product-type.bundle.unit-test"; 206 | }; 207 | /* End PBXNativeTarget section */ 208 | 209 | /* Begin PBXProject section */ 210 | 324E3D151B2C632000A28F84 /* Project object */ = { 211 | isa = PBXProject; 212 | attributes = { 213 | LastUpgradeCheck = 0630; 214 | ORGANIZATIONNAME = Tj; 215 | TargetAttributes = { 216 | 324E3D1C1B2C632000A28F84 = { 217 | CreatedOnToolsVersion = 6.3.2; 218 | }; 219 | 324E3D381B2C632000A28F84 = { 220 | CreatedOnToolsVersion = 6.3.2; 221 | TestTargetID = 324E3D1C1B2C632000A28F84; 222 | }; 223 | }; 224 | }; 225 | buildConfigurationList = 324E3D181B2C632000A28F84 /* Build configuration list for PBXProject "MFLTextFillLoading" */; 226 | compatibilityVersion = "Xcode 3.2"; 227 | developmentRegion = English; 228 | hasScannedForEncodings = 0; 229 | knownRegions = ( 230 | en, 231 | Base, 232 | ); 233 | mainGroup = 324E3D141B2C632000A28F84; 234 | productRefGroup = 324E3D1E1B2C632000A28F84 /* Products */; 235 | projectDirPath = ""; 236 | projectRoot = ""; 237 | targets = ( 238 | 324E3D1C1B2C632000A28F84 /* MFLTextFillLoading */, 239 | 324E3D381B2C632000A28F84 /* MFLTextFillLoadingTests */, 240 | ); 241 | }; 242 | /* End PBXProject section */ 243 | 244 | /* Begin PBXResourcesBuildPhase section */ 245 | 324E3D1B1B2C632000A28F84 /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 324E3D2F1B2C632000A28F84 /* Main.storyboard in Resources */, 250 | 3241954F1B2DF0EC002E9021 /* SWCrawlTitle.ttf in Resources */, 251 | 3241954E1B2DF0EC002E9021 /* SWCrawlBody.ttf in Resources */, 252 | 3289D1A91B2CF28A0064543F /* MFLFillableTextLoader.xib in Resources */, 253 | 3241954D1B2DF0EC002E9021 /* Franklin_Gothic_Book.ttf in Resources */, 254 | 324195511B2DF7E2002E9021 /* starBg.png in Resources */, 255 | 324E3D341B2C632000A28F84 /* LaunchScreen.xib in Resources */, 256 | 324E3D311B2C632000A28F84 /* Images.xcassets in Resources */, 257 | 324195491B2DED9C002E9021 /* StarJediBig.ttf in Resources */, 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | 324E3D371B2C632000A28F84 /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | /* End PBXResourcesBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | 324E3D191B2C632000A28F84 /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | 32BEEAF91B2CAA8A00BAF657 /* MFLBorderLabel.m in Sources */, 276 | 324E3D261B2C632000A28F84 /* AppDelegate.m in Sources */, 277 | 324E3D291B2C632000A28F84 /* MFLTextFillLoading.xcdatamodeld in Sources */, 278 | 32BEEADE1B2C71E700BAF657 /* MFLFillableTextLoader.m in Sources */, 279 | 324E3D2C1B2C632000A28F84 /* ViewController.m in Sources */, 280 | 324E3D231B2C632000A28F84 /* main.m in Sources */, 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | 324E3D351B2C632000A28F84 /* Sources */ = { 285 | isa = PBXSourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | 324E3D401B2C632000A28F84 /* MFLTextFillLoadingTests.m in Sources */, 289 | ); 290 | runOnlyForDeploymentPostprocessing = 0; 291 | }; 292 | /* End PBXSourcesBuildPhase section */ 293 | 294 | /* Begin PBXTargetDependency section */ 295 | 324E3D3B1B2C632000A28F84 /* PBXTargetDependency */ = { 296 | isa = PBXTargetDependency; 297 | target = 324E3D1C1B2C632000A28F84 /* MFLTextFillLoading */; 298 | targetProxy = 324E3D3A1B2C632000A28F84 /* PBXContainerItemProxy */; 299 | }; 300 | /* End PBXTargetDependency section */ 301 | 302 | /* Begin PBXVariantGroup section */ 303 | 324E3D2D1B2C632000A28F84 /* Main.storyboard */ = { 304 | isa = PBXVariantGroup; 305 | children = ( 306 | 324E3D2E1B2C632000A28F84 /* Base */, 307 | ); 308 | name = Main.storyboard; 309 | sourceTree = ""; 310 | }; 311 | 324E3D321B2C632000A28F84 /* LaunchScreen.xib */ = { 312 | isa = PBXVariantGroup; 313 | children = ( 314 | 324E3D331B2C632000A28F84 /* Base */, 315 | ); 316 | name = LaunchScreen.xib; 317 | sourceTree = ""; 318 | }; 319 | /* End PBXVariantGroup section */ 320 | 321 | /* Begin XCBuildConfiguration section */ 322 | 324E3D411B2C632000A28F84 /* Debug */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_CONSTANT_CONVERSION = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INT_CONVERSION = YES; 336 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_OPTIMIZATION_LEVEL = 0; 347 | GCC_PREPROCESSOR_DEFINITIONS = ( 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 359 | MTL_ENABLE_DEBUG_INFO = YES; 360 | ONLY_ACTIVE_ARCH = YES; 361 | SDKROOT = iphoneos; 362 | TARGETED_DEVICE_FAMILY = "1,2"; 363 | }; 364 | name = Debug; 365 | }; 366 | 324E3D421B2C632000A28F84 /* Release */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ALWAYS_SEARCH_USER_PATHS = NO; 370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 371 | CLANG_CXX_LIBRARY = "libc++"; 372 | CLANG_ENABLE_MODULES = YES; 373 | CLANG_ENABLE_OBJC_ARC = YES; 374 | CLANG_WARN_BOOL_CONVERSION = YES; 375 | CLANG_WARN_CONSTANT_CONVERSION = YES; 376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 377 | CLANG_WARN_EMPTY_BODY = YES; 378 | CLANG_WARN_ENUM_CONVERSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 381 | CLANG_WARN_UNREACHABLE_CODE = YES; 382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 383 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 384 | COPY_PHASE_STRIP = NO; 385 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 386 | ENABLE_NS_ASSERTIONS = NO; 387 | ENABLE_STRICT_OBJC_MSGSEND = YES; 388 | GCC_C_LANGUAGE_STANDARD = gnu99; 389 | GCC_NO_COMMON_BLOCKS = YES; 390 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 392 | GCC_WARN_UNDECLARED_SELECTOR = YES; 393 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 394 | GCC_WARN_UNUSED_FUNCTION = YES; 395 | GCC_WARN_UNUSED_VARIABLE = YES; 396 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 397 | MTL_ENABLE_DEBUG_INFO = NO; 398 | SDKROOT = iphoneos; 399 | TARGETED_DEVICE_FAMILY = "1,2"; 400 | VALIDATE_PRODUCT = YES; 401 | }; 402 | name = Release; 403 | }; 404 | 324E3D441B2C632000A28F84 /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 408 | INFOPLIST_FILE = MFLTextFillLoading/Info.plist; 409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | }; 412 | name = Debug; 413 | }; 414 | 324E3D451B2C632000A28F84 /* Release */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | INFOPLIST_FILE = MFLTextFillLoading/Info.plist; 419 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | }; 422 | name = Release; 423 | }; 424 | 324E3D471B2C632000A28F84 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | BUNDLE_LOADER = "$(TEST_HOST)"; 428 | FRAMEWORK_SEARCH_PATHS = ( 429 | "$(SDKROOT)/Developer/Library/Frameworks", 430 | "$(inherited)", 431 | ); 432 | GCC_PREPROCESSOR_DEFINITIONS = ( 433 | "DEBUG=1", 434 | "$(inherited)", 435 | ); 436 | INFOPLIST_FILE = MFLTextFillLoadingTests/Info.plist; 437 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MFLTextFillLoading.app/MFLTextFillLoading"; 440 | }; 441 | name = Debug; 442 | }; 443 | 324E3D481B2C632000A28F84 /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | buildSettings = { 446 | BUNDLE_LOADER = "$(TEST_HOST)"; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(SDKROOT)/Developer/Library/Frameworks", 449 | "$(inherited)", 450 | ); 451 | INFOPLIST_FILE = MFLTextFillLoadingTests/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MFLTextFillLoading.app/MFLTextFillLoading"; 455 | }; 456 | name = Release; 457 | }; 458 | /* End XCBuildConfiguration section */ 459 | 460 | /* Begin XCConfigurationList section */ 461 | 324E3D181B2C632000A28F84 /* Build configuration list for PBXProject "MFLTextFillLoading" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 324E3D411B2C632000A28F84 /* Debug */, 465 | 324E3D421B2C632000A28F84 /* Release */, 466 | ); 467 | defaultConfigurationIsVisible = 0; 468 | defaultConfigurationName = Release; 469 | }; 470 | 324E3D431B2C632000A28F84 /* Build configuration list for PBXNativeTarget "MFLTextFillLoading" */ = { 471 | isa = XCConfigurationList; 472 | buildConfigurations = ( 473 | 324E3D441B2C632000A28F84 /* Debug */, 474 | 324E3D451B2C632000A28F84 /* Release */, 475 | ); 476 | defaultConfigurationIsVisible = 0; 477 | defaultConfigurationName = Release; 478 | }; 479 | 324E3D461B2C632000A28F84 /* Build configuration list for PBXNativeTarget "MFLTextFillLoadingTests" */ = { 480 | isa = XCConfigurationList; 481 | buildConfigurations = ( 482 | 324E3D471B2C632000A28F84 /* Debug */, 483 | 324E3D481B2C632000A28F84 /* Release */, 484 | ); 485 | defaultConfigurationIsVisible = 0; 486 | defaultConfigurationName = Release; 487 | }; 488 | /* End XCConfigurationList section */ 489 | 490 | /* Begin XCVersionGroup section */ 491 | 324E3D271B2C632000A28F84 /* MFLTextFillLoading.xcdatamodeld */ = { 492 | isa = XCVersionGroup; 493 | children = ( 494 | 324E3D281B2C632000A28F84 /* MFLTextFillLoading.xcdatamodel */, 495 | ); 496 | currentVersion = 324E3D281B2C632000A28F84 /* MFLTextFillLoading.xcdatamodel */; 497 | path = MFLTextFillLoading.xcdatamodeld; 498 | sourceTree = ""; 499 | versionGroupType = wrapper.xcdatamodel; 500 | }; 501 | /* End XCVersionGroup section */ 502 | }; 503 | rootObject = 324E3D151B2C632000A28F84 /* Project object */; 504 | } 505 | -------------------------------------------------------------------------------- /MFLTextFillLoading.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MFLTextFillLoading.xcodeproj/project.xcworkspace/xcshareddata/MFLTextFillLoading.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "FE6FCBEB9C7C1C2389D12784FC6577BDFE3E4BAF", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "F92E6A36657A88DBC266D9B8D5CB3B989B1D142F" : 0, 8 | "FE6FCBEB9C7C1C2389D12784FC6577BDFE3E4BAF" : 0 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "D6D7BEA6-CBBD-44B0-B960-C5A2ACA43EB9", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "F92E6A36657A88DBC266D9B8D5CB3B989B1D142F" : "", 13 | "FE6FCBEB9C7C1C2389D12784FC6577BDFE3E4BAF" : "MFLFillableTextLoader" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "MFLTextFillLoading", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "MFLTextFillLoading.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:MattFoley\/CrawlCreator.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "F92E6A36657A88DBC266D9B8D5CB3B989B1D142F" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:MattFoley\/MFLFillableTextLoader.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "FE6FCBEB9C7C1C2389D12784FC6577BDFE3E4BAF" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /MFLTextFillLoading/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (strong, nonatomic) UIWindow *window; 15 | 16 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; 17 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; 18 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; 19 | 20 | - (void)saveContext; 21 | - (NSURL *)applicationDocumentsDirectory; 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /MFLTextFillLoading/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. 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 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | [self saveContext]; 45 | } 46 | 47 | #pragma mark - Core Data stack 48 | 49 | @synthesize managedObjectContext = _managedObjectContext; 50 | @synthesize managedObjectModel = _managedObjectModel; 51 | @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; 52 | 53 | - (NSURL *)applicationDocumentsDirectory { 54 | // The directory the application uses to store the Core Data store file. This code uses a directory named "MFL.MFLTextFillLoading" in the application's documents directory. 55 | return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 56 | } 57 | 58 | - (NSManagedObjectModel *)managedObjectModel { 59 | // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model. 60 | if (_managedObjectModel != nil) { 61 | return _managedObjectModel; 62 | } 63 | NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MFLTextFillLoading" withExtension:@"momd"]; 64 | _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; 65 | return _managedObjectModel; 66 | } 67 | 68 | - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { 69 | // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. 70 | if (_persistentStoreCoordinator != nil) { 71 | return _persistentStoreCoordinator; 72 | } 73 | 74 | // Create the coordinator and store 75 | 76 | _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; 77 | NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"MFLTextFillLoading.sqlite"]; 78 | NSError *error = nil; 79 | NSString *failureReason = @"There was an error creating or loading the application's saved data."; 80 | if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { 81 | // Report any error we got. 82 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 83 | dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; 84 | dict[NSLocalizedFailureReasonErrorKey] = failureReason; 85 | dict[NSUnderlyingErrorKey] = error; 86 | error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; 87 | // Replace this with code to handle the error appropriately. 88 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 89 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 90 | abort(); 91 | } 92 | 93 | return _persistentStoreCoordinator; 94 | } 95 | 96 | 97 | - (NSManagedObjectContext *)managedObjectContext { 98 | // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) 99 | if (_managedObjectContext != nil) { 100 | return _managedObjectContext; 101 | } 102 | 103 | NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; 104 | if (!coordinator) { 105 | return nil; 106 | } 107 | _managedObjectContext = [[NSManagedObjectContext alloc] init]; 108 | [_managedObjectContext setPersistentStoreCoordinator:coordinator]; 109 | return _managedObjectContext; 110 | } 111 | 112 | #pragma mark - Core Data Saving support 113 | 114 | - (void)saveContext { 115 | NSManagedObjectContext *managedObjectContext = self.managedObjectContext; 116 | if (managedObjectContext != nil) { 117 | NSError *error = nil; 118 | if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { 119 | // Replace this implementation with code to handle the error appropriately. 120 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 121 | NSLog(@"Unresolved error %@, %@", error, [error userInfo]); 122 | abort(); 123 | } 124 | } 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /MFLTextFillLoading/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MFLTextFillLoading/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 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | STaR 34 | waRS 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /MFLTextFillLoading/Franklin_Gothic_Book.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/Franklin_Gothic_Book.ttf -------------------------------------------------------------------------------- /MFLTextFillLoading/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /MFLTextFillLoading/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | MFL.$(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 | UIAppFonts 26 | 27 | StarJediBig.ttf 28 | SWCrawlTitle.ttf 29 | SWCrawlBody.ttf 30 | Franklin_Gothic_Book.ttf 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UIRequiredDeviceCapabilities 37 | 38 | armv7 39 | 40 | UISupportedInterfaceOrientations 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UISupportedInterfaceOrientations~ipad 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLFillableText/MFLFillableTextLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // MFLFillableText.h 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /* 12 | 13 | Note that you can also instantiate this class from a xib. 14 | 15 | */ 16 | 17 | @interface MFLFillableTextLoader : UIView 18 | 19 | UIColor* UIColorFromRGB(unsigned int rgbValue); 20 | 21 | /** 22 | * Use this to create a loader. 23 | * 24 | * @param str String to display 25 | * @param font Font to use 26 | * @param alignment Alignment of the main label 27 | * @param frame Frame to set for loader 28 | * 29 | * @return The loader created. 30 | */ 31 | - (instancetype)initWithString:(NSString *)str 32 | font:(UIFont *)font 33 | alignment:(NSTextAlignment)alignment 34 | withFrame:(CGRect)frame; 35 | 36 | - (void)setFillableString:(NSString *)fillableString; 37 | 38 | /** 39 | * String used for fillable label 40 | */ 41 | @property (nonatomic) IBInspectable NSString *fillableString; 42 | 43 | /** 44 | * Font used for fillable label. 45 | */ 46 | @property (nonatomic) IBInspectable UIFont *fillableFont; 47 | 48 | /** 49 | * Text alignment used for fillable label 50 | */ 51 | @property (nonatomic) IBInspectable NSTextAlignment textAlignment; 52 | 53 | /** 54 | * This color will be used as the stroke and the fill color of the main label. If you don't supply colors for the progress label, it will be used there as well. 55 | * 56 | */ 57 | @property (nonatomic) IBInspectable UIColor *strokeColor; 58 | 59 | /** 60 | * Stroke size to use on fillable labels. 61 | */ 62 | @property (nonatomic) IBInspectable CGFloat strokeWidth; 63 | 64 | /** 65 | * This color will be used for the unfilled portion of the text as it fills. 66 | */ 67 | @property (nonatomic) IBInspectable UIColor *unfilledTextColor; 68 | 69 | /** 70 | * Subtitle to display, usually explains the loading. All aspects of the attributed string will be followed. 71 | */ 72 | @property (nonatomic) IBInspectable NSAttributedString *detailText; 73 | 74 | /** 75 | * Font used for displaying the progress percentage. 76 | */ 77 | @property (nonatomic) IBInspectable UIFont *progressFont; 78 | 79 | /** 80 | * Color used for progress label. 81 | */ 82 | @property (nonatomic) IBInspectable UIColor *progressColor; 83 | 84 | /** 85 | * Current progress setting, value 0.0f through 1.0f. 86 | */ 87 | @property (nonatomic) CGFloat progress; 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLFillableText/MFLFillableTextLoader.m: -------------------------------------------------------------------------------- 1 | // 2 | // MFLFillableText.m 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import "MFLFillableTextLoader.h" 10 | #import "MFLBorderLabel.h" 11 | 12 | // These two Enum types are currently not used at all. Will only fill left to right for now, and will only fill flatly. 13 | typedef NS_ENUM(NSInteger, MFLTextFillStyle) 14 | { 15 | kFillStyleFlat, 16 | kFillStyleSine 17 | }; 18 | 19 | typedef NS_ENUM(NSInteger, MFLTextFillDirection) 20 | { 21 | kFillStyleLeft, 22 | kFillStyleRight, 23 | kFillStyleUp, 24 | kFillStyleDown, 25 | }; 26 | 27 | 28 | @interface MFLFillableTextLoader () 29 | 30 | @property MFLTextFillStyle fillStyle; 31 | @property MFLTextFillDirection fillDirection; 32 | 33 | @property (weak) IBOutlet UIView *nibView; 34 | 35 | @property (weak) IBOutlet MFLBorderLabel *fillLabel; 36 | @property (weak) IBOutlet UIView *fillLabelContainer; 37 | @property (weak) IBOutlet NSLayoutConstraint *fillLabelContainerWidth; 38 | 39 | @property (weak) IBOutlet MFLBorderLabel *strokeLabel; 40 | @property (weak) IBOutlet NSLayoutConstraint *strokeTextWidth; 41 | @property (weak) IBOutlet NSLayoutConstraint *strokeTextHeight; 42 | 43 | @property (weak) IBOutlet UILabel *detailLabel; 44 | @property (weak) IBOutlet UILabel *percentLabel; 45 | 46 | @end 47 | 48 | @implementation MFLFillableTextLoader 49 | 50 | UIColor* UIColorFromRGB(unsigned int rgbValue) { 51 | return [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 52 | green:((float)((rgbValue & 0xFF00) >> 8))/255.0 53 | blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]; 54 | } 55 | 56 | - (instancetype)initWithString:(NSString *)str 57 | font:(UIFont *)font 58 | alignment:(NSTextAlignment)alignment 59 | withFrame:(CGRect)frame 60 | { 61 | self = [super initWithFrame:frame]; 62 | 63 | if (self) { 64 | _fillableString = str; 65 | _fillableFont = font; 66 | _textAlignment = alignment; 67 | 68 | [self sharedInit]; 69 | } 70 | 71 | return self; 72 | } 73 | 74 | - (id)initWithCoder:(NSCoder *)aDecoder 75 | { 76 | self = [super initWithCoder:aDecoder]; 77 | 78 | if (self) { 79 | [self sharedInit]; 80 | } 81 | 82 | return self; 83 | } 84 | 85 | - (void)sharedInit 86 | { 87 | _progress = 0; 88 | [self unwrapNib]; 89 | [self updateLabels]; 90 | } 91 | 92 | - (void)unwrapNib 93 | { 94 | [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) 95 | owner:self 96 | options:nil]; 97 | 98 | [self.nibView setTranslatesAutoresizingMaskIntoConstraints:NO]; 99 | [self setTranslatesAutoresizingMaskIntoConstraints:NO]; 100 | 101 | [self addSubview:self.nibView]; 102 | [self.nibView setFrame:self.bounds]; 103 | [self.nibView setBackgroundColor:[UIColor clearColor]]; 104 | [self setBackgroundColor:[UIColor clearColor]]; 105 | 106 | NSDictionary *views = NSDictionaryOfVariableBindings(_nibView); 107 | [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_nibView]|" 108 | options:0 109 | metrics:nil 110 | views:views]]; 111 | [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_nibView]|" 112 | options:0 113 | metrics:nil 114 | views:views]]; 115 | } 116 | 117 | - (void)updateLabels 118 | { 119 | [self.strokeLabel setStrokeColor:self.strokeColor]; 120 | [self.strokeLabel setStrokeWidth:self.strokeWidth]; 121 | [self.strokeLabel setTextColor:self.unfilledTextColor]; 122 | [self.strokeLabel setFont:self.fillableFont]; 123 | [self.strokeLabel setTextAlignment:self.textAlignment]; 124 | [self.strokeLabel setText:self.fillableString]; 125 | 126 | [self.fillLabel setTextColor:self.strokeColor]; 127 | [self.fillLabel setStrokeWidth:self.strokeWidth]; 128 | [self.fillLabel setStrokeColor:self.strokeColor]; 129 | 130 | [self.fillLabel setText:self.fillableString]; 131 | [self.fillLabel setTextAlignment:self.textAlignment]; 132 | [self.fillLabel setFont:self.fillableFont]; 133 | 134 | [self.percentLabel setTextColor:self.strokeColor]; 135 | 136 | [self.strokeTextHeight setConstant:0]; 137 | [self.strokeTextWidth setConstant:0]; 138 | 139 | [self setNeedsUpdateConstraints]; 140 | [self layoutIfNeeded]; 141 | 142 | [self.strokeTextHeight setConstant:CGRectGetHeight(self.strokeLabel.frame) + 30]; 143 | [self.strokeTextWidth setConstant:CGRectGetWidth(self.strokeLabel.frame) + 30]; 144 | 145 | [self setNeedsUpdateConstraints]; 146 | [self layoutIfNeeded]; 147 | } 148 | 149 | - (void)setDetailText:(NSAttributedString *)text 150 | { 151 | _detailText = text; 152 | 153 | [self.detailLabel setAttributedText:text]; 154 | [self setNeedsUpdateConstraints]; 155 | [self layoutIfNeeded]; 156 | } 157 | 158 | - (void)setProgressFont:(UIFont *)font 159 | { 160 | _progressFont = font; 161 | [self.percentLabel setFont:font]; 162 | } 163 | 164 | - (void)setProgressColor:(UIColor *)color 165 | { 166 | _progressColor = color; 167 | [self.percentLabel setTextColor:color]; 168 | } 169 | 170 | - (void)setFillableFont:(UIFont *)fillableFont 171 | { 172 | _fillableFont = fillableFont; 173 | [self updateLabels]; 174 | } 175 | 176 | - (void)setFillableString:(NSString *)fillableString 177 | { 178 | _fillableString = fillableString; 179 | [self updateLabels]; 180 | } 181 | 182 | - (void)setTextAlignment:(NSTextAlignment)textAlignment 183 | { 184 | _textAlignment = textAlignment; 185 | [self updateLabels]; 186 | } 187 | 188 | - (void)setStrokeColor:(UIColor *)strokeColor 189 | { 190 | _strokeColor = strokeColor; 191 | [self updateLabels]; 192 | } 193 | 194 | - (void)setStrokeWidth:(CGFloat)strokeWidth 195 | { 196 | _strokeWidth = strokeWidth; 197 | [self updateLabels]; 198 | } 199 | 200 | - (void)setProgress:(CGFloat)progress 201 | { 202 | dispatch_async(dispatch_get_main_queue(), ^{ 203 | _progress = MIN(progress, 1.0f); 204 | [self.percentLabel setText:[NSString stringWithFormat:@"%.2f%%", self.progress * 100]]; 205 | 206 | [UIView animateWithDuration:.1 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ 207 | [self.fillLabelContainerWidth setConstant:CGRectGetWidth(self.fillLabel.frame) * self.progress]; 208 | [self setNeedsUpdateConstraints]; 209 | [self layoutIfNeeded]; 210 | } completion:nil]; 211 | }); 212 | } 213 | 214 | @end 215 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLFillableText/MFLFillableTextLoader.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 37 | 45 | 57 | 58 | 59 | 60 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLFillableText/Text Paths/MFLBorderLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MFLBorderLabel.h 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MFLBorderLabel : UILabel 12 | 13 | @property IBInspectable UIColor *strokeColor; 14 | @property IBInspectable NSInteger strokeWidth; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLFillableText/Text Paths/MFLBorderLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // MFLBorderLabel.m 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import "MFLBorderLabel.h" 10 | 11 | @implementation MFLBorderLabel 12 | 13 | - (void)drawTextInRect:(CGRect)rect { 14 | 15 | CGSize shadowOffset = self.shadowOffset; 16 | UIColor *textColor = self.textColor; 17 | 18 | CGContextRef c = UIGraphicsGetCurrentContext(); 19 | CGContextSetLineWidth(c, self.strokeWidth); 20 | CGContextSetLineJoin(c, kCGLineJoinMiter); 21 | 22 | CGContextSetTextDrawingMode(c, kCGTextStroke); 23 | self.textColor = self.strokeColor; 24 | [super drawTextInRect:rect]; 25 | 26 | CGContextSetTextDrawingMode(c, kCGTextFill); 27 | self.textColor = textColor; 28 | self.shadowOffset = CGSizeMake(0, 0); 29 | [super drawTextInRect:rect]; 30 | 31 | self.shadowOffset = shadowOffset; 32 | } 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLTextFillLoading.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | MFLTextFillLoading.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /MFLTextFillLoading/MFLTextFillLoading.xcdatamodeld/MFLTextFillLoading.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /MFLTextFillLoading/SWCrawlBody.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/SWCrawlBody.ttf -------------------------------------------------------------------------------- /MFLTextFillLoading/SWCrawlTitle.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/SWCrawlTitle.ttf -------------------------------------------------------------------------------- /MFLTextFillLoading/StarJediBig.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/StarJediBig.ttf -------------------------------------------------------------------------------- /MFLTextFillLoading/Starjedi.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/Starjedi.ttf -------------------------------------------------------------------------------- /MFLTextFillLoading/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /MFLTextFillLoading/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "MFLFillableTextLoader.h" 11 | 12 | @interface ViewController () 13 | 14 | @property MFLFillableTextLoader *loader; 15 | @property (weak) IBOutlet MFLFillableTextLoader *ibLoader; 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | 25 | NSMutableParagraphStyle *para = [[NSMutableParagraphStyle alloc] init]; 26 | [para setAlignment:NSTextAlignmentCenter]; 27 | NSAttributedString *details = [[NSAttributedString alloc] initWithString:@"Never tell me the odds." 28 | attributes:@{NSFontAttributeName : [UIFont fontWithName:@"Franklin Gothic Book" size:18], 29 | NSForegroundColorAttributeName : UIColorFromRGB(0x4bd5ee), 30 | NSParagraphStyleAttributeName : para}]; 31 | 32 | self.loader = [[MFLFillableTextLoader alloc] initWithString:@"CRawL\nCreatoR" 33 | font:[UIFont fontWithName:@"StarJedi" size:28] 34 | alignment:NSTextAlignmentCenter 35 | withFrame:CGRectMake(0, 0, 320, 400)]; 36 | 37 | [self.loader setDetailText:details]; 38 | [self.loader setProgressFont:[UIFont fontWithName:@"SW Crawl Body" size:18]]; 39 | [self.loader setStrokeColor:UIColorFromRGB(0xe5b13a)]; 40 | [self.loader setStrokeWidth:4]; 41 | 42 | [self.view addSubview:self.loader]; 43 | 44 | NSDictionary *views = NSDictionaryOfVariableBindings(_loader); 45 | 46 | [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_loader]|" 47 | options:0 48 | metrics:nil 49 | views:views]]; 50 | 51 | [self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.loader 52 | attribute:NSLayoutAttributeBottom 53 | relatedBy:NSLayoutRelationEqual 54 | toItem:self.view 55 | attribute:NSLayoutAttributeBottom 56 | multiplier:1.0f 57 | constant:0.f]]; 58 | 59 | [self.loader addConstraint:[NSLayoutConstraint constraintWithItem:self.loader 60 | attribute:NSLayoutAttributeHeight 61 | relatedBy:NSLayoutRelationEqual 62 | toItem:nil 63 | attribute:NSLayoutAttributeNotAnAttribute 64 | multiplier:1.0 65 | constant:280]]; 66 | 67 | 68 | [self.ibLoader setDetailText:details]; 69 | [self.ibLoader setProgressFont:[UIFont fontWithName:@"SW Crawl Body" size:18]]; 70 | [self.ibLoader setFillableFont:[UIFont fontWithName:@"StarJedi" size:28]]; 71 | [self.ibLoader setTextAlignment:NSTextAlignmentCenter]; 72 | [self.ibLoader setStrokeColor:UIColorFromRGB(0xe5b13a)]; 73 | 74 | [self updateProgress]; 75 | [self panLoaderInFromBelow]; 76 | } 77 | 78 | - (void)updateProgress 79 | { 80 | if (self.loader.progress >= 1.0f) { 81 | [self.loader setProgress:0.0]; 82 | } 83 | 84 | [self.loader setProgress:self.loader.progress + ((arc4random() % 10) / 1000.0f)]; 85 | [self.ibLoader setProgress:self.loader.progress]; 86 | 87 | [self performSelector:@selector(updateProgress) withObject:nil afterDelay:.2]; 88 | } 89 | 90 | - (void)panLoaderInFromBelow 91 | { 92 | CATransform3D spinBlowInStart = CATransform3DIdentity; 93 | spinBlowInStart.m34 = 1.0 / -700; 94 | spinBlowInStart = CATransform3DScale(spinBlowInStart, 0.01, 0.01, -1.11); 95 | spinBlowInStart = CATransform3DTranslate(spinBlowInStart, 0, 300, 3000); 96 | spinBlowInStart = CATransform3DRotate(spinBlowInStart, 97 | 90.0f * M_PI / 155.0f, 1.0f, 0.0f, 0.0f); 98 | 99 | CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath: @"transform"]; 100 | transformAnimation.fromValue = [NSValue valueWithCATransform3D:spinBlowInStart]; 101 | transformAnimation.toValue =[NSValue valueWithCATransform3D:CATransform3DIdentity]; 102 | transformAnimation.duration = 2; 103 | [self.loader.layer addAnimation:transformAnimation forKey:@"transform"]; 104 | [self.loader.layer setZPosition:1000]; 105 | [self.loader.layer setTransform:CATransform3DIdentity]; 106 | 107 | [self.ibLoader.layer addAnimation:transformAnimation forKey:@"transform"]; 108 | [self.ibLoader.layer setZPosition:1000]; 109 | [self.ibLoader.layer setTransform:CATransform3DIdentity]; 110 | 111 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 112 | [self blowLoaderOut]; 113 | }); 114 | } 115 | 116 | - (void)blowLoaderOut 117 | { 118 | CATransform3D blowOutTransform = CATransform3DIdentity; 119 | blowOutTransform.m34 = 1.0 / -700; 120 | blowOutTransform = CATransform3DScale(blowOutTransform, 1, 0.01, 1.0); 121 | blowOutTransform = CATransform3DTranslate(blowOutTransform, 0, 300, 3000); 122 | blowOutTransform = CATransform3DRotate(blowOutTransform, 123 | 90.0f * M_PI / 155.0f, 1.0f, 0.0f, 0.0f); 124 | 125 | CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath: @"transform"]; 126 | transformAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity]; 127 | transformAnimation.toValue = [NSValue valueWithCATransform3D:blowOutTransform]; 128 | transformAnimation.duration = 1; 129 | [self.loader.layer addAnimation:transformAnimation forKey:@"transform"]; 130 | [self.loader.layer setZPosition:1000]; 131 | [self.ibLoader.layer addAnimation:transformAnimation forKey:@"transform"]; 132 | [self.ibLoader.layer setZPosition:1000]; 133 | 134 | 135 | //Set transform 136 | 137 | CATransform3D spinBlowInStart = CATransform3DIdentity; 138 | spinBlowInStart.m34 = 1.0 / -700; 139 | spinBlowInStart = CATransform3DScale(spinBlowInStart, 0.01, 0.01, -1.11); 140 | spinBlowInStart = CATransform3DTranslate(spinBlowInStart, 0, 300, 3000); 141 | spinBlowInStart = CATransform3DRotate(spinBlowInStart, 142 | 90.0f * M_PI / 155.0f, 1.0f, 0.0f, 0.0f); 143 | [self.loader.layer setTransform:spinBlowInStart]; 144 | [self.ibLoader.layer setTransform:spinBlowInStart]; 145 | 146 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 147 | [self panLoaderInFromBelow]; 148 | }); 149 | } 150 | 151 | 152 | @end 153 | -------------------------------------------------------------------------------- /MFLTextFillLoading/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MFLTextFillLoading 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. 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 | -------------------------------------------------------------------------------- /MFLTextFillLoading/starBg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MattFoley/MFLFillableTextLoader/1984abe2d1beb9f2db4cb3278a57acf44da310f3/MFLTextFillLoading/starBg.png -------------------------------------------------------------------------------- /MFLTextFillLoadingTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | MFL.$(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 | -------------------------------------------------------------------------------- /MFLTextFillLoadingTests/MFLTextFillLoadingTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MFLTextFillLoadingTests.m 3 | // MFLTextFillLoadingTests 4 | // 5 | // Created by Tj on 6/13/15. 6 | // Copyright (c) 2015 Tj. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface MFLTextFillLoadingTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation MFLTextFillLoadingTests 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MFLFillableTextLoader 2 | Loading/progress indicator based on filling stroked text. 3 | 4 | ![](http://i.imgur.com/8nVAZ6t.gif) 5 | 6 | ### Code Example 7 | You can create an MFLFillableTextLoader either in a xib or in code. Here is a short code example: 8 | 9 | ```objc 10 | 11 | //Main text that will be stroked and filled. 12 | self.loader = [[MFLFillableTextLoader alloc] initWithString:@"Loading..." 13 | font:[UIFont boldSystemFontOfSize:28] 14 | alignment:NSTextAlignmentCenter 15 | withFrame:CGRectMake(0, 0, 320, 400)]; 16 | 17 | //Subheading displayed describing load 18 | NSAttributedString *details = [[NSAttributedString alloc] initWithString:@"Never tell me the odds."]; 19 | [self.loader setDetailText:details]; 20 | 21 | //Set the font used for the percentage of the load displayed. 22 | [self.loader setProgressFont:[UIFont systemFontOfSize:18]]; 23 | 24 | //Properties used for stroking/filling the text. 25 | [self.loader setStrokeColor:UIColorFromRGB(0xe5b13a)]; 26 | [self.loader setStrokeWidth:4]; 27 | ``` 28 | 29 | ### Usage 30 | 31 | After creation, you can then add it to a UIView as a subview, and update the progress as you need to. It will automatically update it's fill. 32 | 33 | ```objc 34 | [self.view addSubview:self.loader]; 35 | [self.loader setProgress:]; 36 | ``` 37 | 38 | 39 | ### Further Customization 40 | 41 | You can find a much more detailed example in the sample project found in this repo, with examples of both xib creation and in code, as well as an example animation to use. 42 | --------------------------------------------------------------------------------