├── .gitignore ├── BFPaperTabBar.podspec ├── BFPaperTabBar.xcodeproj └── project.pbxproj ├── BFPaperTabBar.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── bence.xcuserdatad │ ├── UserInterfaceState.xcuserstate │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── BFPaperTabBar ├── BFPaperAppDelegate.h ├── BFPaperAppDelegate.m ├── BFPaperTabBar-Info.plist ├── BFPaperTabBar-Prefix.pch ├── BFPaperTabBarController.h ├── BFPaperTabBarController.m ├── Base.lproj │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── en.lproj │ └── InfoPlist.strings └── main.m ├── BFPaperTabBarDemoGif.gif ├── BFPaperTabBarTests ├── BFPaperTabBarTests-Info.plist ├── BFPaperTabBarTests.m └── en.lproj │ └── InfoPlist.strings ├── Classes ├── BFPaperTabBar.h └── BFPaperTabBar.m ├── LICENSE.md ├── Podfile ├── Podfile.lock ├── Pods ├── Headers │ ├── Private │ │ └── UIColor+BFPaperColors │ │ │ └── UIColor+BFPaperColors.h │ └── Public │ │ └── UIColor+BFPaperColors │ │ └── UIColor+BFPaperColors.h ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── Target Support Files │ ├── Pods-UIColor+BFPaperColors │ │ ├── Pods-UIColor+BFPaperColors-Private.xcconfig │ │ ├── Pods-UIColor+BFPaperColors-dummy.m │ │ ├── Pods-UIColor+BFPaperColors-prefix.pch │ │ └── Pods-UIColor+BFPaperColors.xcconfig │ └── Pods │ │ ├── Pods-acknowledgements.markdown │ │ ├── Pods-acknowledgements.plist │ │ ├── Pods-dummy.m │ │ ├── Pods-environment.h │ │ ├── Pods-resources.sh │ │ ├── Pods.debug.xcconfig │ │ └── Pods.release.xcconfig └── UIColor+BFPaperColors │ ├── LICENSE.md │ ├── README.md │ └── UIColor+BFPaperColors │ ├── UIColor+BFPaperColors.h │ └── UIColor+BFPaperColors.m ├── README.md ├── frame1.png └── set-class.png /.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 -------------------------------------------------------------------------------- /BFPaperTabBar.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "BFPaperTabBar" 3 | s.version = "1.0.6" 4 | s.summary = "iOS UITabBar inspired by Google's Paper Material Design." 5 | s.homepage = "https://github.com/bfeher/BFPaperTabBar" 6 | s.license = { :type => 'MIT', :file => 'LICENSE.md' } 7 | s.author = { "Bence Feher" => "ben.feher@gmail.com" } 8 | s.source = { :git => "https://github.com/bfeher/BFPaperTabBar.git", :tag => "1.0.6" } 9 | s.platform = :ios, '7.0' 10 | s.dependency 'UIColor+BFPaperColors' 11 | 12 | 13 | s.source_files = 'Classes/*.{h,m}' 14 | s.requires_arc = true 15 | 16 | end 17 | -------------------------------------------------------------------------------- /BFPaperTabBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 662017E80B3F42B2B7243DA1 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98ADF3E33D92424085ADAD7D /* libPods.a */; }; 11 | F4CA6F8D1988BC600027680F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6F8C1988BC600027680F /* Foundation.framework */; }; 12 | F4CA6F8F1988BC600027680F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6F8E1988BC600027680F /* CoreGraphics.framework */; }; 13 | F4CA6F911988BC600027680F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6F901988BC600027680F /* UIKit.framework */; }; 14 | F4CA6F971988BC600027680F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F4CA6F951988BC600027680F /* InfoPlist.strings */; }; 15 | F4CA6F991988BC600027680F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CA6F981988BC600027680F /* main.m */; }; 16 | F4CA6F9D1988BC600027680F /* BFPaperAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CA6F9C1988BC600027680F /* BFPaperAppDelegate.m */; }; 17 | F4CA6FA01988BC600027680F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F4CA6F9E1988BC600027680F /* Main.storyboard */; }; 18 | F4CA6FA51988BC600027680F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F4CA6FA41988BC600027680F /* Images.xcassets */; }; 19 | F4CA6FAC1988BC600027680F /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6FAB1988BC600027680F /* XCTest.framework */; }; 20 | F4CA6FAD1988BC600027680F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6F8C1988BC600027680F /* Foundation.framework */; }; 21 | F4CA6FAE1988BC600027680F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4CA6F901988BC600027680F /* UIKit.framework */; }; 22 | F4CA6FB61988BC600027680F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F4CA6FB41988BC600027680F /* InfoPlist.strings */; }; 23 | F4CA6FB81988BC600027680F /* BFPaperTabBarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CA6FB71988BC600027680F /* BFPaperTabBarTests.m */; }; 24 | F4CA6FC31988BD1B0027680F /* BFPaperTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CA6FC21988BD1B0027680F /* BFPaperTabBarController.m */; }; 25 | F4CA6FC61988D22C0027680F /* BFPaperTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = F4CA6FC51988D22C0027680F /* BFPaperTabBar.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | F4CA6FAF1988BC600027680F /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = F4CA6F811988BC600027680F /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = F4CA6F881988BC600027680F; 34 | remoteInfo = BFPaperTabBar; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 3E79B2CA149E983D950B37D4 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 40 | 98ADF3E33D92424085ADAD7D /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | AB4A16ECAE52C5D1424EA5E5 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 42 | F4CA6F891988BC600027680F /* BFPaperTabBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BFPaperTabBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | F4CA6F8C1988BC600027680F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 44 | F4CA6F8E1988BC600027680F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 45 | F4CA6F901988BC600027680F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 46 | F4CA6F941988BC600027680F /* BFPaperTabBar-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BFPaperTabBar-Info.plist"; sourceTree = ""; }; 47 | F4CA6F961988BC600027680F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 48 | F4CA6F981988BC600027680F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 49 | F4CA6F9A1988BC600027680F /* BFPaperTabBar-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BFPaperTabBar-Prefix.pch"; sourceTree = ""; }; 50 | F4CA6F9B1988BC600027680F /* BFPaperAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFPaperAppDelegate.h; sourceTree = ""; }; 51 | F4CA6F9C1988BC600027680F /* BFPaperAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BFPaperAppDelegate.m; sourceTree = ""; }; 52 | F4CA6F9F1988BC600027680F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | F4CA6FA41988BC600027680F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 54 | F4CA6FAA1988BC600027680F /* BFPaperTabBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BFPaperTabBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | F4CA6FAB1988BC600027680F /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 56 | F4CA6FB31988BC600027680F /* BFPaperTabBarTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BFPaperTabBarTests-Info.plist"; sourceTree = ""; }; 57 | F4CA6FB51988BC600027680F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 58 | F4CA6FB71988BC600027680F /* BFPaperTabBarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BFPaperTabBarTests.m; sourceTree = ""; }; 59 | F4CA6FC11988BD1B0027680F /* BFPaperTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFPaperTabBarController.h; sourceTree = ""; }; 60 | F4CA6FC21988BD1B0027680F /* BFPaperTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFPaperTabBarController.m; sourceTree = ""; }; 61 | F4CA6FC41988D22C0027680F /* BFPaperTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BFPaperTabBar.h; path = ../Classes/BFPaperTabBar.h; sourceTree = ""; }; 62 | F4CA6FC51988D22C0027680F /* BFPaperTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BFPaperTabBar.m; path = ../Classes/BFPaperTabBar.m; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | F4CA6F861988BC600027680F /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | F4CA6F8F1988BC600027680F /* CoreGraphics.framework in Frameworks */, 71 | F4CA6F911988BC600027680F /* UIKit.framework in Frameworks */, 72 | F4CA6F8D1988BC600027680F /* Foundation.framework in Frameworks */, 73 | 662017E80B3F42B2B7243DA1 /* libPods.a in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | F4CA6FA71988BC600027680F /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | F4CA6FAC1988BC600027680F /* XCTest.framework in Frameworks */, 82 | F4CA6FAE1988BC600027680F /* UIKit.framework in Frameworks */, 83 | F4CA6FAD1988BC600027680F /* Foundation.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 56ED3AF63155DE72DA89FDC5 /* Pods */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | AB4A16ECAE52C5D1424EA5E5 /* Pods.debug.xcconfig */, 94 | 3E79B2CA149E983D950B37D4 /* Pods.release.xcconfig */, 95 | ); 96 | name = Pods; 97 | sourceTree = ""; 98 | }; 99 | F42AC280198A2DE900C86DAB /* Custom TabBar Controller JUST FOR DEMO */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | F4CA6FC11988BD1B0027680F /* BFPaperTabBarController.h */, 103 | F4CA6FC21988BD1B0027680F /* BFPaperTabBarController.m */, 104 | ); 105 | name = "Custom TabBar Controller JUST FOR DEMO"; 106 | sourceTree = ""; 107 | }; 108 | F42AC281198A2E0000C86DAB /* Classes */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | F4CA6FC41988D22C0027680F /* BFPaperTabBar.h */, 112 | F4CA6FC51988D22C0027680F /* BFPaperTabBar.m */, 113 | ); 114 | name = Classes; 115 | sourceTree = ""; 116 | }; 117 | F4CA6F801988BC600027680F = { 118 | isa = PBXGroup; 119 | children = ( 120 | F4CA6F921988BC600027680F /* BFPaperTabBar */, 121 | F4CA6FB11988BC600027680F /* BFPaperTabBarTests */, 122 | F4CA6F8B1988BC600027680F /* Frameworks */, 123 | F4CA6F8A1988BC600027680F /* Products */, 124 | 56ED3AF63155DE72DA89FDC5 /* Pods */, 125 | ); 126 | sourceTree = ""; 127 | }; 128 | F4CA6F8A1988BC600027680F /* Products */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | F4CA6F891988BC600027680F /* BFPaperTabBar.app */, 132 | F4CA6FAA1988BC600027680F /* BFPaperTabBarTests.xctest */, 133 | ); 134 | name = Products; 135 | sourceTree = ""; 136 | }; 137 | F4CA6F8B1988BC600027680F /* Frameworks */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | F4CA6F8C1988BC600027680F /* Foundation.framework */, 141 | F4CA6F8E1988BC600027680F /* CoreGraphics.framework */, 142 | F4CA6F901988BC600027680F /* UIKit.framework */, 143 | F4CA6FAB1988BC600027680F /* XCTest.framework */, 144 | 98ADF3E33D92424085ADAD7D /* libPods.a */, 145 | ); 146 | name = Frameworks; 147 | sourceTree = ""; 148 | }; 149 | F4CA6F921988BC600027680F /* BFPaperTabBar */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | F42AC281198A2E0000C86DAB /* Classes */, 153 | F42AC280198A2DE900C86DAB /* Custom TabBar Controller JUST FOR DEMO */, 154 | F4CA6F9E1988BC600027680F /* Main.storyboard */, 155 | F4CA6FA41988BC600027680F /* Images.xcassets */, 156 | F4CA6F931988BC600027680F /* Supporting Files */, 157 | ); 158 | path = BFPaperTabBar; 159 | sourceTree = ""; 160 | }; 161 | F4CA6F931988BC600027680F /* Supporting Files */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | F4CA6F9B1988BC600027680F /* BFPaperAppDelegate.h */, 165 | F4CA6F9C1988BC600027680F /* BFPaperAppDelegate.m */, 166 | F4CA6F941988BC600027680F /* BFPaperTabBar-Info.plist */, 167 | F4CA6F951988BC600027680F /* InfoPlist.strings */, 168 | F4CA6F981988BC600027680F /* main.m */, 169 | F4CA6F9A1988BC600027680F /* BFPaperTabBar-Prefix.pch */, 170 | ); 171 | name = "Supporting Files"; 172 | sourceTree = ""; 173 | }; 174 | F4CA6FB11988BC600027680F /* BFPaperTabBarTests */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | F4CA6FB71988BC600027680F /* BFPaperTabBarTests.m */, 178 | F4CA6FB21988BC600027680F /* Supporting Files */, 179 | ); 180 | path = BFPaperTabBarTests; 181 | sourceTree = ""; 182 | }; 183 | F4CA6FB21988BC600027680F /* Supporting Files */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | F4CA6FB31988BC600027680F /* BFPaperTabBarTests-Info.plist */, 187 | F4CA6FB41988BC600027680F /* InfoPlist.strings */, 188 | ); 189 | name = "Supporting Files"; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXGroup section */ 193 | 194 | /* Begin PBXNativeTarget section */ 195 | F4CA6F881988BC600027680F /* BFPaperTabBar */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = F4CA6FBB1988BC600027680F /* Build configuration list for PBXNativeTarget "BFPaperTabBar" */; 198 | buildPhases = ( 199 | 7F856EBAF099439395507D16 /* Check Pods Manifest.lock */, 200 | F4CA6F851988BC600027680F /* Sources */, 201 | F4CA6F861988BC600027680F /* Frameworks */, 202 | F4CA6F871988BC600027680F /* Resources */, 203 | B1BAF1BC1DFF4919B44B00F6 /* Copy Pods Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | ); 209 | name = BFPaperTabBar; 210 | productName = BFPaperTabBar; 211 | productReference = F4CA6F891988BC600027680F /* BFPaperTabBar.app */; 212 | productType = "com.apple.product-type.application"; 213 | }; 214 | F4CA6FA91988BC600027680F /* BFPaperTabBarTests */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = F4CA6FBE1988BC600027680F /* Build configuration list for PBXNativeTarget "BFPaperTabBarTests" */; 217 | buildPhases = ( 218 | F4CA6FA61988BC600027680F /* Sources */, 219 | F4CA6FA71988BC600027680F /* Frameworks */, 220 | F4CA6FA81988BC600027680F /* Resources */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | F4CA6FB01988BC600027680F /* PBXTargetDependency */, 226 | ); 227 | name = BFPaperTabBarTests; 228 | productName = BFPaperTabBarTests; 229 | productReference = F4CA6FAA1988BC600027680F /* BFPaperTabBarTests.xctest */; 230 | productType = "com.apple.product-type.bundle.unit-test"; 231 | }; 232 | /* End PBXNativeTarget section */ 233 | 234 | /* Begin PBXProject section */ 235 | F4CA6F811988BC600027680F /* Project object */ = { 236 | isa = PBXProject; 237 | attributes = { 238 | CLASSPREFIX = BFPaper; 239 | LastUpgradeCheck = 0510; 240 | ORGANIZATIONNAME = "Bence Feher"; 241 | TargetAttributes = { 242 | F4CA6FA91988BC600027680F = { 243 | TestTargetID = F4CA6F881988BC600027680F; 244 | }; 245 | }; 246 | }; 247 | buildConfigurationList = F4CA6F841988BC600027680F /* Build configuration list for PBXProject "BFPaperTabBar" */; 248 | compatibilityVersion = "Xcode 3.2"; 249 | developmentRegion = English; 250 | hasScannedForEncodings = 0; 251 | knownRegions = ( 252 | en, 253 | Base, 254 | ); 255 | mainGroup = F4CA6F801988BC600027680F; 256 | productRefGroup = F4CA6F8A1988BC600027680F /* Products */; 257 | projectDirPath = ""; 258 | projectRoot = ""; 259 | targets = ( 260 | F4CA6F881988BC600027680F /* BFPaperTabBar */, 261 | F4CA6FA91988BC600027680F /* BFPaperTabBarTests */, 262 | ); 263 | }; 264 | /* End PBXProject section */ 265 | 266 | /* Begin PBXResourcesBuildPhase section */ 267 | F4CA6F871988BC600027680F /* Resources */ = { 268 | isa = PBXResourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | F4CA6FA51988BC600027680F /* Images.xcassets in Resources */, 272 | F4CA6F971988BC600027680F /* InfoPlist.strings in Resources */, 273 | F4CA6FA01988BC600027680F /* Main.storyboard in Resources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | F4CA6FA81988BC600027680F /* Resources */ = { 278 | isa = PBXResourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | F4CA6FB61988BC600027680F /* InfoPlist.strings in Resources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXResourcesBuildPhase section */ 286 | 287 | /* Begin PBXShellScriptBuildPhase section */ 288 | 7F856EBAF099439395507D16 /* Check Pods Manifest.lock */ = { 289 | isa = PBXShellScriptBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | ); 293 | inputPaths = ( 294 | ); 295 | name = "Check Pods Manifest.lock"; 296 | outputPaths = ( 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | shellPath = /bin/sh; 300 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 301 | showEnvVarsInLog = 0; 302 | }; 303 | B1BAF1BC1DFF4919B44B00F6 /* Copy Pods Resources */ = { 304 | isa = PBXShellScriptBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | inputPaths = ( 309 | ); 310 | name = "Copy Pods Resources"; 311 | outputPaths = ( 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | shellPath = /bin/sh; 315 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; 316 | showEnvVarsInLog = 0; 317 | }; 318 | /* End PBXShellScriptBuildPhase section */ 319 | 320 | /* Begin PBXSourcesBuildPhase section */ 321 | F4CA6F851988BC600027680F /* Sources */ = { 322 | isa = PBXSourcesBuildPhase; 323 | buildActionMask = 2147483647; 324 | files = ( 325 | F4CA6FC31988BD1B0027680F /* BFPaperTabBarController.m in Sources */, 326 | F4CA6FC61988D22C0027680F /* BFPaperTabBar.m in Sources */, 327 | F4CA6F991988BC600027680F /* main.m in Sources */, 328 | F4CA6F9D1988BC600027680F /* BFPaperAppDelegate.m in Sources */, 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | }; 332 | F4CA6FA61988BC600027680F /* Sources */ = { 333 | isa = PBXSourcesBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | F4CA6FB81988BC600027680F /* BFPaperTabBarTests.m in Sources */, 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | /* End PBXSourcesBuildPhase section */ 341 | 342 | /* Begin PBXTargetDependency section */ 343 | F4CA6FB01988BC600027680F /* PBXTargetDependency */ = { 344 | isa = PBXTargetDependency; 345 | target = F4CA6F881988BC600027680F /* BFPaperTabBar */; 346 | targetProxy = F4CA6FAF1988BC600027680F /* PBXContainerItemProxy */; 347 | }; 348 | /* End PBXTargetDependency section */ 349 | 350 | /* Begin PBXVariantGroup section */ 351 | F4CA6F951988BC600027680F /* InfoPlist.strings */ = { 352 | isa = PBXVariantGroup; 353 | children = ( 354 | F4CA6F961988BC600027680F /* en */, 355 | ); 356 | name = InfoPlist.strings; 357 | sourceTree = ""; 358 | }; 359 | F4CA6F9E1988BC600027680F /* Main.storyboard */ = { 360 | isa = PBXVariantGroup; 361 | children = ( 362 | F4CA6F9F1988BC600027680F /* Base */, 363 | ); 364 | name = Main.storyboard; 365 | sourceTree = ""; 366 | }; 367 | F4CA6FB41988BC600027680F /* InfoPlist.strings */ = { 368 | isa = PBXVariantGroup; 369 | children = ( 370 | F4CA6FB51988BC600027680F /* en */, 371 | ); 372 | name = InfoPlist.strings; 373 | sourceTree = ""; 374 | }; 375 | /* End PBXVariantGroup section */ 376 | 377 | /* Begin XCBuildConfiguration section */ 378 | F4CA6FB91988BC600027680F /* Debug */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ALWAYS_SEARCH_USER_PATHS = NO; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 389 | CLANG_WARN_EMPTY_BODY = YES; 390 | CLANG_WARN_ENUM_CONVERSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 395 | COPY_PHASE_STRIP = NO; 396 | GCC_C_LANGUAGE_STANDARD = gnu99; 397 | GCC_DYNAMIC_NO_PIC = NO; 398 | GCC_OPTIMIZATION_LEVEL = 0; 399 | GCC_PREPROCESSOR_DEFINITIONS = ( 400 | "DEBUG=1", 401 | "$(inherited)", 402 | ); 403 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 404 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 405 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 406 | GCC_WARN_UNDECLARED_SELECTOR = YES; 407 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 408 | GCC_WARN_UNUSED_FUNCTION = YES; 409 | GCC_WARN_UNUSED_VARIABLE = YES; 410 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 411 | ONLY_ACTIVE_ARCH = YES; 412 | SDKROOT = iphoneos; 413 | }; 414 | name = Debug; 415 | }; 416 | F4CA6FBA1988BC600027680F /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ALWAYS_SEARCH_USER_PATHS = NO; 420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 421 | CLANG_CXX_LIBRARY = "libc++"; 422 | CLANG_ENABLE_MODULES = YES; 423 | CLANG_ENABLE_OBJC_ARC = YES; 424 | CLANG_WARN_BOOL_CONVERSION = YES; 425 | CLANG_WARN_CONSTANT_CONVERSION = YES; 426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 427 | CLANG_WARN_EMPTY_BODY = YES; 428 | CLANG_WARN_ENUM_CONVERSION = YES; 429 | CLANG_WARN_INT_CONVERSION = YES; 430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 431 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 432 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 433 | COPY_PHASE_STRIP = YES; 434 | ENABLE_NS_ASSERTIONS = NO; 435 | GCC_C_LANGUAGE_STANDARD = gnu99; 436 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 437 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 438 | GCC_WARN_UNDECLARED_SELECTOR = YES; 439 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 440 | GCC_WARN_UNUSED_FUNCTION = YES; 441 | GCC_WARN_UNUSED_VARIABLE = YES; 442 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 443 | SDKROOT = iphoneos; 444 | VALIDATE_PRODUCT = YES; 445 | }; 446 | name = Release; 447 | }; 448 | F4CA6FBC1988BC600027680F /* Debug */ = { 449 | isa = XCBuildConfiguration; 450 | baseConfigurationReference = AB4A16ECAE52C5D1424EA5E5 /* Pods.debug.xcconfig */; 451 | buildSettings = { 452 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 453 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 454 | CODE_SIGN_IDENTITY = "iPhone Developer"; 455 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 456 | GCC_PREFIX_HEADER = "BFPaperTabBar/BFPaperTabBar-Prefix.pch"; 457 | INFOPLIST_FILE = "BFPaperTabBar/BFPaperTabBar-Info.plist"; 458 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 459 | PRODUCT_NAME = "$(TARGET_NAME)"; 460 | PROVISIONING_PROFILE = ""; 461 | WRAPPER_EXTENSION = app; 462 | }; 463 | name = Debug; 464 | }; 465 | F4CA6FBD1988BC600027680F /* Release */ = { 466 | isa = XCBuildConfiguration; 467 | baseConfigurationReference = 3E79B2CA149E983D950B37D4 /* Pods.release.xcconfig */; 468 | buildSettings = { 469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 470 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 471 | CODE_SIGN_IDENTITY = "iPhone Developer"; 472 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 473 | GCC_PREFIX_HEADER = "BFPaperTabBar/BFPaperTabBar-Prefix.pch"; 474 | INFOPLIST_FILE = "BFPaperTabBar/BFPaperTabBar-Info.plist"; 475 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | PROVISIONING_PROFILE = ""; 478 | WRAPPER_EXTENSION = app; 479 | }; 480 | name = Release; 481 | }; 482 | F4CA6FBF1988BC600027680F /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BFPaperTabBar.app/BFPaperTabBar"; 486 | FRAMEWORK_SEARCH_PATHS = ( 487 | "$(SDKROOT)/Developer/Library/Frameworks", 488 | "$(inherited)", 489 | "$(DEVELOPER_FRAMEWORKS_DIR)", 490 | ); 491 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 492 | GCC_PREFIX_HEADER = "BFPaperTabBar/BFPaperTabBar-Prefix.pch"; 493 | GCC_PREPROCESSOR_DEFINITIONS = ( 494 | "DEBUG=1", 495 | "$(inherited)", 496 | ); 497 | INFOPLIST_FILE = "BFPaperTabBarTests/BFPaperTabBarTests-Info.plist"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | TEST_HOST = "$(BUNDLE_LOADER)"; 500 | WRAPPER_EXTENSION = xctest; 501 | }; 502 | name = Debug; 503 | }; 504 | F4CA6FC01988BC600027680F /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BFPaperTabBar.app/BFPaperTabBar"; 508 | FRAMEWORK_SEARCH_PATHS = ( 509 | "$(SDKROOT)/Developer/Library/Frameworks", 510 | "$(inherited)", 511 | "$(DEVELOPER_FRAMEWORKS_DIR)", 512 | ); 513 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 514 | GCC_PREFIX_HEADER = "BFPaperTabBar/BFPaperTabBar-Prefix.pch"; 515 | INFOPLIST_FILE = "BFPaperTabBarTests/BFPaperTabBarTests-Info.plist"; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUNDLE_LOADER)"; 518 | WRAPPER_EXTENSION = xctest; 519 | }; 520 | name = Release; 521 | }; 522 | /* End XCBuildConfiguration section */ 523 | 524 | /* Begin XCConfigurationList section */ 525 | F4CA6F841988BC600027680F /* Build configuration list for PBXProject "BFPaperTabBar" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | F4CA6FB91988BC600027680F /* Debug */, 529 | F4CA6FBA1988BC600027680F /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | F4CA6FBB1988BC600027680F /* Build configuration list for PBXNativeTarget "BFPaperTabBar" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | F4CA6FBC1988BC600027680F /* Debug */, 538 | F4CA6FBD1988BC600027680F /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | F4CA6FBE1988BC600027680F /* Build configuration list for PBXNativeTarget "BFPaperTabBarTests" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | F4CA6FBF1988BC600027680F /* Debug */, 547 | F4CA6FC01988BC600027680F /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | /* End XCConfigurationList section */ 553 | }; 554 | rootObject = F4CA6F811988BC600027680F /* Project object */; 555 | } 556 | -------------------------------------------------------------------------------- /BFPaperTabBar.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BFPaperTabBar.xcworkspace/xcuserdata/bence.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperTabBar/dd31d9d072cdeabb10e6097d8987a3eedb327fe7/BFPaperTabBar.xcworkspace/xcuserdata/bence.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /BFPaperTabBar.xcworkspace/xcuserdata/bence.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 18 | 30 | 31 | 32 | 34 | 46 | 47 | 48 | 50 | 62 | 63 | 64 | 66 | 78 | 79 | 80 | 82 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperAppDelegate.h 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BFPaperAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperAppDelegate.m 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import "BFPaperAppDelegate.h" 10 | 11 | @implementation BFPaperAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // 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. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 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 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperTabBar-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.bencefeher.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 6 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperTabBar-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperTabBarController.h 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy 13 | // of this software and associated documentation files (the "Software"), to deal 14 | // in the Software without restriction, including without limitation the rights 15 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | // copies of the Software, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | // SOFTWARE. 29 | 30 | 31 | #import 32 | 33 | @interface BFPaperTabBarController : UITabBarController 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /BFPaperTabBar/BFPaperTabBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperTabBarController.m 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy 13 | // of this software and associated documentation files (the "Software"), to deal 14 | // in the Software without restriction, including without limitation the rights 15 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | // copies of the Software, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | // SOFTWARE. 29 | 30 | 31 | #import "BFPaperTabBarController.h" 32 | 33 | #import "BFPaperTabBar.h" 34 | #import "UIColor+BFPaperColors.h" 35 | 36 | 37 | 38 | 39 | 40 | @interface BFPaperTabBarController () 41 | @end 42 | 43 | @implementation BFPaperTabBarController 44 | 45 | 46 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 47 | { 48 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 49 | if (self) { 50 | // Custom initialization 51 | } 52 | return self; 53 | } 54 | 55 | - (void)viewDidLoad 56 | { 57 | [super viewDidLoad]; 58 | // Do any additional setup after loading the view. 59 | 60 | self.tabBar.tintColor = [UIColor paperColorDeepPurpleA400]; 61 | 62 | 63 | /* 64 | * Uncomment the lines below to see how you can customize the tab bar: 65 | */ 66 | // ((BFPaperTabBar *)self.tabBar).rippleFromTapLocation = NO; // YES = spawn tap-circles from tap locaiton. NO = spawn tap-circles from the center of the tab. 67 | 68 | // ((BFPaperTabBar *)self.tabBar).usesSmartColor = NO; // YES = colors are chosen from the tabBar.tintColor. NO = colors will be shades of gray. 69 | 70 | // ((BFPaperTabBar *)self.tabBar).tapCircleColor = [[UIColor paperColorLightBlue] colorWithAlphaComponent:0.2]; // Set this to customize the tap-circle color. 71 | 72 | // ((BFPaperTabBar *)self.tabBar).backgroundFadeColor = [UIColor paperColorGreen800]; // Set this to customize the background fade color. 73 | 74 | // ((BFPaperTabBar *)self.tabBar).tapCircleDiameter = bfPaperTabBar_tapCircleDiameterLarge; // Set this to customize the tap-circle diameter. 75 | 76 | // ((BFPaperTabBar *)self.tabBar).underlineColor = [UIColor paperColorDeepPurpleA400]; // Set this to customize the color of the underline which highlights the currently selected tab. 77 | 78 | // ((BFPaperTabBar *)self.tabBar).showUnderline = NO; // YES = show the underline bar, NO = hide the underline bar. 79 | 80 | // ((BFPaperTabBar *)self.tabBar).underlineThickness = 2.f; // Set this to adjust the thickness (height) of the underline bar. Not that any value greater than 1 could cover up parts of the TabBarItem's title. 81 | 82 | // ((BFPaperTabBar *)self.tabBar).showTapCircleAndBackgroundFade = NO; // YES = show the tap-circles and add a color fade the background. NO = do not show the tap-circles and background fade. 83 | } 84 | 85 | - (void)viewWillAppear:(BOOL)animated 86 | { 87 | [super viewWillAppear:animated]; 88 | } 89 | 90 | - (void)didReceiveMemoryWarning 91 | { 92 | [super didReceiveMemoryWarning]; 93 | // Dispose of any resources that can be recreated. 94 | } 95 | 96 | /* 97 | #pragma mark - Navigation 98 | 99 | // In a storyboard-based application, you will often want to do a little preparation before navigation 100 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 101 | { 102 | // Get the new view controller using [segue destinationViewController]. 103 | // Pass the selected object to the new view controller. 104 | } 105 | */ 106 | 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /BFPaperTabBar/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 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 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | -------------------------------------------------------------------------------- /BFPaperTabBar/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" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /BFPaperTabBar/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /BFPaperTabBar/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BFPaperTabBar/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "BFPaperAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([BFPaperAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BFPaperTabBarDemoGif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperTabBar/dd31d9d072cdeabb10e6097d8987a3eedb327fe7/BFPaperTabBarDemoGif.gif -------------------------------------------------------------------------------- /BFPaperTabBarTests/BFPaperTabBarTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.bencefeher.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /BFPaperTabBarTests/BFPaperTabBarTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperTabBarTests.m 3 | // BFPaperTabBarTests 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BFPaperTabBarTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BFPaperTabBarTests 16 | 17 | - (void)setUp 18 | { 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 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /BFPaperTabBarTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Classes/BFPaperTabBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperTabBar.h 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy 13 | // of this software and associated documentation files (the "Software"), to deal 14 | // in the Software without restriction, including without limitation the rights 15 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | // copies of the Software, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | // SOFTWARE. 29 | 30 | 31 | #import 32 | 33 | // Nice circle diameter constants: 34 | static CGFloat const bfPaperTabBar_tapCircleDiameterMedium = 200.f; 35 | static CGFloat const bfPaperTabBar_tapCircleDiameterSmall = bfPaperTabBar_tapCircleDiameterMedium / 2.f; 36 | static CGFloat const bfPaperTabBar_tapCircleDiameterLarge = bfPaperTabBar_tapCircleDiameterMedium * 1.8f; 37 | static CGFloat const bfPaperTabBar_tapCircleDiameterDefault = -1.f; 38 | 39 | 40 | @interface BFPaperTabBar : UITabBar 41 | 42 | 43 | /** A flag to set to YES to use Smart Color, or NO to use a custom color scheme. While Smart Color is the default (usesSmartColor = YES), customization is cool too. */ 44 | @property (nonatomic) BOOL usesSmartColor; 45 | 46 | /** The UIColor to use for the circle which appears where you tap. NOTE: Setting this defeats the "Smart Color" ability of the tap circle. Alpha values less than 1 are recommended. */ 47 | @property UIColor *tapCircleColor; 48 | 49 | /** The UIColor to fade clear backgrounds to. NOTE: Setting this defeats the "Smart Color" ability of the background fade. An alpha value of 1 is recommended, as the fade is a constant (clearBGFadeConstant) defined in the BFPaperTabBar.m. This bothers me too. */ 50 | @property UIColor *backgroundFadeColor; 51 | 52 | /** A flag to set to YES to have the tap-circle ripple from point of touch. If this is set to NO, the tap-circle will always ripple from the center of the tab. Default is YES. */ 53 | @property BOOL rippleFromTapLocation; 54 | 55 | /** The CGFloat value representing the Diameter of the tap-circle. By default it will be the result of MAX(self.frame.width, self.frame.height). Any value less than zero will result in default being used. The constants: tapCircleDiameterLarge, tapCircleDiameterMedium, and tapCircleDiameterSmall are also available for use. */ 56 | @property CGFloat tapCircleDiameter; 57 | 58 | /** The UIColor to use for the underline below the currently selected tab. NOTE: Setting this defeats the "Smart Color" ability of this underline. */ 59 | @property UIColor *underlineColor; 60 | 61 | /** The CGFLoat to set the thickness (height) of the underline. NOTE: Any value greater than 1 will cover up the bottoms of low-hanging letters of a default TabBarItem's title. */ 62 | @property CGFloat underlineThickness; 63 | 64 | /** A flag to set to YES to show an underline bar that tracks the currently selected tab. */ 65 | @property (nonatomic) BOOL showUnderline; 66 | 67 | /** A flag to set to YES to show the tap-circle and background fade. If NO, they will not appear. */ 68 | @property BOOL showTapCircleAndBackgroundFade; 69 | 70 | @end 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Classes/BFPaperTabBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperTabBar.m 3 | // BFPaperTabBar 4 | // 5 | // Created by Bence Feher on 7/30/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy 13 | // of this software and associated documentation files (the "Software"), to deal 14 | // in the Software without restriction, including without limitation the rights 15 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 | // copies of the Software, and to permit persons to whom the Software is 17 | // furnished to do so, subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | // SOFTWARE. 29 | 30 | 31 | #import "BFPaperTabBar.h" 32 | 33 | @interface BFPaperTabBar () 34 | @property CALayer *backgroundColorFadeLayer; 35 | @property BOOL growthFinished; 36 | @property NSMutableArray *rippleAnimationQueue; 37 | @property CGPoint tapPoint; 38 | @property NSInteger selectedTabIndex; 39 | @property CALayer *underlineLayer; 40 | @end 41 | 42 | 43 | @implementation BFPaperTabBar 44 | static dispatch_once_t oncePredicate; // Used for initializing tab touch gesture recognizers only once. 45 | // Constants used for tweaking the look/feel of: 46 | // -animation durations: 47 | static CGFloat const bfPaperTabBar_animationDurationConstant = 0.2f; 48 | static CGFloat const bfPaperTabBar_tapCircleGrowthDurationConstant = bfPaperTabBar_animationDurationConstant * 2; 49 | // -the tap-circle's size: 50 | static CGFloat const bfPaperTabBar_tapCircleDiameterStartValue = 5.f; // for the mask 51 | // -the tap-circle's beauty: 52 | static CGFloat const bfPaperTabBar_tapFillConstant = 0.16f; 53 | static CGFloat const bfPaperTabBar_backgroundFadeConstant = 0.12f; 54 | // -the bg fade box and underline's padding: 55 | #define BFPAPERTABBAR__PADDING CGPointMake(2.f, 1.f) // This should probably be left alone. Though the values in the range ([0, 2], [0 1]) all work and change the look a bit. 56 | // - Default colors: 57 | #define BFPAPERTABBAR__DUMB_TAP_FILL_COLOR [UIColor colorWithWhite:0.1 alpha:bfPaperTabBar_tapFillConstant] 58 | #define BFPAPERTABBAR__DUMB_BG_FADE_COLOR [UIColor colorWithWhite:0.3 alpha:1] 59 | 60 | 61 | 62 | #pragma mark - Default Initializers 63 | - (id)initWithFrame:(CGRect)frame 64 | { 65 | self = [super initWithFrame:frame]; 66 | if (self) { 67 | // Initialization code 68 | [self setup]; 69 | } 70 | return self; 71 | } 72 | 73 | - (id)initWithCoder:(NSCoder *)aDecoder 74 | { 75 | self = [super initWithCoder:aDecoder]; 76 | if (self) { 77 | // Initialization code 78 | [self setup]; 79 | } 80 | return self; 81 | } 82 | 83 | - (id)init 84 | { 85 | self = [super init]; 86 | if (self) { 87 | // Initialization code 88 | [self setup]; 89 | } 90 | return self; 91 | } 92 | 93 | 94 | #pragma mark - Parent Overrides 95 | - (void)setSelectedItem:(UITabBarItem *)selectedItem 96 | { 97 | [super setSelectedItem:selectedItem]; 98 | 99 | //NSLog(@"chose index %d", selectedItem.tag); 100 | if (self.showUnderline) { 101 | [self setUnderlineForTabIndex:selectedItem.tag animated:NO]; 102 | } 103 | } 104 | 105 | - (BOOL)endCustomizingAnimated:(BOOL)animated 106 | { 107 | // Re-tag each bar item: 108 | [self indexTabs]; 109 | return [super endCustomizingAnimated:animated]; 110 | } 111 | 112 | -(void)layoutSublayersOfLayer:(CALayer *)layer 113 | { 114 | [super layoutSublayersOfLayer:layer]; 115 | 116 | if (self.showUnderline) { 117 | [self setUnderlineForTabIndex:self.selectedTabIndex animated:YES]; 118 | } 119 | } 120 | 121 | - (void)layoutSubviews 122 | { 123 | [super layoutSubviews]; 124 | 125 | dispatch_once(&oncePredicate, ^{ 126 | // Add gesture recognizers to each tabBarItem's view and tag them: 127 | [self addGestureRecognizerToTabs]; 128 | }); 129 | } 130 | 131 | /* 132 | // Only override drawRect: if you perform custom drawing. 133 | // An empty implementation adversely affects performance during animation. 134 | - (void)drawRect:(CGRect)rect 135 | { 136 | // Drawing code 137 | } 138 | */ 139 | 140 | 141 | #pragma mark - Setters and Getters 142 | - (void)setShowUnderline:(BOOL)showUnderline 143 | { 144 | if (_showUnderline != showUnderline) { 145 | _showUnderline = showUnderline; 146 | 147 | if (!_showUnderline) { 148 | [self.underlineLayer removeFromSuperlayer]; 149 | } 150 | else if (!self.underlineLayer) { 151 | CGFloat y = (self.underlineThickness <= 1) ? self.bounds.size.height : self.bounds.size.height - (self.underlineThickness / 2); 152 | self.underlineLayer = [CALayer layer]; 153 | self.underlineLayer.frame = CGRectMake(self.bounds.origin.x, y, self.bounds.size.width, self.underlineThickness); 154 | [self.layer addSublayer:self.underlineLayer]; 155 | [self setUnderlineForTabIndex:0 animated:NO]; 156 | } 157 | } 158 | } 159 | 160 | 161 | #pragma mark - Setup 162 | - (void)setup 163 | { 164 | // self.paperDelegate = [[BFPaperTabBarDelegate alloc] init]; 165 | // self.delegate = self.paperDelegate; 166 | 167 | 168 | // Defaults: 169 | self.usesSmartColor = YES; 170 | self.tapCircleDiameter = -1.f; 171 | self.rippleFromTapLocation = YES; 172 | self.showUnderline = YES; 173 | self.underlineThickness = 1.f; 174 | self.showTapCircleAndBackgroundFade = YES; 175 | 176 | self.rippleAnimationQueue = [NSMutableArray array]; 177 | 178 | [self setBackgroundFadeLayerForTabAtIndex:0]; 179 | 180 | [self setUnderlineForTabIndex:0 animated:NO]; 181 | 182 | self.layer.masksToBounds = YES; 183 | self.clipsToBounds = YES; 184 | 185 | self.tapCircleColor = nil; 186 | self.backgroundFadeColor = nil; 187 | self.underlineColor = nil; 188 | } 189 | 190 | - (void)setBackgroundFadeLayerForTabAtIndex:(NSInteger)index 191 | { 192 | [self.backgroundColorFadeLayer removeFromSuperlayer]; 193 | 194 | UIView *tab = [self viewForTabBarItemAtIndex:index]; 195 | 196 | CGFloat x = tab.bounds.origin.x; 197 | CGFloat y = tab.bounds.origin.y - BFPAPERTABBAR__PADDING.y; 198 | CGFloat w = tab.frame.size.width; 199 | CGFloat h = tab.frame.size.height + BFPAPERTABBAR__PADDING.y; 200 | if (index == self.items.count - 1) { 201 | // Last tab, so we extend the underline's width a bit to reach the right end of the screen. 202 | w = w + BFPAPERTABBAR__PADDING.x; 203 | } 204 | else if (index == 0) { 205 | // First tab, so we extend the width a bit and shift the x origin to reach the left end of the screen. 206 | x = x - BFPAPERTABBAR__PADDING.x; 207 | w = w + BFPAPERTABBAR__PADDING.x; 208 | } 209 | else { 210 | // Middle ones should stretch out to their neighbors: 211 | x = x - (BFPAPERTABBAR__PADDING.x * 2); 212 | w = w + (BFPAPERTABBAR__PADDING.x * 4); 213 | } 214 | 215 | 216 | CGRect endRect = CGRectMake(x, y , w, h); 217 | 218 | self.backgroundColorFadeLayer = [[CALayer alloc] init]; 219 | self.backgroundColorFadeLayer.frame = endRect; 220 | self.backgroundColorFadeLayer.backgroundColor = [UIColor clearColor].CGColor; 221 | [tab.layer insertSublayer:self.backgroundColorFadeLayer atIndex:0]; 222 | } 223 | 224 | - (void)setUnderlineForTabIndex:(NSInteger)index animated:(BOOL)animated 225 | { 226 | CGFloat duration = animated ? bfPaperTabBar_animationDurationConstant : 0.f; 227 | 228 | UIView *tab = [self viewForTabBarItemAtIndex:index]; 229 | 230 | UIColor *bgColor = self.underlineColor; 231 | if (!bgColor) { 232 | bgColor = self.usesSmartColor ? self.tintColor : [BFPAPERTABBAR__DUMB_TAP_FILL_COLOR colorWithAlphaComponent:1.f]; 233 | } 234 | self.underlineLayer.backgroundColor = bgColor.CGColor; 235 | CGFloat x = tab.frame.origin.x; 236 | CGFloat y = (self.underlineThickness <= 1) ? tab.bounds.size.height : tab.bounds.size.height - (self.underlineThickness / 2); 237 | CGFloat w = tab.frame.size.width; 238 | 239 | if (index == self.items.count - 1) { 240 | // Last tab, so we extend the underline's width a bit to reach the right end of the screen. 241 | w = w + BFPAPERTABBAR__PADDING.x; 242 | } 243 | else if (index == 0) { 244 | // First tab, so we extend the width a bit and shift the x origin to reach the left end of the screen. 245 | x = x - BFPAPERTABBAR__PADDING.x; 246 | w = w + BFPAPERTABBAR__PADDING.x; 247 | } 248 | else { 249 | // Middle ones should stretch out to their neighbors: 250 | x = x - (BFPAPERTABBAR__PADDING.x * 2); 251 | w = w + (BFPAPERTABBAR__PADDING.x * 4); 252 | } 253 | 254 | 255 | [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 256 | self.underlineLayer.frame = CGRectMake(x, y, w, self.underlineThickness); 257 | } completion:^(BOOL finished) { 258 | }]; 259 | } 260 | 261 | 262 | - (void)addGestureRecognizerToTabs 263 | { 264 | for (int i = 0; i < self.items.count; i++) { 265 | ((UITabBarItem *)[self.items objectAtIndex:i]).tag = i; 266 | UIView *tabView = [self viewForTabBarItemAtIndex:i]; 267 | tabView.tag = i; 268 | 269 | //NSLog(@"adding GR to tab %@ (%d)", ((UITabBarItem *)[self.items objectAtIndex:i]).title, i); 270 | UILongPressGestureRecognizer *press = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; 271 | press.delegate = self; 272 | press.delaysTouchesEnded = NO; 273 | press.delaysTouchesBegan = NO; 274 | press.cancelsTouchesInView = NO; 275 | press.minimumPressDuration = 0; 276 | [tabView addGestureRecognizer:press]; 277 | press = nil; 278 | } 279 | } 280 | 281 | - (void)indexTabs 282 | { 283 | for (int i = 0; i < self.items.count; i++) { 284 | UITabBarItem *tab = [self.items objectAtIndex:i]; 285 | //NSLog(@"applying index %d to %@", i, tab.title); 286 | tab.tag = i; 287 | UIView *tabView = [self viewForTabBarItemAtIndex:i]; 288 | tabView.tag = i; 289 | } 290 | } 291 | 292 | 293 | #pragma mark - Gesture Recognizer Handlers 294 | - (void)handleLongPress:(UILongPressGestureRecognizer *)longPress 295 | { 296 | if (longPress.state == UIGestureRecognizerStateBegan) { 297 | // Draw tap-circle: 298 | 299 | self.selectedTabIndex = longPress.view.tag; 300 | 301 | self.tapPoint = [longPress locationInView:[self viewForTabBarItemAtIndex:self.selectedTabIndex]]; 302 | 303 | if (self.showTapCircleAndBackgroundFade) { 304 | [self growTapCircle]; 305 | } 306 | } 307 | else if (longPress.state == UIGestureRecognizerStateEnded 308 | || 309 | longPress.state == UIGestureRecognizerStateCancelled 310 | || 311 | longPress.state == UIGestureRecognizerStateFailed) { 312 | // Remove tap-circle: 313 | 314 | if (self.showTapCircleAndBackgroundFade) { 315 | if (self.growthFinished) { 316 | [self growTapCircleABit]; 317 | } 318 | [self fadeTapCircleOut]; 319 | [self fadeBackgroundOut]; 320 | } 321 | } 322 | } 323 | 324 | 325 | #pragma mark - Gesture Recognizer Delegate 326 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer 327 | { 328 | return YES; 329 | } 330 | #pragma mark - 331 | 332 | 333 | - (UIView *)viewForTabBarItemAtIndex:(NSInteger)index 334 | { 335 | 336 | CGRect tabBarRect = self.frame; 337 | NSInteger buttonCount = self.items.count; 338 | CGFloat containingWidth = tabBarRect.size.width / buttonCount; 339 | CGFloat originX = containingWidth * index ; 340 | CGRect containingRect = CGRectMake( originX, 0, containingWidth, self.frame.size.height ); 341 | CGPoint center = CGPointMake( CGRectGetMidX(containingRect), CGRectGetMidY(containingRect)); 342 | 343 | return [self hitTest:center withEvent:nil]; 344 | } 345 | 346 | 347 | #pragma mark - Animation 348 | - (void)growTapCircle 349 | { 350 | //NSLog(@"expanding a tap circle"); 351 | 352 | // Spawn a growing circle that "ripples" through the button: 353 | 354 | UIView *tab = [self viewForTabBarItemAtIndex:self.selectedTabIndex]; 355 | 356 | CGFloat x = tab.bounds.origin.x; 357 | CGFloat y = tab.bounds.origin.y - BFPAPERTABBAR__PADDING.y; 358 | CGFloat w = tab.frame.size.width; 359 | CGFloat h = tab.frame.size.height + BFPAPERTABBAR__PADDING.y; 360 | if (self.selectedTabIndex == self.items.count - 1) { 361 | // Last tab, so we extend the underline's width a bit to reach the right end of the screen. 362 | w = w + BFPAPERTABBAR__PADDING.x; 363 | } 364 | else if (self.selectedTabIndex == 0) { 365 | // First tab, so we extend the width a bit and shift the x origin to reach the left end of the screen. 366 | x = x - BFPAPERTABBAR__PADDING.x; 367 | w = w + BFPAPERTABBAR__PADDING.x; 368 | } 369 | else { 370 | // Middle ones should stretch out to their neighbors: 371 | x = x - (BFPAPERTABBAR__PADDING.x * 2); 372 | w = w + (BFPAPERTABBAR__PADDING.x * 4); 373 | } 374 | 375 | 376 | CGRect endRect = CGRectMake(x, y , w, h); 377 | 378 | 379 | CALayer *tempAnimationLayer = [CALayer new]; 380 | tempAnimationLayer.frame = endRect; 381 | tempAnimationLayer.cornerRadius = tab.layer.cornerRadius; 382 | 383 | 384 | // Set the fill color for the tap circle (self.animationLayer's fill color): 385 | if (!self.tapCircleColor) { 386 | self.tapCircleColor = self.usesSmartColor ? [self.tintColor colorWithAlphaComponent:bfPaperTabBar_tapFillConstant] : BFPAPERTABBAR__DUMB_TAP_FILL_COLOR; 387 | } 388 | 389 | if (!self.backgroundFadeColor) { 390 | self.backgroundFadeColor = self.usesSmartColor ? self.tintColor : BFPAPERTABBAR__DUMB_BG_FADE_COLOR; 391 | } 392 | 393 | // Setup background fade layer: 394 | [self setBackgroundFadeLayerForTabAtIndex:self.selectedTabIndex]; 395 | self.backgroundColorFadeLayer.backgroundColor = self.backgroundFadeColor.CGColor; 396 | 397 | // Fade the background color a bit darker: 398 | CABasicAnimation *fadeBackgroundDarker = [CABasicAnimation animationWithKeyPath:@"opacity"]; 399 | fadeBackgroundDarker.duration = bfPaperTabBar_animationDurationConstant; 400 | fadeBackgroundDarker.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 401 | fadeBackgroundDarker.fromValue = [NSNumber numberWithFloat:0.f]; 402 | fadeBackgroundDarker.toValue = [NSNumber numberWithFloat:bfPaperTabBar_backgroundFadeConstant]; 403 | fadeBackgroundDarker.fillMode = kCAFillModeForwards; 404 | fadeBackgroundDarker.removedOnCompletion = NO; 405 | 406 | [self.backgroundColorFadeLayer addAnimation:fadeBackgroundDarker forKey:@"animateOpacity"]; 407 | 408 | // Set animation layer's background color: 409 | tempAnimationLayer.backgroundColor = self.tapCircleColor.CGColor; 410 | tempAnimationLayer.borderColor = [UIColor clearColor].CGColor; 411 | tempAnimationLayer.borderWidth = 0; 412 | 413 | 414 | // Animation Mask Rects 415 | CGPoint origin = self.rippleFromTapLocation ? self.tapPoint : CGPointMake(CGRectGetMidX(tab.bounds), CGRectGetMidY(tab.bounds)); 416 | //NSLog(@"self.center: (x%0.2f, y%0.2f)", self.center.x, self.center.y); 417 | UIBezierPath *startingTapCirclePath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(origin.x - (bfPaperTabBar_tapCircleDiameterStartValue / 2.f), origin.y - (bfPaperTabBar_tapCircleDiameterStartValue / 2.f), bfPaperTabBar_tapCircleDiameterStartValue, bfPaperTabBar_tapCircleDiameterStartValue) cornerRadius:bfPaperTabBar_tapCircleDiameterStartValue / 2.f]; 418 | 419 | CGFloat tapCircleDiameterEndValue = (self.tapCircleDiameter < 0) ? MAX(tab.frame.size.width, tab.frame.size.height) : self.tapCircleDiameter; 420 | UIBezierPath *endTapCirclePath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(origin.x - (tapCircleDiameterEndValue/ 2.f), origin.y - (tapCircleDiameterEndValue/ 2.f), tapCircleDiameterEndValue, tapCircleDiameterEndValue) cornerRadius:tapCircleDiameterEndValue/ 2.f]; 421 | 422 | // Animation Mask Layer: 423 | CAShapeLayer *animationMaskLayer = [CAShapeLayer layer]; 424 | animationMaskLayer.path = endTapCirclePath.CGPath; 425 | animationMaskLayer.fillColor = [UIColor blackColor].CGColor; 426 | animationMaskLayer.strokeColor = [UIColor clearColor].CGColor; 427 | animationMaskLayer.borderColor = [UIColor clearColor].CGColor; 428 | animationMaskLayer.borderWidth = 0; 429 | 430 | tempAnimationLayer.mask = animationMaskLayer; 431 | 432 | // Grow tap-circle animation: 433 | CABasicAnimation *tapCircleGrowthAnimation = [CABasicAnimation animationWithKeyPath:@"path"]; 434 | tapCircleGrowthAnimation.delegate = self; 435 | [tapCircleGrowthAnimation setValue:@"tapGrowth" forKey:@"id"]; 436 | [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:)]; 437 | tapCircleGrowthAnimation.duration = bfPaperTabBar_tapCircleGrowthDurationConstant; 438 | tapCircleGrowthAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 439 | tapCircleGrowthAnimation.fromValue = (__bridge id)startingTapCirclePath.CGPath; 440 | tapCircleGrowthAnimation.toValue = (__bridge id)endTapCirclePath.CGPath; 441 | tapCircleGrowthAnimation.fillMode = kCAFillModeForwards; 442 | tapCircleGrowthAnimation.removedOnCompletion = NO; 443 | 444 | // Fade in self.animationLayer: 445 | CABasicAnimation *fadeIn = [CABasicAnimation animationWithKeyPath:@"opacity"]; 446 | fadeIn.duration = bfPaperTabBar_animationDurationConstant; 447 | fadeIn.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 448 | fadeIn.fromValue = [NSNumber numberWithFloat:0.f]; 449 | fadeIn.toValue = [NSNumber numberWithFloat:1.f]; 450 | fadeIn.fillMode = kCAFillModeForwards; 451 | fadeIn.removedOnCompletion = NO; 452 | 453 | 454 | // Add the animation layer to our animation queue and insert it into our view: 455 | [self.rippleAnimationQueue addObject:tempAnimationLayer]; 456 | [tab.layer insertSublayer:tempAnimationLayer above:self.backgroundColorFadeLayer]; 457 | 458 | [animationMaskLayer addAnimation:tapCircleGrowthAnimation forKey:@"animatePath"]; 459 | [tempAnimationLayer addAnimation:fadeIn forKey:@"opacityAnimation"]; 460 | } 461 | 462 | 463 | - (void)animationDidStop:(CAAnimation *)theAnimation2 finished:(BOOL)flag 464 | { 465 | //NSLog(@"animation ENDED"); 466 | self.growthFinished = YES; 467 | } 468 | 469 | 470 | - (void)fadeBackgroundOut 471 | { 472 | // NSLog(@"fading bg"); 473 | 474 | // Remove darkened background fade: 475 | CABasicAnimation *removeFadeBackgroundDarker = [CABasicAnimation animationWithKeyPath:@"opacity"]; 476 | removeFadeBackgroundDarker.duration = bfPaperTabBar_animationDurationConstant; 477 | removeFadeBackgroundDarker.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 478 | removeFadeBackgroundDarker.fromValue = [NSNumber numberWithFloat:bfPaperTabBar_backgroundFadeConstant]; 479 | removeFadeBackgroundDarker.toValue = [NSNumber numberWithFloat:0.f]; 480 | removeFadeBackgroundDarker.fillMode = kCAFillModeForwards; 481 | removeFadeBackgroundDarker.removedOnCompletion = NO; 482 | 483 | [self.backgroundColorFadeLayer addAnimation:removeFadeBackgroundDarker forKey:@"removeBGShade"]; 484 | } 485 | 486 | 487 | - (void)growTapCircleABit 488 | { 489 | //NSLog(@"expanding a bit more"); 490 | 491 | UIView *tab = [self viewForTabBarItemAtIndex:self.selectedTabIndex]; 492 | 493 | CALayer *tempAnimationLayer = [self.rippleAnimationQueue firstObject]; 494 | 495 | // Animation Mask Rects 496 | CGFloat newTapCircleStartValue = (self.tapCircleDiameter < 0) ? MAX(tab.frame.size.width, tab.frame.size.height) : self.tapCircleDiameter; 497 | 498 | CGPoint origin = self.rippleFromTapLocation ? self.tapPoint : CGPointMake(CGRectGetMidX(tab.bounds), CGRectGetMidY(tab.bounds)); 499 | UIBezierPath *startingTapCirclePath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(origin.x - (newTapCircleStartValue / 2.f), origin.y - (newTapCircleStartValue / 2.f), newTapCircleStartValue, newTapCircleStartValue) cornerRadius:newTapCircleStartValue / 2.f]; 500 | 501 | CGFloat tapCircleDiameterEndValue = (self.tapCircleDiameter < 0) ? MAX(tab.frame.size.width, tab.frame.size.height) : self.tapCircleDiameter; 502 | tapCircleDiameterEndValue += 40.f; 503 | UIBezierPath *endTapCirclePath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(origin.x - (tapCircleDiameterEndValue/ 2.f), origin.y - (tapCircleDiameterEndValue/ 2.f), tapCircleDiameterEndValue, tapCircleDiameterEndValue) cornerRadius:tapCircleDiameterEndValue/ 2.f]; 504 | 505 | // Animation Mask Layer: 506 | CAShapeLayer *animationMaskLayer = [CAShapeLayer layer]; 507 | animationMaskLayer.path = endTapCirclePath.CGPath; 508 | animationMaskLayer.fillColor = [UIColor blackColor].CGColor; 509 | animationMaskLayer.strokeColor = [UIColor clearColor].CGColor; 510 | animationMaskLayer.borderColor = [UIColor clearColor].CGColor; 511 | animationMaskLayer.borderWidth = 0; 512 | 513 | tempAnimationLayer.mask = animationMaskLayer; 514 | 515 | // Grow tap-circle animation: 516 | CABasicAnimation *tapCircleGrowthAnimation = [CABasicAnimation animationWithKeyPath:@"path"]; 517 | tapCircleGrowthAnimation.duration = bfPaperTabBar_tapCircleGrowthDurationConstant; 518 | tapCircleGrowthAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 519 | tapCircleGrowthAnimation.fromValue = (__bridge id)startingTapCirclePath.CGPath; 520 | tapCircleGrowthAnimation.toValue = (__bridge id)endTapCirclePath.CGPath; 521 | tapCircleGrowthAnimation.fillMode = kCAFillModeForwards; 522 | tapCircleGrowthAnimation.removedOnCompletion = NO; 523 | 524 | [animationMaskLayer addAnimation:tapCircleGrowthAnimation forKey:@"animatePath"]; 525 | } 526 | 527 | 528 | - (void)fadeTapCircleOut 529 | { 530 | //NSLog(@"Fading away"); 531 | 532 | CALayer *tempAnimationLayer = [self.rippleAnimationQueue firstObject]; 533 | [self.rippleAnimationQueue removeObjectAtIndex:0]; 534 | 535 | CABasicAnimation *fadeOut = [CABasicAnimation animationWithKeyPath:@"opacity"]; 536 | fadeOut.fromValue = [NSNumber numberWithFloat:tempAnimationLayer.opacity]; 537 | fadeOut.toValue = [NSNumber numberWithFloat:0.f]; 538 | fadeOut.duration = bfPaperTabBar_tapCircleGrowthDurationConstant; 539 | fadeOut.fillMode = kCAFillModeForwards; 540 | fadeOut.removedOnCompletion = NO; 541 | 542 | [tempAnimationLayer addAnimation:fadeOut forKey:@"opacityAnimation"]; 543 | } 544 | #pragma mark - 545 | 546 | @end 547 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © (c) 2015 Bence Feher 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 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform:ios, '7.0' 2 | pod 'UIColor+BFPaperColors', :head -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - UIColor+BFPaperColors (HEAD based on 1.5.1) 3 | 4 | DEPENDENCIES: 5 | - UIColor+BFPaperColors (HEAD) 6 | 7 | SPEC CHECKSUMS: 8 | UIColor+BFPaperColors: 4b2baddaef5bee61159068b5cca5b765e5e58a08 9 | 10 | COCOAPODS: 0.36.3 11 | -------------------------------------------------------------------------------- /Pods/Headers/Private/UIColor+BFPaperColors/UIColor+BFPaperColors.h: -------------------------------------------------------------------------------- 1 | ../../../UIColor+BFPaperColors/UIColor+BFPaperColors/UIColor+BFPaperColors.h -------------------------------------------------------------------------------- /Pods/Headers/Public/UIColor+BFPaperColors/UIColor+BFPaperColors.h: -------------------------------------------------------------------------------- 1 | ../../../UIColor+BFPaperColors/UIColor+BFPaperColors/UIColor+BFPaperColors.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - UIColor+BFPaperColors (HEAD based on 1.5.1) 3 | 4 | DEPENDENCIES: 5 | - UIColor+BFPaperColors (HEAD) 6 | 7 | SPEC CHECKSUMS: 8 | UIColor+BFPaperColors: 4b2baddaef5bee61159068b5cca5b765e5e58a08 9 | 10 | COCOAPODS: 0.36.3 11 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 05A2BCF582DCADAFFC345078 /* UIColor+BFPaperColors.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B4495D0FBAED9FC80B76B15 /* UIColor+BFPaperColors.h */; }; 11 | 15B2A44C8123D27AE7890489 /* Pods-UIColor+BFPaperColors-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 416877E13A47C602C55121DC /* Pods-UIColor+BFPaperColors-dummy.m */; }; 12 | 3503AC33C1687FECBE67D21C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 120CD658C6694AC2A44D0517 /* Foundation.framework */; }; 13 | 534F00A2F528E7D6CA5F3117 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 120CD658C6694AC2A44D0517 /* Foundation.framework */; }; 14 | C2AE7F4AFA1BD03BA14AC0FB /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A86049780C09FFB6B5EE1540 /* Pods-dummy.m */; }; 15 | CDC2B62C2F076C03E6AAA395 /* UIColor+BFPaperColors.m in Sources */ = {isa = PBXBuildFile; fileRef = F9AC795724AED2989E3CDE66 /* UIColor+BFPaperColors.m */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 28C7B39BA0953FCA377AA04B /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = A5914E9BF8EA3C19E93197BD /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = 3E08DC3BE28D634C6FAA6F46; 24 | remoteInfo = "Pods-UIColor+BFPaperColors"; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 04543668CBA1FABDA0B61E96 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; 30 | 0FCE86AE2F00598443C4951F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 31 | 120CD658C6694AC2A44D0517 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 32 | 1788B3492F605B58DDAB5D51 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; 33 | 183A713DEDC5D320FC780B01 /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; 34 | 416877E13A47C602C55121DC /* Pods-UIColor+BFPaperColors-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-UIColor+BFPaperColors-dummy.m"; sourceTree = ""; }; 35 | 7B4495D0FBAED9FC80B76B15 /* UIColor+BFPaperColors.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIColor+BFPaperColors.h"; path = "UIColor+BFPaperColors/UIColor+BFPaperColors.h"; sourceTree = ""; }; 36 | 7D0E989A4B3E4B447CC1AEA2 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; 37 | 81E5DF8D1EF1ED7DB0E64DFF /* Pods-UIColor+BFPaperColors.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-UIColor+BFPaperColors.xcconfig"; sourceTree = ""; }; 38 | 8AC3942AF63AF2DE6EB6DA3D /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; 39 | 9E54DC7715F39D100A80EF2F /* Pods-UIColor+BFPaperColors-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-UIColor+BFPaperColors-Private.xcconfig"; sourceTree = ""; }; 40 | A86049780C09FFB6B5EE1540 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; 41 | B2DC1364109C57308E8BB548 /* libPods-UIColor+BFPaperColors.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-UIColor+BFPaperColors.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | B8F5EB904DE63A0763099B4F /* Pods-environment.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-environment.h"; sourceTree = ""; }; 43 | C88BFDEEFDDAE1ED061BB37E /* Pods-UIColor+BFPaperColors-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-UIColor+BFPaperColors-prefix.pch"; sourceTree = ""; }; 44 | DCF94F6C0E71B45E656A89F2 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | F9AC795724AED2989E3CDE66 /* UIColor+BFPaperColors.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIColor+BFPaperColors.m"; path = "UIColor+BFPaperColors/UIColor+BFPaperColors.m"; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | 0100E91175822BB4F2BC4E66 /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | 534F00A2F528E7D6CA5F3117 /* Foundation.framework in Frameworks */, 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | 62F29F6F897DAF491CCEBDA3 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 3503AC33C1687FECBE67D21C /* Foundation.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 130C0CFF987A416A8067EE64 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | DCF94F6C0E71B45E656A89F2 /* libPods.a */, 72 | B2DC1364109C57308E8BB548 /* libPods-UIColor+BFPaperColors.a */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 2A967167A3CF49D6D0D7E14A /* Targets Support Files */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | CC10D943CEDD0C999CA8E712 /* Pods */, 81 | ); 82 | name = "Targets Support Files"; 83 | sourceTree = ""; 84 | }; 85 | 5195E4E7ED26CB5D2CF9E188 /* UIColor+BFPaperColors */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 7B4495D0FBAED9FC80B76B15 /* UIColor+BFPaperColors.h */, 89 | F9AC795724AED2989E3CDE66 /* UIColor+BFPaperColors.m */, 90 | 78B1C220079432B84E5CDE26 /* Support Files */, 91 | ); 92 | path = "UIColor+BFPaperColors"; 93 | sourceTree = ""; 94 | }; 95 | 57F6D209FEE064596DE38BE6 /* Frameworks */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 956A5C8CA2FAE75515805CDE /* iOS */, 99 | ); 100 | name = Frameworks; 101 | sourceTree = ""; 102 | }; 103 | 78B1C220079432B84E5CDE26 /* Support Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 81E5DF8D1EF1ED7DB0E64DFF /* Pods-UIColor+BFPaperColors.xcconfig */, 107 | 9E54DC7715F39D100A80EF2F /* Pods-UIColor+BFPaperColors-Private.xcconfig */, 108 | 416877E13A47C602C55121DC /* Pods-UIColor+BFPaperColors-dummy.m */, 109 | C88BFDEEFDDAE1ED061BB37E /* Pods-UIColor+BFPaperColors-prefix.pch */, 110 | ); 111 | name = "Support Files"; 112 | path = "../Target Support Files/Pods-UIColor+BFPaperColors"; 113 | sourceTree = ""; 114 | }; 115 | 8D9EBF497C79619B2C6AC583 = { 116 | isa = PBXGroup; 117 | children = ( 118 | 0FCE86AE2F00598443C4951F /* Podfile */, 119 | 57F6D209FEE064596DE38BE6 /* Frameworks */, 120 | FD65084AC0B0C5604FEB8831 /* Pods */, 121 | 130C0CFF987A416A8067EE64 /* Products */, 122 | 2A967167A3CF49D6D0D7E14A /* Targets Support Files */, 123 | ); 124 | sourceTree = ""; 125 | }; 126 | 956A5C8CA2FAE75515805CDE /* iOS */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 120CD658C6694AC2A44D0517 /* Foundation.framework */, 130 | ); 131 | name = iOS; 132 | sourceTree = ""; 133 | }; 134 | CC10D943CEDD0C999CA8E712 /* Pods */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 183A713DEDC5D320FC780B01 /* Pods-acknowledgements.markdown */, 138 | 8AC3942AF63AF2DE6EB6DA3D /* Pods-acknowledgements.plist */, 139 | A86049780C09FFB6B5EE1540 /* Pods-dummy.m */, 140 | B8F5EB904DE63A0763099B4F /* Pods-environment.h */, 141 | 04543668CBA1FABDA0B61E96 /* Pods-resources.sh */, 142 | 1788B3492F605B58DDAB5D51 /* Pods.debug.xcconfig */, 143 | 7D0E989A4B3E4B447CC1AEA2 /* Pods.release.xcconfig */, 144 | ); 145 | name = Pods; 146 | path = "Target Support Files/Pods"; 147 | sourceTree = ""; 148 | }; 149 | FD65084AC0B0C5604FEB8831 /* Pods */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 5195E4E7ED26CB5D2CF9E188 /* UIColor+BFPaperColors */, 153 | ); 154 | name = Pods; 155 | sourceTree = ""; 156 | }; 157 | /* End PBXGroup section */ 158 | 159 | /* Begin PBXHeadersBuildPhase section */ 160 | 7C060A0F6C33569F26F71116 /* Headers */ = { 161 | isa = PBXHeadersBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | 05A2BCF582DCADAFFC345078 /* UIColor+BFPaperColors.h in Headers */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXHeadersBuildPhase section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | 3E08DC3BE28D634C6FAA6F46 /* Pods-UIColor+BFPaperColors */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = BD75C35F818583F32E12359B /* Build configuration list for PBXNativeTarget "Pods-UIColor+BFPaperColors" */; 174 | buildPhases = ( 175 | 9FEF6393321E151526F3B511 /* Sources */, 176 | 62F29F6F897DAF491CCEBDA3 /* Frameworks */, 177 | 7C060A0F6C33569F26F71116 /* Headers */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | ); 183 | name = "Pods-UIColor+BFPaperColors"; 184 | productName = "Pods-UIColor+BFPaperColors"; 185 | productReference = B2DC1364109C57308E8BB548 /* libPods-UIColor+BFPaperColors.a */; 186 | productType = "com.apple.product-type.library.static"; 187 | }; 188 | 8D6E54C49FD09AE8C756DF63 /* Pods */ = { 189 | isa = PBXNativeTarget; 190 | buildConfigurationList = 80628247E0A4DBA98AADE084 /* Build configuration list for PBXNativeTarget "Pods" */; 191 | buildPhases = ( 192 | 5D4287C524D067BF477AF80F /* Sources */, 193 | 0100E91175822BB4F2BC4E66 /* Frameworks */, 194 | ); 195 | buildRules = ( 196 | ); 197 | dependencies = ( 198 | C5BC3A70C5B757BF951D8630 /* PBXTargetDependency */, 199 | ); 200 | name = Pods; 201 | productName = Pods; 202 | productReference = DCF94F6C0E71B45E656A89F2 /* libPods.a */; 203 | productType = "com.apple.product-type.library.static"; 204 | }; 205 | /* End PBXNativeTarget section */ 206 | 207 | /* Begin PBXProject section */ 208 | A5914E9BF8EA3C19E93197BD /* Project object */ = { 209 | isa = PBXProject; 210 | attributes = { 211 | LastUpgradeCheck = 0510; 212 | }; 213 | buildConfigurationList = 88629A0513C29062FCB67D12 /* Build configuration list for PBXProject "Pods" */; 214 | compatibilityVersion = "Xcode 3.2"; 215 | developmentRegion = English; 216 | hasScannedForEncodings = 0; 217 | knownRegions = ( 218 | en, 219 | ); 220 | mainGroup = 8D9EBF497C79619B2C6AC583; 221 | productRefGroup = 130C0CFF987A416A8067EE64 /* Products */; 222 | projectDirPath = ""; 223 | projectRoot = ""; 224 | targets = ( 225 | 8D6E54C49FD09AE8C756DF63 /* Pods */, 226 | 3E08DC3BE28D634C6FAA6F46 /* Pods-UIColor+BFPaperColors */, 227 | ); 228 | }; 229 | /* End PBXProject section */ 230 | 231 | /* Begin PBXSourcesBuildPhase section */ 232 | 5D4287C524D067BF477AF80F /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | C2AE7F4AFA1BD03BA14AC0FB /* Pods-dummy.m in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | 9FEF6393321E151526F3B511 /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | 15B2A44C8123D27AE7890489 /* Pods-UIColor+BFPaperColors-dummy.m in Sources */, 245 | CDC2B62C2F076C03E6AAA395 /* UIColor+BFPaperColors.m in Sources */, 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | }; 249 | /* End PBXSourcesBuildPhase section */ 250 | 251 | /* Begin PBXTargetDependency section */ 252 | C5BC3A70C5B757BF951D8630 /* PBXTargetDependency */ = { 253 | isa = PBXTargetDependency; 254 | name = "Pods-UIColor+BFPaperColors"; 255 | target = 3E08DC3BE28D634C6FAA6F46 /* Pods-UIColor+BFPaperColors */; 256 | targetProxy = 28C7B39BA0953FCA377AA04B /* PBXContainerItemProxy */; 257 | }; 258 | /* End PBXTargetDependency section */ 259 | 260 | /* Begin XCBuildConfiguration section */ 261 | 026623DBF6A4CDBCEA2373D3 /* Release */ = { 262 | isa = XCBuildConfiguration; 263 | baseConfigurationReference = 9E54DC7715F39D100A80EF2F /* Pods-UIColor+BFPaperColors-Private.xcconfig */; 264 | buildSettings = { 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | GCC_PREFIX_HEADER = "Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors-prefix.pch"; 267 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 268 | MTL_ENABLE_DEBUG_INFO = NO; 269 | OTHER_LDFLAGS = ""; 270 | OTHER_LIBTOOLFLAGS = ""; 271 | PRODUCT_NAME = "$(TARGET_NAME)"; 272 | SDKROOT = iphoneos; 273 | SKIP_INSTALL = YES; 274 | }; 275 | name = Release; 276 | }; 277 | 396F19E34F3D5582217F4CAB /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | baseConfigurationReference = 1788B3492F605B58DDAB5D51 /* Pods.debug.xcconfig */; 280 | buildSettings = { 281 | ENABLE_STRICT_OBJC_MSGSEND = YES; 282 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 283 | MTL_ENABLE_DEBUG_INFO = YES; 284 | OTHER_LDFLAGS = ""; 285 | OTHER_LIBTOOLFLAGS = ""; 286 | PODS_ROOT = "$(SRCROOT)"; 287 | PRODUCT_NAME = "$(TARGET_NAME)"; 288 | SDKROOT = iphoneos; 289 | SKIP_INSTALL = YES; 290 | }; 291 | name = Debug; 292 | }; 293 | 49419C93A0C42A73F4003783 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = 9E54DC7715F39D100A80EF2F /* Pods-UIColor+BFPaperColors-Private.xcconfig */; 296 | buildSettings = { 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | GCC_PREFIX_HEADER = "Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors-prefix.pch"; 299 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 300 | MTL_ENABLE_DEBUG_INFO = YES; 301 | OTHER_LDFLAGS = ""; 302 | OTHER_LIBTOOLFLAGS = ""; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | SDKROOT = iphoneos; 305 | SKIP_INSTALL = YES; 306 | }; 307 | name = Debug; 308 | }; 309 | 71FBD1A909431E7785E469C5 /* 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; 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; 324 | CLANG_WARN_UNREACHABLE_CODE = YES; 325 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 326 | COPY_PHASE_STRIP = NO; 327 | GCC_C_LANGUAGE_STANDARD = gnu99; 328 | GCC_DYNAMIC_NO_PIC = NO; 329 | GCC_OPTIMIZATION_LEVEL = 0; 330 | GCC_PREPROCESSOR_DEFINITIONS = ( 331 | "DEBUG=1", 332 | "$(inherited)", 333 | ); 334 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 335 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 336 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 337 | GCC_WARN_UNDECLARED_SELECTOR = YES; 338 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 339 | GCC_WARN_UNUSED_FUNCTION = YES; 340 | GCC_WARN_UNUSED_VARIABLE = YES; 341 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 342 | ONLY_ACTIVE_ARCH = YES; 343 | STRIP_INSTALLED_PRODUCT = NO; 344 | SYMROOT = "${SRCROOT}/../build"; 345 | }; 346 | name = Debug; 347 | }; 348 | C1419886E1A10899265CA899 /* Release */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_WARN_BOOL_CONVERSION = YES; 357 | CLANG_WARN_CONSTANT_CONVERSION = YES; 358 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 359 | CLANG_WARN_EMPTY_BODY = YES; 360 | CLANG_WARN_ENUM_CONVERSION = YES; 361 | CLANG_WARN_INT_CONVERSION = YES; 362 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 363 | CLANG_WARN_UNREACHABLE_CODE = YES; 364 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 365 | COPY_PHASE_STRIP = YES; 366 | ENABLE_NS_ASSERTIONS = NO; 367 | GCC_C_LANGUAGE_STANDARD = gnu99; 368 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 376 | STRIP_INSTALLED_PRODUCT = NO; 377 | SYMROOT = "${SRCROOT}/../build"; 378 | VALIDATE_PRODUCT = YES; 379 | }; 380 | name = Release; 381 | }; 382 | E815AD1FFB957A841BC51058 /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | baseConfigurationReference = 7D0E989A4B3E4B447CC1AEA2 /* Pods.release.xcconfig */; 385 | buildSettings = { 386 | ENABLE_STRICT_OBJC_MSGSEND = YES; 387 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 388 | MTL_ENABLE_DEBUG_INFO = NO; 389 | OTHER_LDFLAGS = ""; 390 | OTHER_LIBTOOLFLAGS = ""; 391 | PODS_ROOT = "$(SRCROOT)"; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | SDKROOT = iphoneos; 394 | SKIP_INSTALL = YES; 395 | }; 396 | name = Release; 397 | }; 398 | /* End XCBuildConfiguration section */ 399 | 400 | /* Begin XCConfigurationList section */ 401 | 80628247E0A4DBA98AADE084 /* Build configuration list for PBXNativeTarget "Pods" */ = { 402 | isa = XCConfigurationList; 403 | buildConfigurations = ( 404 | 396F19E34F3D5582217F4CAB /* Debug */, 405 | E815AD1FFB957A841BC51058 /* Release */, 406 | ); 407 | defaultConfigurationIsVisible = 0; 408 | defaultConfigurationName = Release; 409 | }; 410 | 88629A0513C29062FCB67D12 /* Build configuration list for PBXProject "Pods" */ = { 411 | isa = XCConfigurationList; 412 | buildConfigurations = ( 413 | 71FBD1A909431E7785E469C5 /* Debug */, 414 | C1419886E1A10899265CA899 /* Release */, 415 | ); 416 | defaultConfigurationIsVisible = 0; 417 | defaultConfigurationName = Release; 418 | }; 419 | BD75C35F818583F32E12359B /* Build configuration list for PBXNativeTarget "Pods-UIColor+BFPaperColors" */ = { 420 | isa = XCConfigurationList; 421 | buildConfigurations = ( 422 | 49419C93A0C42A73F4003783 /* Debug */, 423 | 026623DBF6A4CDBCEA2373D3 /* Release */, 424 | ); 425 | defaultConfigurationIsVisible = 0; 426 | defaultConfigurationName = Release; 427 | }; 428 | /* End XCConfigurationList section */ 429 | }; 430 | rootObject = A5914E9BF8EA3C19E93197BD /* Project object */; 431 | } 432 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-UIColor+BFPaperColors.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UIColor+BFPaperColors" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/UIColor+BFPaperColors" 4 | OTHER_LDFLAGS = -ObjC 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_UIColor_BFPaperColors : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_UIColor_BFPaperColors 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-environment.h" 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperTabBar/dd31d9d072cdeabb10e6097d8987a3eedb327fe7/Pods/Target Support Files/Pods-UIColor+BFPaperColors/Pods-UIColor+BFPaperColors.xcconfig -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## UIColor+BFPaperColors 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2014 Bence Feher 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | this software and associated documentation files (the "Software"), to deal in 12 | the Software without restriction, including without limitation the rights to 13 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 14 | the Software, and to permit persons to whom the Software is furnished to do so, 15 | subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 22 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 23 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | Generated by CocoaPods - http://cocoapods.org 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2014 Bence Feher 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy of 22 | this software and associated documentation files (the "Software"), to deal in 23 | the Software without restriction, including without limitation the rights to 24 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 25 | the Software, and to permit persons to whom the Software is furnished to do so, 26 | subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 33 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 34 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 35 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 36 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 37 | 38 | Title 39 | UIColor+BFPaperColors 40 | Type 41 | PSGroupSpecifier 42 | 43 | 44 | FooterText 45 | Generated by CocoaPods - http://cocoapods.org 46 | Title 47 | 48 | Type 49 | PSGroupSpecifier 50 | 51 | 52 | StringsTable 53 | Acknowledgements 54 | Title 55 | Acknowledgements 56 | 57 | 58 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // UIColor+BFPaperColors 10 | #define COCOAPODS_POD_AVAILABLE_UIColor_BFPaperColors 11 | #define COCOAPODS_VERSION_MAJOR_UIColor_BFPaperColors 1 12 | #define COCOAPODS_VERSION_MINOR_UIColor_BFPaperColors 5 13 | #define COCOAPODS_VERSION_PATCH_UIColor_BFPaperColors 1 14 | 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES="" 10 | 11 | install_resource() 12 | { 13 | case $1 in 14 | *.storyboard) 15 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 16 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 17 | ;; 18 | *.xib) 19 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 20 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 21 | ;; 22 | *.framework) 23 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 24 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 25 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 26 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 27 | ;; 28 | *.xcdatamodel) 29 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 30 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 31 | ;; 32 | *.xcdatamodeld) 33 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 34 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 35 | ;; 36 | *.xcmappingmodel) 37 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 38 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 39 | ;; 40 | *.xcassets) 41 | XCASSET_FILES="$XCASSET_FILES '${PODS_ROOT}/$1'" 42 | ;; 43 | /*) 44 | echo "$1" 45 | echo "$1" >> "$RESOURCES_TO_COPY" 46 | ;; 47 | *) 48 | echo "${PODS_ROOT}/$1" 49 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 50 | ;; 51 | esac 52 | } 53 | 54 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 55 | if [[ "${ACTION}" == "install" ]]; then 56 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 57 | fi 58 | rm -f "$RESOURCES_TO_COPY" 59 | 60 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 61 | then 62 | case "${TARGETED_DEVICE_FAMILY}" in 63 | 1,2) 64 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 65 | ;; 66 | 1) 67 | TARGET_DEVICE_ARGS="--target-device iphone" 68 | ;; 69 | 2) 70 | TARGET_DEVICE_ARGS="--target-device ipad" 71 | ;; 72 | *) 73 | TARGET_DEVICE_ARGS="--target-device mac" 74 | ;; 75 | esac 76 | while read line; do XCASSET_FILES="$XCASSET_FILES '$line'"; done <<<$(find "$PWD" -name "*.xcassets" | egrep -v "^$PODS_ROOT") 77 | echo $XCASSET_FILES | xargs actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | fi 79 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/UIColor+BFPaperColors" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/UIColor+BFPaperColors" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-UIColor+BFPaperColors" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/UIColor+BFPaperColors" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/UIColor+BFPaperColors" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Pods-UIColor+BFPaperColors" 5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 6 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Pods/UIColor+BFPaperColors/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Bence Feher 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Pods/UIColor+BFPaperColors/README.md: -------------------------------------------------------------------------------- 1 | BFPaperColors 2 | ============= 3 | [![CocoaPods](https://img.shields.io/cocoapods/v/UIColor+BFPaperColors.svg?style=flat)](https://github.com/bfeher/BFPaperColors) 4 | 5 | > Flat colors taken from Google's Material Design: Paper. 6 | 7 | ![Screenshot](https://raw.githubusercontent.com/bfeher/BFPaperColors/master/colorList.png "Screenshot") 8 | 9 | ![Blue Detail](https://raw.githubusercontent.com/bfeher/BFPaperColors/master/blueList.png "Blue Detail") 10 | 11 | 12 | About 13 | --------- 14 | _UIColor+BFPaperColors_ is a category for _UIColor_ that adds class methods to conveniently produce **over 240 new colors** designed for flat or semi-flat interface designs by [Google's Material Design Labs](http://www.google.com/design/spec/style/color.html). 15 | 16 | Changes 17 | --------- 18 | Please refer to this [CHANGELOG.md](https://github.com/bfeher/BFPaperColors/blob/master/CHANGELOG.md). 19 | 20 | Usage 21 | --------- 22 | Add the _UIColor+BFPaperColors_ header and implementation file to your project. (.h & .m) 23 | 24 | After doing that, it is a simple as calling:`[UIColor paperColorXXXXX]` (where XXXXX is the color of your choice). Each paper color method is prefixed with the words "paperColor" for easy recognition in Xcode's code complete. All colors have a wide range of shades, noted by a number suffix. For example, A very light blue could be `[UIColor paperColorLightBlue100]` while a darker shade could be `[UIColor paperColorLightBlue700]`. 25 | 26 | ###Working Example 27 | ```objective-c 28 | view.backgroundColor = [UIColor paperColorCyan600]; 29 | ``` 30 | 31 | Utility Macro and Functions 32 | --------- 33 | `UIColorFromRGB(rgbValue)`
34 | Returns a UIColor from a given hex-code.
35 | @param rgbValue The hex-code to use to get a UIColor. ex: 0xffffff
36 | @return A UIColor object of the color of the passed in hex-code.
37 |
38 | 39 | `+ (BOOL)isColorClear:(UIColor *)color`
40 | Returns a BOOL indicating whether or not the color passed to this function is clear or not.
41 | @param color The UIColor to test.
42 | @return YES if clear, NO if not clear.
43 |
44 | 45 | `+ (BOOL)isColorDark:(UIColor *)color;`
46 | Returns a BOOL indicating whether or not the color passed to this function is dark or not.
47 | @param color The UIColor to test.
48 | @return YES if dark, NO if not dark.
49 |
50 | 51 | `+ (BOOL)isColorLight:(UIColor *)color;`
52 | Returns a BOOL indicating whether or not the color passed to this function is light or not.
53 | @param color The UIColor to test.
54 | @return YES if light, NO if not light.
55 |
56 | 57 | `+ (UIImage *)imageFromColor:(UIColor *)color`
58 | Returns a UIImage generated by a color. (Useful for setting button background images for states that are a solid color.)
59 | @param color The color to create an image out of.
60 | @return A UIImage of the passed color.
61 |
62 | 63 | `+ (NSString *)hexStringFromRGBColor:(UIColor *)color`
64 | Returns the hex-code representation of a UIColor.
65 | @param color The color to inspect for its hex-code.
66 | @return An NSString representing the hex-code of the passed in color.
67 |
68 | 69 | `+ (CAGradientLayer *)gradientWithStartColor:(UIColor *)startColor endColor:(UIColor *)endColor`
70 | Returns a simple gradient layer built from two colors.
71 | @param startColor A UIColor to use as the start color of the gradient layer.
72 | @param endColor A UIColor to use as the end color of the gradient layer.
73 | @return A CAGradientLayer starting with the startColor and ending with the endColor.
74 | 75 | 76 | 77 | Cocoapods 78 | ------- 79 | 80 | CocoaPods are the best way to manage library dependencies in Objective-C projects. 81 | Learn more at http://cocoapods.org 82 | 83 | Add this to your podfile to add the UIColor+BFPaperColors category to your project. 84 | ```ruby 85 | platform :ios, '7.0' 86 | pod 'UIColor+BFPaperColors', '~> 1.5.1' 87 | ``` 88 | 89 | License 90 | -------- 91 | _UIColor+BFPaperColors_ uses the MIT License: 92 | 93 | > Please see included [LICENSE file](https://raw.githubusercontent.com/bfeher/BFPaperColors/master/LICENSE.md). 94 | -------------------------------------------------------------------------------- /Pods/UIColor+BFPaperColors/UIColor+BFPaperColors/UIColor+BFPaperColors.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+BFPaperColors.h 3 | // BFPaperKit 4 | // 5 | // Created by Bence Feher on 7/11/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | /* LICENSE: 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2014 Bence Feher 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of 14 | this software and associated documentation files (the "Software"), to deal in 15 | the Software without restriction, including without limitation the rights to 16 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 17 | the Software, and to permit persons to whom the Software is furnished to do so, 18 | subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 25 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 26 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 27 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 28 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | */ 30 | 31 | 32 | #import 33 | 34 | /** 35 | * Returns a UIColor from a given hex-code. 36 | * 37 | * @param rgbValue The hex-code to use to get a UIColor. ex: 0xffffff 38 | * 39 | * @return A UIColor object of the color of the passed in hex-code. 40 | */ 41 | #define UIColorFromRGB(rgbValue) \ 42 | [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ 43 | green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ 44 | blue:((float)(rgbValue & 0xFF))/255.0 \ 45 | alpha:1.0] 46 | 47 | 48 | 49 | @interface UIColor (BFPaperColors) 50 | 51 | #pragma mark - Utilities 52 | /** 53 | * Returns a BOOL indicating whether or not the color passed to this function is clear or not. 54 | * 55 | * @param color The UIColor to test. 56 | * 57 | * @return YES if clear, NO if not clear. 58 | */ 59 | + (BOOL)isColorClear:(UIColor *)color; 60 | 61 | 62 | /** 63 | * Returns a BOOL indicating whether or not the color passed to this function is dark or not. 64 | * 65 | * @param color The UIColor to test. 66 | * 67 | * @return YES if dark, NO if not dark. 68 | */ 69 | + (BOOL)isColorDark:(UIColor *)color; 70 | 71 | 72 | /** 73 | * Returns a BOOL indicating whether or not the color passed to this function is light or not. 74 | * 75 | * @param color The UIColor to test. 76 | * 77 | * @return YES if light, NO if not light. 78 | */ 79 | + (BOOL)isColorLight:(UIColor *)color; 80 | 81 | 82 | /** 83 | * Returns a UIImage generated by a color. (Useful for setting button background images for states that are a solid color.) 84 | * 85 | * @param color The color to create an image out of. 86 | * 87 | * @return A UIImage of the passed color. 88 | */ 89 | + (UIImage *)imageFromColor:(UIColor *)color; 90 | 91 | 92 | /** 93 | * Returns the hex-code representation of a UIColor. 94 | * 95 | * @param color The color to inspect for its hex-code. 96 | * 97 | * @return An NSString representing the hex-code of the passed in color. 98 | */ 99 | + (NSString *)hexStringFromRGBColor:(UIColor *)color; 100 | 101 | 102 | /** 103 | * Returns a simple gradient layer built from two colors. 104 | * 105 | * @param startColor A UIColor to use as the start color of the gradient layer. 106 | * @param endColor A UIColor to use as the end color of the gradient layer. 107 | * 108 | * @return A CAGradientLayer starting with the startColor and ending with the endColor. 109 | */ 110 | + (CAGradientLayer *)gradientWithStartColor:(UIColor *)startColor 111 | endColor:(UIColor *)endColor; 112 | 113 | 114 | #pragma mark - Red 115 | + (UIColor *)paperColorRed50; 116 | + (UIColor *)paperColorRed100; 117 | + (UIColor *)paperColorRed200; 118 | + (UIColor *)paperColorRed300; 119 | + (UIColor *)paperColorRed400; 120 | + (UIColor *)paperColorRed500; 121 | + (UIColor *)paperColorRed600; 122 | + (UIColor *)paperColorRed700; 123 | + (UIColor *)paperColorRed800; 124 | + (UIColor *)paperColorRed900; 125 | + (UIColor *)paperColorRedA100; 126 | + (UIColor *)paperColorRedA200; 127 | + (UIColor *)paperColorRedA400; 128 | + (UIColor *)paperColorRedA700; 129 | + (UIColor *)paperColorRed; 130 | 131 | #pragma mark - Pink 132 | + (UIColor *)paperColorPink50; 133 | + (UIColor *)paperColorPink100; 134 | + (UIColor *)paperColorPink200; 135 | + (UIColor *)paperColorPink300; 136 | + (UIColor *)paperColorPink400; 137 | + (UIColor *)paperColorPink500; 138 | + (UIColor *)paperColorPink600; 139 | + (UIColor *)paperColorPink700; 140 | + (UIColor *)paperColorPink800; 141 | + (UIColor *)paperColorPink900; 142 | + (UIColor *)paperColorPinkA100; 143 | + (UIColor *)paperColorPinkA200; 144 | + (UIColor *)paperColorPinkA400; 145 | + (UIColor *)paperColorPinkA700; 146 | + (UIColor *)paperColorPink; 147 | 148 | #pragma mark - Purple 149 | + (UIColor *)paperColorPurple50; 150 | + (UIColor *)paperColorPurple100; 151 | + (UIColor *)paperColorPurple200; 152 | + (UIColor *)paperColorPurple300; 153 | + (UIColor *)paperColorPurple400; 154 | + (UIColor *)paperColorPurple500; 155 | + (UIColor *)paperColorPurple600; 156 | + (UIColor *)paperColorPurple700; 157 | + (UIColor *)paperColorPurple800; 158 | + (UIColor *)paperColorPurple900; 159 | + (UIColor *)paperColorPurpleA100; 160 | + (UIColor *)paperColorPurpleA200; 161 | + (UIColor *)paperColorPurpleA400; 162 | + (UIColor *)paperColorPurpleA700; 163 | + (UIColor *)paperColorPurple; 164 | 165 | #pragma mark - Deep Purple 166 | + (UIColor *)paperColorDeepPurple50; 167 | + (UIColor *)paperColorDeepPurple100; 168 | + (UIColor *)paperColorDeepPurple200; 169 | + (UIColor *)paperColorDeepPurple300; 170 | + (UIColor *)paperColorDeepPurple400; 171 | + (UIColor *)paperColorDeepPurple500; 172 | + (UIColor *)paperColorDeepPurple600; 173 | + (UIColor *)paperColorDeepPurple700; 174 | + (UIColor *)paperColorDeepPurple800; 175 | + (UIColor *)paperColorDeepPurple900; 176 | + (UIColor *)paperColorDeepPurpleA100; 177 | + (UIColor *)paperColorDeepPurpleA200; 178 | + (UIColor *)paperColorDeepPurpleA400; 179 | + (UIColor *)paperColorDeepPurpleA700; 180 | + (UIColor *)paperColorDeepPurple; 181 | 182 | #pragma mark - Indigo 183 | + (UIColor *)paperColorIndigo50; 184 | + (UIColor *)paperColorIndigo100; 185 | + (UIColor *)paperColorIndigo200; 186 | + (UIColor *)paperColorIndigo300; 187 | + (UIColor *)paperColorIndigo400; 188 | + (UIColor *)paperColorIndigo500; 189 | + (UIColor *)paperColorIndigo600; 190 | + (UIColor *)paperColorIndigo700; 191 | + (UIColor *)paperColorIndigo800; 192 | + (UIColor *)paperColorIndigo900; 193 | + (UIColor *)paperColorIndigoA100; 194 | + (UIColor *)paperColorIndigoA200; 195 | + (UIColor *)paperColorIndigoA400; 196 | + (UIColor *)paperColorIndigoA700; 197 | + (UIColor *)paperColorIndigo; 198 | 199 | #pragma mark - Blue 200 | + (UIColor *)paperColorBlue50; 201 | + (UIColor *)paperColorBlue100; 202 | + (UIColor *)paperColorBlue200; 203 | + (UIColor *)paperColorBlue300; 204 | + (UIColor *)paperColorBlue400; 205 | + (UIColor *)paperColorBlue500; 206 | + (UIColor *)paperColorBlue600; 207 | + (UIColor *)paperColorBlue700; 208 | + (UIColor *)paperColorBlue800; 209 | + (UIColor *)paperColorBlue900; 210 | + (UIColor *)paperColorBlueA100; 211 | + (UIColor *)paperColorBlueA200; 212 | + (UIColor *)paperColorBlueA400; 213 | + (UIColor *)paperColorBlueA700; 214 | + (UIColor *)paperColorBlue; 215 | 216 | #pragma mark - Light Blue 217 | + (UIColor *)paperColorLightBlue50; 218 | + (UIColor *)paperColorLightBlue100; 219 | + (UIColor *)paperColorLightBlue200; 220 | + (UIColor *)paperColorLightBlue300; 221 | + (UIColor *)paperColorLightBlue400; 222 | + (UIColor *)paperColorLightBlue500; 223 | + (UIColor *)paperColorLightBlue600; 224 | + (UIColor *)paperColorLightBlue700; 225 | + (UIColor *)paperColorLightBlue800; 226 | + (UIColor *)paperColorLightBlue900; 227 | + (UIColor *)paperColorLightBlueA100; 228 | + (UIColor *)paperColorLightBlueA200; 229 | + (UIColor *)paperColorLightBlueA400; 230 | + (UIColor *)paperColorLightBlueA700; 231 | + (UIColor *)paperColorLightBlue; 232 | 233 | #pragma mark - Cyan 234 | + (UIColor *)paperColorCyan50; 235 | + (UIColor *)paperColorCyan100; 236 | + (UIColor *)paperColorCyan200; 237 | + (UIColor *)paperColorCyan300; 238 | + (UIColor *)paperColorCyan400; 239 | + (UIColor *)paperColorCyan500; 240 | + (UIColor *)paperColorCyan600; 241 | + (UIColor *)paperColorCyan700; 242 | + (UIColor *)paperColorCyan800; 243 | + (UIColor *)paperColorCyan900; 244 | + (UIColor *)paperColorCyanA100; 245 | + (UIColor *)paperColorCyanA200; 246 | + (UIColor *)paperColorCyanA400; 247 | + (UIColor *)paperColorCyanA700; 248 | + (UIColor *)paperColorCyan; 249 | 250 | #pragma mark - Teal 251 | + (UIColor *)paperColorTeal50; 252 | + (UIColor *)paperColorTeal100; 253 | + (UIColor *)paperColorTeal200; 254 | + (UIColor *)paperColorTeal300; 255 | + (UIColor *)paperColorTeal400; 256 | + (UIColor *)paperColorTeal500; 257 | + (UIColor *)paperColorTeal600; 258 | + (UIColor *)paperColorTeal700; 259 | + (UIColor *)paperColorTeal800; 260 | + (UIColor *)paperColorTeal900; 261 | + (UIColor *)paperColorTealA100; 262 | + (UIColor *)paperColorTealA200; 263 | + (UIColor *)paperColorTealA400; 264 | + (UIColor *)paperColorTealA700; 265 | + (UIColor *)paperColorTeal; 266 | 267 | #pragma mark - Green 268 | + (UIColor *)paperColorGreen50; 269 | + (UIColor *)paperColorGreen100; 270 | + (UIColor *)paperColorGreen200; 271 | + (UIColor *)paperColorGreen300; 272 | + (UIColor *)paperColorGreen400; 273 | + (UIColor *)paperColorGreen500; 274 | + (UIColor *)paperColorGreen600; 275 | + (UIColor *)paperColorGreen700; 276 | + (UIColor *)paperColorGreen800; 277 | + (UIColor *)paperColorGreen900; 278 | + (UIColor *)paperColorGreenA100; 279 | + (UIColor *)paperColorGreenA200; 280 | + (UIColor *)paperColorGreenA400; 281 | + (UIColor *)paperColorGreenA700; 282 | + (UIColor *)paperColorGreen; 283 | 284 | #pragma mark - Light Green 285 | + (UIColor *)paperColorLightGreen50; 286 | + (UIColor *)paperColorLightGreen100; 287 | + (UIColor *)paperColorLightGreen200; 288 | + (UIColor *)paperColorLightGreen300; 289 | + (UIColor *)paperColorLightGreen400; 290 | + (UIColor *)paperColorLightGreen500; 291 | + (UIColor *)paperColorLightGreen600; 292 | + (UIColor *)paperColorLightGreen700; 293 | + (UIColor *)paperColorLightGreen800; 294 | + (UIColor *)paperColorLightGreen900; 295 | + (UIColor *)paperColorLightGreenA100; 296 | + (UIColor *)paperColorLightGreenA200; 297 | + (UIColor *)paperColorLightGreenA400; 298 | + (UIColor *)paperColorLightGreenA700; 299 | + (UIColor *)paperColorLightGreen; 300 | 301 | #pragma mark - Lime 302 | + (UIColor *)paperColorLime50; 303 | + (UIColor *)paperColorLime100; 304 | + (UIColor *)paperColorLime200; 305 | + (UIColor *)paperColorLime300; 306 | + (UIColor *)paperColorLime400; 307 | + (UIColor *)paperColorLime500; 308 | + (UIColor *)paperColorLime600; 309 | + (UIColor *)paperColorLime700; 310 | + (UIColor *)paperColorLime800; 311 | + (UIColor *)paperColorLime900; 312 | + (UIColor *)paperColorLimeA100; 313 | + (UIColor *)paperColorLimeA200; 314 | + (UIColor *)paperColorLimeA400; 315 | + (UIColor *)paperColorLimeA700; 316 | + (UIColor *)paperColorLime; 317 | 318 | #pragma mark - Yellow 319 | + (UIColor *)paperColorYellow50; 320 | + (UIColor *)paperColorYellow100; 321 | + (UIColor *)paperColorYellow200; 322 | + (UIColor *)paperColorYellow300; 323 | + (UIColor *)paperColorYellow400; 324 | + (UIColor *)paperColorYellow500; 325 | + (UIColor *)paperColorYellow600; 326 | + (UIColor *)paperColorYellow700; 327 | + (UIColor *)paperColorYellow800; 328 | + (UIColor *)paperColorYellow900; 329 | + (UIColor *)paperColorYellowA100; 330 | + (UIColor *)paperColorYellowA200; 331 | + (UIColor *)paperColorYellowA400; 332 | + (UIColor *)paperColorYellowA700; 333 | + (UIColor *)paperColorYellow; 334 | 335 | #pragma mark - Amber 336 | + (UIColor *)paperColorAmber50; 337 | + (UIColor *)paperColorAmber100; 338 | + (UIColor *)paperColorAmber200; 339 | + (UIColor *)paperColorAmber300; 340 | + (UIColor *)paperColorAmber400; 341 | + (UIColor *)paperColorAmber500; 342 | + (UIColor *)paperColorAmber600; 343 | + (UIColor *)paperColorAmber700; 344 | + (UIColor *)paperColorAmber800; 345 | + (UIColor *)paperColorAmber900; 346 | + (UIColor *)paperColorAmberA100; 347 | + (UIColor *)paperColorAmberA200; 348 | + (UIColor *)paperColorAmberA400; 349 | + (UIColor *)paperColorAmberA700; 350 | + (UIColor *)paperColorAmber; 351 | 352 | #pragma mark - Orange 353 | + (UIColor *)paperColorOrange50; 354 | + (UIColor *)paperColorOrange100; 355 | + (UIColor *)paperColorOrange200; 356 | + (UIColor *)paperColorOrange300; 357 | + (UIColor *)paperColorOrange400; 358 | + (UIColor *)paperColorOrange500; 359 | + (UIColor *)paperColorOrange600; 360 | + (UIColor *)paperColorOrange700; 361 | + (UIColor *)paperColorOrange800; 362 | + (UIColor *)paperColorOrange900; 363 | + (UIColor *)paperColorOrangeA100; 364 | + (UIColor *)paperColorOrangeA200; 365 | + (UIColor *)paperColorOrangeA400; 366 | + (UIColor *)paperColorOrangeA700; 367 | + (UIColor *)paperColorOrange; 368 | 369 | #pragma mark - Deep Orange 370 | + (UIColor *)paperColorDeepOrange50; 371 | + (UIColor *)paperColorDeepOrange100; 372 | + (UIColor *)paperColorDeepOrange200; 373 | + (UIColor *)paperColorDeepOrange300; 374 | + (UIColor *)paperColorDeepOrange400; 375 | + (UIColor *)paperColorDeepOrange500; 376 | + (UIColor *)paperColorDeepOrange600; 377 | + (UIColor *)paperColorDeepOrange700; 378 | + (UIColor *)paperColorDeepOrange800; 379 | + (UIColor *)paperColorDeepOrange900; 380 | + (UIColor *)paperColorDeepOrangeA100; 381 | + (UIColor *)paperColorDeepOrangeA200; 382 | + (UIColor *)paperColorDeepOrangeA400; 383 | + (UIColor *)paperColorDeepOrangeA700; 384 | + (UIColor *)paperColorDeepOrange; 385 | 386 | #pragma mark - Brown 387 | + (UIColor *)paperColorBrown50; 388 | + (UIColor *)paperColorBrown100; 389 | + (UIColor *)paperColorBrown200; 390 | + (UIColor *)paperColorBrown300; 391 | + (UIColor *)paperColorBrown400; 392 | + (UIColor *)paperColorBrown500; 393 | + (UIColor *)paperColorBrown600; 394 | + (UIColor *)paperColorBrown700; 395 | + (UIColor *)paperColorBrown800; 396 | + (UIColor *)paperColorBrown900; 397 | + (UIColor *)paperColorBrown; 398 | 399 | #pragma mark - Gray 400 | + (UIColor *)paperColorGray50; 401 | + (UIColor *)paperColorGray100; 402 | + (UIColor *)paperColorGray200; 403 | + (UIColor *)paperColorGray300; 404 | + (UIColor *)paperColorGray400; 405 | + (UIColor *)paperColorGray500; 406 | + (UIColor *)paperColorGray600; 407 | + (UIColor *)paperColorGray700; 408 | + (UIColor *)paperColorGray800; 409 | + (UIColor *)paperColorGray900; 410 | + (UIColor *)paperColorGray; 411 | 412 | #pragma mark - Blue Gray 413 | + (UIColor *)paperColorBlueGray50; 414 | + (UIColor *)paperColorBlueGray100; 415 | + (UIColor *)paperColorBlueGray200; 416 | + (UIColor *)paperColorBlueGray300; 417 | + (UIColor *)paperColorBlueGray400; 418 | + (UIColor *)paperColorBlueGray500; 419 | + (UIColor *)paperColorBlueGray600; 420 | + (UIColor *)paperColorBlueGray700; 421 | + (UIColor *)paperColorBlueGray800; 422 | + (UIColor *)paperColorBlueGray900; 423 | + (UIColor *)paperColorBlueGray; 424 | 425 | #pragma mark - Text Colors Dark 426 | + (UIColor *)paperColorTextDark; 427 | + (UIColor *)paperColorTextDarkSecondary; 428 | + (UIColor *)paperColorTextDarkHint; 429 | + (UIColor *)paperColorTextDarkDivider; 430 | 431 | #pragma mark - Text Colors Light 432 | + (UIColor *)paperColorTextLight; 433 | + (UIColor *)paperColorTextLightSecondary; 434 | + (UIColor *)paperColorTextLightHint; 435 | + (UIColor *)paperColorTextLightDivider; 436 | 437 | 438 | @end 439 | -------------------------------------------------------------------------------- /Pods/UIColor+BFPaperColors/UIColor+BFPaperColors/UIColor+BFPaperColors.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+BFPaperColors.m 3 | // BFPaperKit 4 | // 5 | // Created by Bence Feher on 7/11/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | /* LICENSE: 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2014 Bence Feher 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy of 14 | this software and associated documentation files (the "Software"), to deal in 15 | the Software without restriction, including without limitation the rights to 16 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 17 | the Software, and to permit persons to whom the Software is furnished to do so, 18 | subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 25 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 26 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 27 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 28 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | */ 30 | 31 | #import "UIColor+BFPaperColors.h" 32 | 33 | @implementation UIColor (BFPaperColors) 34 | 35 | 36 | #pragma mark - Red 37 | + (UIColor *)paperColorRed50 { return UIColorFromRGB(0xFFEBEE); } 38 | + (UIColor *)paperColorRed100 { return UIColorFromRGB(0xFFCDD2); } 39 | + (UIColor *)paperColorRed200 { return UIColorFromRGB(0xEF9A9A); } 40 | + (UIColor *)paperColorRed300 { return UIColorFromRGB(0xE57373); } 41 | + (UIColor *)paperColorRed400 { return UIColorFromRGB(0xEF5350); } 42 | + (UIColor *)paperColorRed500 { return UIColorFromRGB(0xF44336); } 43 | + (UIColor *)paperColorRed600 { return UIColorFromRGB(0xE53935); } 44 | + (UIColor *)paperColorRed700 { return UIColorFromRGB(0xD32F2F); } 45 | + (UIColor *)paperColorRed800 { return UIColorFromRGB(0xC62828); } 46 | + (UIColor *)paperColorRed900 { return UIColorFromRGB(0xB71C1C); } 47 | + (UIColor *)paperColorRedA100 { return UIColorFromRGB(0xFF8A80); } 48 | + (UIColor *)paperColorRedA200 { return UIColorFromRGB(0xFF5252); } 49 | + (UIColor *)paperColorRedA400 { return UIColorFromRGB(0xFF1744); } 50 | + (UIColor *)paperColorRedA700 { return UIColorFromRGB(0xD50000); } 51 | + (UIColor *)paperColorRed { return [UIColor paperColorRed500]; } 52 | 53 | 54 | #pragma mark - Pink 55 | + (UIColor *)paperColorPink50 { return UIColorFromRGB(0xFCE4EC); } 56 | + (UIColor *)paperColorPink100 { return UIColorFromRGB(0xF8BBD0); } 57 | + (UIColor *)paperColorPink200 { return UIColorFromRGB(0xF48FB1); } 58 | + (UIColor *)paperColorPink300 { return UIColorFromRGB(0xF06292); } 59 | + (UIColor *)paperColorPink400 { return UIColorFromRGB(0xEC407A); } 60 | + (UIColor *)paperColorPink500 { return UIColorFromRGB(0xE91E63); } 61 | + (UIColor *)paperColorPink600 { return UIColorFromRGB(0xD81B60); } 62 | + (UIColor *)paperColorPink700 { return UIColorFromRGB(0xC2185B); } 63 | + (UIColor *)paperColorPink800 { return UIColorFromRGB(0xAD1457); } 64 | + (UIColor *)paperColorPink900 { return UIColorFromRGB(0x880E4F); } 65 | + (UIColor *)paperColorPinkA100 { return UIColorFromRGB(0xFF80AB); } 66 | + (UIColor *)paperColorPinkA200 { return UIColorFromRGB(0xFF4081); } 67 | + (UIColor *)paperColorPinkA400 { return UIColorFromRGB(0xF50057); } 68 | + (UIColor *)paperColorPinkA700 { return UIColorFromRGB(0xC51162); } 69 | + (UIColor *)paperColorPink { return [UIColor paperColorPink500]; } 70 | 71 | 72 | #pragma mark - Purple 73 | + (UIColor *)paperColorPurple50 { return UIColorFromRGB(0xF3E5F5); } 74 | + (UIColor *)paperColorPurple100 { return UIColorFromRGB(0xE1BEE7); } 75 | + (UIColor *)paperColorPurple200 { return UIColorFromRGB(0xCE93D8); } 76 | + (UIColor *)paperColorPurple300 { return UIColorFromRGB(0xBA68C8); } 77 | + (UIColor *)paperColorPurple400 { return UIColorFromRGB(0xAB47BC); } 78 | + (UIColor *)paperColorPurple500 { return UIColorFromRGB(0x9C27B0); } 79 | + (UIColor *)paperColorPurple600 { return UIColorFromRGB(0x8E24AA); } 80 | + (UIColor *)paperColorPurple700 { return UIColorFromRGB(0x7B1FA2); } 81 | + (UIColor *)paperColorPurple800 { return UIColorFromRGB(0x6A1B9A); } 82 | + (UIColor *)paperColorPurple900 { return UIColorFromRGB(0x4A148C); } 83 | + (UIColor *)paperColorPurpleA100 { return UIColorFromRGB(0xEA80FC); } 84 | + (UIColor *)paperColorPurpleA200 { return UIColorFromRGB(0xE040FB); } 85 | + (UIColor *)paperColorPurpleA400 { return UIColorFromRGB(0xD500F9); } 86 | + (UIColor *)paperColorPurpleA700 { return UIColorFromRGB(0xAA00FF); } 87 | + (UIColor *)paperColorPurple; { return [UIColor paperColorPurple500]; } 88 | 89 | 90 | #pragma mark - Deep Purple 91 | + (UIColor *)paperColorDeepPurple50 { return UIColorFromRGB(0xEDE7F6); } 92 | + (UIColor *)paperColorDeepPurple100 { return UIColorFromRGB(0xD1C4E9); } 93 | + (UIColor *)paperColorDeepPurple200 { return UIColorFromRGB(0xB39DDB); } 94 | + (UIColor *)paperColorDeepPurple300 { return UIColorFromRGB(0x9575CD); } 95 | + (UIColor *)paperColorDeepPurple400 { return UIColorFromRGB(0x7E57C2); } 96 | + (UIColor *)paperColorDeepPurple500 { return UIColorFromRGB(0x673AB7); } 97 | + (UIColor *)paperColorDeepPurple600 { return UIColorFromRGB(0x5E35B1); } 98 | + (UIColor *)paperColorDeepPurple700 { return UIColorFromRGB(0x512DA8); } 99 | + (UIColor *)paperColorDeepPurple800 { return UIColorFromRGB(0x4527A0); } 100 | + (UIColor *)paperColorDeepPurple900 { return UIColorFromRGB(0x311B92); } 101 | + (UIColor *)paperColorDeepPurpleA100 { return UIColorFromRGB(0xB388FF); } 102 | + (UIColor *)paperColorDeepPurpleA200 { return UIColorFromRGB(0x7C4DFF); } 103 | + (UIColor *)paperColorDeepPurpleA400 { return UIColorFromRGB(0x651FFF); } 104 | + (UIColor *)paperColorDeepPurpleA700 { return UIColorFromRGB(0x6200EA); } 105 | + (UIColor *)paperColorDeepPurple { return [UIColor paperColorDeepPurple500]; } 106 | 107 | 108 | #pragma mark - Indigo 109 | + (UIColor *)paperColorIndigo50 { return UIColorFromRGB(0xE8EAF6); } 110 | + (UIColor *)paperColorIndigo100 { return UIColorFromRGB(0xC5CAE9); } 111 | + (UIColor *)paperColorIndigo200 { return UIColorFromRGB(0x9FA8DA); } 112 | + (UIColor *)paperColorIndigo300 { return UIColorFromRGB(0x7986CB); } 113 | + (UIColor *)paperColorIndigo400 { return UIColorFromRGB(0x5C6BC0); } 114 | + (UIColor *)paperColorIndigo500 { return UIColorFromRGB(0x3F51B5); } 115 | + (UIColor *)paperColorIndigo600 { return UIColorFromRGB(0x3949AB); } 116 | + (UIColor *)paperColorIndigo700 { return UIColorFromRGB(0x303F9F); } 117 | + (UIColor *)paperColorIndigo800 { return UIColorFromRGB(0x283593); } 118 | + (UIColor *)paperColorIndigo900 { return UIColorFromRGB(0x1A237E); } 119 | + (UIColor *)paperColorIndigoA100 { return UIColorFromRGB(0x8C9EFF); } 120 | + (UIColor *)paperColorIndigoA200 { return UIColorFromRGB(0x536DFE); } 121 | + (UIColor *)paperColorIndigoA400 { return UIColorFromRGB(0x3D5AFE); } 122 | + (UIColor *)paperColorIndigoA700 { return UIColorFromRGB(0x304FFE); } 123 | + (UIColor *)paperColorIndigo { return [UIColor paperColorIndigo500]; } 124 | 125 | 126 | #pragma mark - Blue 127 | + (UIColor *)paperColorBlue50 { return UIColorFromRGB(0xE3F2FD); } 128 | + (UIColor *)paperColorBlue100 { return UIColorFromRGB(0xBBDEFB); } 129 | + (UIColor *)paperColorBlue200 { return UIColorFromRGB(0x90CAF9); } 130 | + (UIColor *)paperColorBlue300 { return UIColorFromRGB(0x64B5F6); } 131 | + (UIColor *)paperColorBlue400 { return UIColorFromRGB(0x42A5F5); } 132 | + (UIColor *)paperColorBlue500 { return UIColorFromRGB(0x2196F3); } 133 | + (UIColor *)paperColorBlue600 { return UIColorFromRGB(0x1E88E5); } 134 | + (UIColor *)paperColorBlue700 { return UIColorFromRGB(0x1976D2); } 135 | + (UIColor *)paperColorBlue800 { return UIColorFromRGB(0x1565C0); } 136 | + (UIColor *)paperColorBlue900 { return UIColorFromRGB(0x0D47A1); } 137 | + (UIColor *)paperColorBlueA100 { return UIColorFromRGB(0x82B1FF); } 138 | + (UIColor *)paperColorBlueA200 { return UIColorFromRGB(0x448AFF); } 139 | + (UIColor *)paperColorBlueA400 { return UIColorFromRGB(0x2979FF); } 140 | + (UIColor *)paperColorBlueA700 { return UIColorFromRGB(0x2962FF); } 141 | + (UIColor *)paperColorBlue { return [UIColor paperColorBlue500]; } 142 | 143 | 144 | #pragma mark - Light Blue 145 | + (UIColor *)paperColorLightBlue50 { return UIColorFromRGB(0xE1F5FE); } 146 | + (UIColor *)paperColorLightBlue100 { return UIColorFromRGB(0xB3E5FC); } 147 | + (UIColor *)paperColorLightBlue200 { return UIColorFromRGB(0x81D4FA); } 148 | + (UIColor *)paperColorLightBlue300 { return UIColorFromRGB(0x4FC3F7); } 149 | + (UIColor *)paperColorLightBlue400 { return UIColorFromRGB(0x29B6F6); } 150 | + (UIColor *)paperColorLightBlue500 { return UIColorFromRGB(0x03A9F4); } 151 | + (UIColor *)paperColorLightBlue600 { return UIColorFromRGB(0x039BE5); } 152 | + (UIColor *)paperColorLightBlue700 { return UIColorFromRGB(0x0288D1); } 153 | + (UIColor *)paperColorLightBlue800 { return UIColorFromRGB(0x0277BD); } 154 | + (UIColor *)paperColorLightBlue900 { return UIColorFromRGB(0x01579B); } 155 | + (UIColor *)paperColorLightBlueA100 { return UIColorFromRGB(0x80D8FF); } 156 | + (UIColor *)paperColorLightBlueA200 { return UIColorFromRGB(0x40C4FF); } 157 | + (UIColor *)paperColorLightBlueA400 { return UIColorFromRGB(0x00B0FF); } 158 | + (UIColor *)paperColorLightBlueA700 { return UIColorFromRGB(0x0091EA); } 159 | + (UIColor *)paperColorLightBlue { return [UIColor paperColorLightBlue500]; } 160 | 161 | 162 | #pragma mark - Cyan 163 | + (UIColor *)paperColorCyan50 { return UIColorFromRGB(0xE0F7FA); } 164 | + (UIColor *)paperColorCyan100 { return UIColorFromRGB(0xB2EBF2); } 165 | + (UIColor *)paperColorCyan200 { return UIColorFromRGB(0x80DEEA); } 166 | + (UIColor *)paperColorCyan300 { return UIColorFromRGB(0x4DD0E1); } 167 | + (UIColor *)paperColorCyan400 { return UIColorFromRGB(0x26C6DA); } 168 | + (UIColor *)paperColorCyan500 { return UIColorFromRGB(0x00BCD4); } 169 | + (UIColor *)paperColorCyan600 { return UIColorFromRGB(0x00ACC1); } 170 | + (UIColor *)paperColorCyan700 { return UIColorFromRGB(0x0097A7); } 171 | + (UIColor *)paperColorCyan800 { return UIColorFromRGB(0x00838F); } 172 | + (UIColor *)paperColorCyan900 { return UIColorFromRGB(0x006064); } 173 | + (UIColor *)paperColorCyanA100 { return UIColorFromRGB(0x84FFFF); } 174 | + (UIColor *)paperColorCyanA200 { return UIColorFromRGB(0x18FFFF); } 175 | + (UIColor *)paperColorCyanA400 { return UIColorFromRGB(0x00E5FF); } 176 | + (UIColor *)paperColorCyanA700 { return UIColorFromRGB(0x00B8D4); } 177 | + (UIColor *)paperColorCyan { return [UIColor paperColorCyan500]; } 178 | 179 | 180 | #pragma mark - Teal 181 | + (UIColor *)paperColorTeal50 { return UIColorFromRGB(0xE0F2F1); } 182 | + (UIColor *)paperColorTeal100 { return UIColorFromRGB(0xB2DFDB); } 183 | + (UIColor *)paperColorTeal200 { return UIColorFromRGB(0x80CBC4); } 184 | + (UIColor *)paperColorTeal300 { return UIColorFromRGB(0x4DB6AC); } 185 | + (UIColor *)paperColorTeal400 { return UIColorFromRGB(0x26A69A); } 186 | + (UIColor *)paperColorTeal500 { return UIColorFromRGB(0x009688); } 187 | + (UIColor *)paperColorTeal600 { return UIColorFromRGB(0x00897B); } 188 | + (UIColor *)paperColorTeal700 { return UIColorFromRGB(0x00796B); } 189 | + (UIColor *)paperColorTeal800 { return UIColorFromRGB(0x00695C); } 190 | + (UIColor *)paperColorTeal900 { return UIColorFromRGB(0x004D40); } 191 | + (UIColor *)paperColorTealA100 { return UIColorFromRGB(0xA7FFEB); } 192 | + (UIColor *)paperColorTealA200 { return UIColorFromRGB(0x64FFDA); } 193 | + (UIColor *)paperColorTealA400 { return UIColorFromRGB(0x1DE9B6); } 194 | + (UIColor *)paperColorTealA700 { return UIColorFromRGB(0x00BFA5); } 195 | + (UIColor *)paperColorTeal { return [UIColor paperColorTeal500]; } 196 | 197 | 198 | #pragma mark - Green 199 | + (UIColor *)paperColorGreen50 { return UIColorFromRGB(0xE8F5E9); } 200 | + (UIColor *)paperColorGreen100 { return UIColorFromRGB(0xC8E6C9); } 201 | + (UIColor *)paperColorGreen200 { return UIColorFromRGB(0xA5D6A7); } 202 | + (UIColor *)paperColorGreen300 { return UIColorFromRGB(0x81C784); } 203 | + (UIColor *)paperColorGreen400 { return UIColorFromRGB(0x66BB6A); } 204 | + (UIColor *)paperColorGreen500 { return UIColorFromRGB(0x4CAF50); } 205 | + (UIColor *)paperColorGreen600 { return UIColorFromRGB(0x43A047); } 206 | + (UIColor *)paperColorGreen700 { return UIColorFromRGB(0x388E3C); } 207 | + (UIColor *)paperColorGreen800 { return UIColorFromRGB(0x2E7D32); } 208 | + (UIColor *)paperColorGreen900 { return UIColorFromRGB(0x1B5E20); } 209 | + (UIColor *)paperColorGreenA100 { return UIColorFromRGB(0xB9F6CA); } 210 | + (UIColor *)paperColorGreenA200 { return UIColorFromRGB(0x69F0AE); } 211 | + (UIColor *)paperColorGreenA400 { return UIColorFromRGB(0x00E676); } 212 | + (UIColor *)paperColorGreenA700 { return UIColorFromRGB(0x00C853); } 213 | + (UIColor *)paperColorGreen { return [UIColor paperColorGreen500]; } 214 | 215 | 216 | #pragma mark - Light Green 217 | + (UIColor *)paperColorLightGreen50 { return UIColorFromRGB(0xF1F8E9); } 218 | + (UIColor *)paperColorLightGreen100 { return UIColorFromRGB(0xDCEDC8); } 219 | + (UIColor *)paperColorLightGreen200 { return UIColorFromRGB(0xC5E1A5); } 220 | + (UIColor *)paperColorLightGreen300 { return UIColorFromRGB(0xAED581); } 221 | + (UIColor *)paperColorLightGreen400 { return UIColorFromRGB(0x9CCC65); } 222 | + (UIColor *)paperColorLightGreen500 { return UIColorFromRGB(0x8BC34A); } 223 | + (UIColor *)paperColorLightGreen600 { return UIColorFromRGB(0x7CB342); } 224 | + (UIColor *)paperColorLightGreen700 { return UIColorFromRGB(0x689F38); } 225 | + (UIColor *)paperColorLightGreen800 { return UIColorFromRGB(0x558B2F); } 226 | + (UIColor *)paperColorLightGreen900 { return UIColorFromRGB(0x33691E); } 227 | + (UIColor *)paperColorLightGreenA100 { return UIColorFromRGB(0xCCFF90); } 228 | + (UIColor *)paperColorLightGreenA200 { return UIColorFromRGB(0xB2FF59); } 229 | + (UIColor *)paperColorLightGreenA400 { return UIColorFromRGB(0x76FF03); } 230 | + (UIColor *)paperColorLightGreenA700 { return UIColorFromRGB(0x64DD17); } 231 | + (UIColor *)paperColorLightGreen { return [UIColor paperColorLightGreen500]; } 232 | 233 | 234 | #pragma mark - Lime 235 | + (UIColor *)paperColorLime50 { return UIColorFromRGB(0xF9FBE7); } 236 | + (UIColor *)paperColorLime100 { return UIColorFromRGB(0xF0F4C3); } 237 | + (UIColor *)paperColorLime200 { return UIColorFromRGB(0xE6EE9C); } 238 | + (UIColor *)paperColorLime300 { return UIColorFromRGB(0xDCE775); } 239 | + (UIColor *)paperColorLime400 { return UIColorFromRGB(0xD4E157); } 240 | + (UIColor *)paperColorLime500 { return UIColorFromRGB(0xCDDC39); } 241 | + (UIColor *)paperColorLime600 { return UIColorFromRGB(0xC0CA33); } 242 | + (UIColor *)paperColorLime700 { return UIColorFromRGB(0xAFB42B); } 243 | + (UIColor *)paperColorLime800 { return UIColorFromRGB(0x9E9D24); } 244 | + (UIColor *)paperColorLime900 { return UIColorFromRGB(0x827717); } 245 | + (UIColor *)paperColorLimeA100 { return UIColorFromRGB(0xF4FF81); } 246 | + (UIColor *)paperColorLimeA200 { return UIColorFromRGB(0xEEFF41); } 247 | + (UIColor *)paperColorLimeA400 { return UIColorFromRGB(0xC6FF00); } 248 | + (UIColor *)paperColorLimeA700 { return UIColorFromRGB(0xAEEA00); } 249 | + (UIColor *)paperColorLime { return [UIColor paperColorLime500]; } 250 | 251 | 252 | #pragma mark - Yellow 253 | + (UIColor *)paperColorYellow50 { return UIColorFromRGB(0xFFFDE7); } 254 | + (UIColor *)paperColorYellow100 { return UIColorFromRGB(0xFFF9C4); } 255 | + (UIColor *)paperColorYellow200 { return UIColorFromRGB(0xFFF59D); } 256 | + (UIColor *)paperColorYellow300 { return UIColorFromRGB(0xFFF176); } 257 | + (UIColor *)paperColorYellow400 { return UIColorFromRGB(0xFFEE58); } 258 | + (UIColor *)paperColorYellow500 { return UIColorFromRGB(0xFFEB3B); } 259 | + (UIColor *)paperColorYellow600 { return UIColorFromRGB(0xFDD835); } 260 | + (UIColor *)paperColorYellow700 { return UIColorFromRGB(0xFBC02D); } 261 | + (UIColor *)paperColorYellow800 { return UIColorFromRGB(0xF9A825); } 262 | + (UIColor *)paperColorYellow900 { return UIColorFromRGB(0xF57F17); } 263 | + (UIColor *)paperColorYellowA100 { return UIColorFromRGB(0xFFFF8D); } 264 | + (UIColor *)paperColorYellowA200 { return UIColorFromRGB(0xFFFF00); } 265 | + (UIColor *)paperColorYellowA400 { return UIColorFromRGB(0xFFEA00); } 266 | + (UIColor *)paperColorYellowA700 { return UIColorFromRGB(0xFFD600); } 267 | + (UIColor *)paperColorYellow { return [UIColor paperColorYellow500]; } 268 | 269 | 270 | #pragma mark - Amber 271 | + (UIColor *)paperColorAmber50 { return UIColorFromRGB(0xFFF8E1); } 272 | + (UIColor *)paperColorAmber100 { return UIColorFromRGB(0xFFECB3); } 273 | + (UIColor *)paperColorAmber200 { return UIColorFromRGB(0xFFE082); } 274 | + (UIColor *)paperColorAmber300 { return UIColorFromRGB(0xFFD54F); } 275 | + (UIColor *)paperColorAmber400 { return UIColorFromRGB(0xFFCA28); } 276 | + (UIColor *)paperColorAmber500 { return UIColorFromRGB(0xFFC107); } 277 | + (UIColor *)paperColorAmber600 { return UIColorFromRGB(0xFFB300); } 278 | + (UIColor *)paperColorAmber700 { return UIColorFromRGB(0xFFA000); } 279 | + (UIColor *)paperColorAmber800 { return UIColorFromRGB(0xFF8F00); } 280 | + (UIColor *)paperColorAmber900 { return UIColorFromRGB(0xFF6F00); } 281 | + (UIColor *)paperColorAmberA100 { return UIColorFromRGB(0xFFE57F); } 282 | + (UIColor *)paperColorAmberA200 { return UIColorFromRGB(0xFFD740); } 283 | + (UIColor *)paperColorAmberA400 { return UIColorFromRGB(0xFFC400); } 284 | + (UIColor *)paperColorAmberA700 { return UIColorFromRGB(0xFFAB00); } 285 | + (UIColor *)paperColorAmber { return [UIColor paperColorAmber500]; } 286 | 287 | 288 | #pragma mark - Orange 289 | + (UIColor *)paperColorOrange50 { return UIColorFromRGB(0xFFF3E0); } 290 | + (UIColor *)paperColorOrange100 { return UIColorFromRGB(0xFFE0B2); } 291 | + (UIColor *)paperColorOrange200 { return UIColorFromRGB(0xFFCC80); } 292 | + (UIColor *)paperColorOrange300 { return UIColorFromRGB(0xFFB74D); } 293 | + (UIColor *)paperColorOrange400 { return UIColorFromRGB(0xFFA726); } 294 | + (UIColor *)paperColorOrange500 { return UIColorFromRGB(0xFF9800); } 295 | + (UIColor *)paperColorOrange600 { return UIColorFromRGB(0xFB8C00); } 296 | + (UIColor *)paperColorOrange700 { return UIColorFromRGB(0xF57C00); } 297 | + (UIColor *)paperColorOrange800 { return UIColorFromRGB(0xEF6C00); } 298 | + (UIColor *)paperColorOrange900 { return UIColorFromRGB(0xE65100); } 299 | + (UIColor *)paperColorOrangeA100 { return UIColorFromRGB(0xFFD180); } 300 | + (UIColor *)paperColorOrangeA200 { return UIColorFromRGB(0xFFAB40); } 301 | + (UIColor *)paperColorOrangeA400 { return UIColorFromRGB(0xFF9100); } 302 | + (UIColor *)paperColorOrangeA700 { return UIColorFromRGB(0xFF6D00); } 303 | + (UIColor *)paperColorOrange { return [UIColor paperColorOrange500]; } 304 | 305 | 306 | #pragma mark - Deep Orange 307 | + (UIColor *)paperColorDeepOrange50 { return UIColorFromRGB(0xFBE9E7); } 308 | + (UIColor *)paperColorDeepOrange100 { return UIColorFromRGB(0xFFCCBC); } 309 | + (UIColor *)paperColorDeepOrange200 { return UIColorFromRGB(0xFFAB91); } 310 | + (UIColor *)paperColorDeepOrange300 { return UIColorFromRGB(0xFF8A65); } 311 | + (UIColor *)paperColorDeepOrange400 { return UIColorFromRGB(0xFF7043); } 312 | + (UIColor *)paperColorDeepOrange500 { return UIColorFromRGB(0xFF5722); } 313 | + (UIColor *)paperColorDeepOrange600 { return UIColorFromRGB(0xF4511E); } 314 | + (UIColor *)paperColorDeepOrange700 { return UIColorFromRGB(0xE64A19); } 315 | + (UIColor *)paperColorDeepOrange800 { return UIColorFromRGB(0xD84315); } 316 | + (UIColor *)paperColorDeepOrange900 { return UIColorFromRGB(0xBF360C); } 317 | + (UIColor *)paperColorDeepOrangeA100 { return UIColorFromRGB(0xFF9E80); } 318 | + (UIColor *)paperColorDeepOrangeA200 { return UIColorFromRGB(0xFF6E40); } 319 | + (UIColor *)paperColorDeepOrangeA400 { return UIColorFromRGB(0xFF3D00); } 320 | + (UIColor *)paperColorDeepOrangeA700 { return UIColorFromRGB(0xDD2C00); } 321 | + (UIColor *)paperColorDeepOrange { return [UIColor paperColorDeepOrange500]; } 322 | 323 | 324 | #pragma mark - Brown 325 | + (UIColor *)paperColorBrown50 { return UIColorFromRGB(0xEFEBE9); } 326 | + (UIColor *)paperColorBrown100 { return UIColorFromRGB(0xD7CCC8); } 327 | + (UIColor *)paperColorBrown200 { return UIColorFromRGB(0xBCAAA4); } 328 | + (UIColor *)paperColorBrown300 { return UIColorFromRGB(0xA1887F); } 329 | + (UIColor *)paperColorBrown400 { return UIColorFromRGB(0x8D6E63); } 330 | + (UIColor *)paperColorBrown500 { return UIColorFromRGB(0x795548); } 331 | + (UIColor *)paperColorBrown600 { return UIColorFromRGB(0x6D4C41); } 332 | + (UIColor *)paperColorBrown700 { return UIColorFromRGB(0x5D4037); } 333 | + (UIColor *)paperColorBrown800 { return UIColorFromRGB(0x4E342E); } 334 | + (UIColor *)paperColorBrown900 { return UIColorFromRGB(0x3E2723); } 335 | + (UIColor *)paperColorBrown { return [UIColor paperColorBrown500]; } 336 | 337 | 338 | #pragma mark - Gray 339 | + (UIColor *)paperColorGray50 { return UIColorFromRGB(0xFAFAFA); } 340 | + (UIColor *)paperColorGray100 { return UIColorFromRGB(0xF5F5F5); } 341 | + (UIColor *)paperColorGray200 { return UIColorFromRGB(0xEEEEEE); } 342 | + (UIColor *)paperColorGray300 { return UIColorFromRGB(0xE0E0E0); } 343 | + (UIColor *)paperColorGray400 { return UIColorFromRGB(0xBDBDBD); } 344 | + (UIColor *)paperColorGray500 { return UIColorFromRGB(0x9E9E9E); } 345 | + (UIColor *)paperColorGray600 { return UIColorFromRGB(0x757575); } 346 | + (UIColor *)paperColorGray700 { return UIColorFromRGB(0x616161); } 347 | + (UIColor *)paperColorGray800 { return UIColorFromRGB(0x424242); } 348 | + (UIColor *)paperColorGray900 { return UIColorFromRGB(0x212121); } 349 | + (UIColor *)paperColorGray { return [UIColor paperColorGray500]; } 350 | 351 | 352 | #pragma mark - Blue Gray 353 | + (UIColor *)paperColorBlueGray50 { return UIColorFromRGB(0xECEFF1); } 354 | + (UIColor *)paperColorBlueGray100 { return UIColorFromRGB(0xCFD8DC); } 355 | + (UIColor *)paperColorBlueGray200 { return UIColorFromRGB(0xB0BEC5); } 356 | + (UIColor *)paperColorBlueGray300 { return UIColorFromRGB(0x90A4AE); } 357 | + (UIColor *)paperColorBlueGray400 { return UIColorFromRGB(0x78909C); } 358 | + (UIColor *)paperColorBlueGray500 { return UIColorFromRGB(0x607D8B); } 359 | + (UIColor *)paperColorBlueGray600 { return UIColorFromRGB(0x546E7A); } 360 | + (UIColor *)paperColorBlueGray700 { return UIColorFromRGB(0x455A64); } 361 | + (UIColor *)paperColorBlueGray800 { return UIColorFromRGB(0x37474F); } 362 | + (UIColor *)paperColorBlueGray900 { return UIColorFromRGB(0x263238); } 363 | + (UIColor *)paperColorBlueGray { return [UIColor paperColorBlueGray500]; } 364 | 365 | 366 | #pragma mark - Text Colors Dark 367 | + (UIColor *)paperColorTextDark { return [UIColor colorWithWhite:0 alpha:0.87f]; } 368 | + (UIColor *)paperColorTextDarkSecondary { return [UIColor colorWithWhite:0 alpha:0.54f]; } 369 | + (UIColor *)paperColorTextDarkHint { return [UIColor colorWithWhite:0 alpha:0.26f]; } 370 | + (UIColor *)paperColorTextDarkDivider { return [UIColor colorWithWhite:0 alpha:0.12f]; } 371 | 372 | #pragma mark - Text Colors Light 373 | + (UIColor *)paperColorTextLight { return [UIColor colorWithWhite:1 alpha:1]; } 374 | + (UIColor *)paperColorTextLightSecondary { return [UIColor colorWithWhite:1 alpha:0.7f]; } 375 | + (UIColor *)paperColorTextLightHint { return [UIColor colorWithWhite:1 alpha:0.3f]; } 376 | + (UIColor *)paperColorTextLightDivider { return [UIColor colorWithWhite:1 alpha:0.12f]; } 377 | 378 | 379 | #pragma mark - Utilities 380 | // Private: 381 | + (CGFloat)brightnessOfColor:(UIColor *)color 382 | { 383 | const CGFloat *components = CGColorGetComponents(color.CGColor); 384 | CGFloat brightness = ((components[0] * 299) + (components[1] * 587) + (components[2] * 114)) / 1000; 385 | return brightness; 386 | } 387 | 388 | // Public: 389 | + (BOOL)isColorClear:(UIColor *)color 390 | { 391 | if (color == [UIColor clearColor]) { 392 | return YES; 393 | } 394 | 395 | NSUInteger totalComponents = CGColorGetNumberOfComponents(color.CGColor); 396 | BOOL isGreyscale = (totalComponents == 2) ? YES : NO; 397 | CGFloat *components = (CGFloat *)CGColorGetComponents(color.CGColor); 398 | if (!components) { 399 | return YES; 400 | } 401 | 402 | if(isGreyscale) { 403 | if (components[1] <= 0) { 404 | return YES; 405 | } 406 | } 407 | else { 408 | if (components[3] <= 0) { 409 | return YES; 410 | } 411 | } 412 | 413 | return NO; 414 | } 415 | 416 | + (BOOL)isColorDark:(UIColor *)color 417 | { 418 | CGFloat brightness = [UIColor brightnessOfColor:color]; 419 | if (brightness < 0.5f) { 420 | return YES; 421 | } 422 | return NO; 423 | } 424 | 425 | + (BOOL)isColorLight:(UIColor *)color 426 | { 427 | return ![UIColor isColorDark:color]; 428 | } 429 | 430 | + (UIImage *)imageFromColor:(UIColor *)color 431 | { 432 | CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); 433 | UIGraphicsBeginImageContext(rect.size); 434 | CGContextRef context = UIGraphicsGetCurrentContext(); 435 | 436 | CGContextSetFillColorWithColor(context, [color CGColor]); 437 | CGContextFillRect(context, rect); 438 | 439 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 440 | UIGraphicsEndImageContext(); 441 | 442 | return image; 443 | } 444 | 445 | + (CAGradientLayer *)gradientWithStartColor:(UIColor *)startColor 446 | endColor:(UIColor *)endColor 447 | { 448 | CAGradientLayer *gradient = [CAGradientLayer layer]; 449 | gradient.colors = @[(id)startColor.CGColor, (id)endColor.CGColor]; 450 | 451 | return gradient; 452 | } 453 | 454 | + (NSString *)hexStringFromRGBColor:(UIColor *)color 455 | { 456 | NSString *hexColor = nil; 457 | 458 | // This method only works for RGB colors. 459 | if (color 460 | && 461 | CGColorGetNumberOfComponents(color.CGColor) == 4) { 462 | // Get the red, green and blue components 463 | const CGFloat *components = CGColorGetComponents(color.CGColor); 464 | 465 | // These components range from [0.0, 1.0] and need to be converted to [0, 255] 466 | CGFloat red, green, blue; 467 | red = roundf(components[0] * 255.0); 468 | green = roundf(components[1] * 255.0); 469 | blue = roundf(components[2] * 255.0); 470 | 471 | // Convert with %02x (use 02 to always get two chars) 472 | hexColor = [[[NSString alloc] initWithFormat:@"%02x%02x%02x", (int)red, (int)green, (int)blue] uppercaseString]; 473 | } 474 | 475 | return hexColor; 476 | } 477 | 478 | 479 | @end 480 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BFPaperTabBar 2 | ============= 3 | I am no longer supporting this library.

4 | [Please consider using BFPaperTabBarController instead, which I do support and works better than BFPaperTabBar!](https://github.com/bfeher/BFPaperTabBarController)
5 | 6 | [![CocoaPods](https://img.shields.io/cocoapods/v/BFPaperTabBar.svg?style=flat)](https://github.com/bfeher/BFPaperTabBar) 7 | 8 | > iOS UITabBar inspired by Google's Paper Material Design. 9 | 10 | ![Animated Screenshot](https://raw.githubusercontent.com/bfeher/BFPaperTabBar/master/BFPaperTabBarDemoGif.gif "Animated Screenshot")
11 | *(The tiny dot on the bottom left is just the rounded corner of the iOS simulator showing. Also note that sometimes the iOS Simulator might show some strange color lines on the BFPaperTabBar. This does not show up on a real device.* 12 | 13 | 14 | To Do 15 | --------- 16 | [Convince you to use BFPaperTabBarController instead!!!](https://github.com/bfeher/BFPaperTabBarController)
17 | Reordering tabs.
18 | Adding/Removing tabs.
19 | Stop crying while trying to implement the above. 20 | 21 | 22 | About 23 | --------- 24 | _BFPaperTabBar_ is a subclass of UITabBar that behaves much like the new paper tab bar from Google's Material Design Labs. 25 | All animation are asynchronous and are performed on sublayers. 26 | BFPaperTabBars work right away with pleasing default behaviors, however they can be easily customized! The tap-circle color, background fade color, tap-circle diameter, underline color, and underline thickness are all readily customizable via public properties. 27 | 28 | By default, BFPaperTabBars use "Smart Color" which will match the tap-circle, background fade, and underline bar colors to the color of the `tabBar.tintColor`. 29 | You can turn off Smart Color by setting the property, `.usesSmartColor` to `NO`. If you disable Smart Color, a gray color will be used by default for both the tap-circle and the background color fade. 30 | You can set your own colors via: `.tapCircleColor` and `.backgroundFadeColor`. Note that setting these disables Smart Color. 31 | 32 | ## Properties 33 | `BOOL usesSmartColor`
34 | A flag to set YES to use Smart Color, or NO to use a custom color scheme. While Smart Color is the default (usesSmartColor = YES), customization is cool too. 35 | 36 | `UIColor *tapCircleColor`
37 | The UIColor to use for the circle which appears where you tap. NOTE: Setting this defeats the "Smart Color" ability of the tap circle. Alpha values less than 1 are recommended. 38 | 39 | `UIColor *backgroundFadeColor`
40 | The UIColor to fade clear backgrounds to. NOTE: Setting this defeats the "Smart Color" ability of the background fade. An alpha value of 1 is recommended, as the fade is a constant (clearBGFadeConstant) defined in the BFPaperTabBar.m. This bothers me too. 41 | 42 | `CGFloat tapCircleDiameter`
43 | The CGFloat value representing the Diameter of the tap-circle. By default it will be calculated to almost be big enough to cover up the whole background. Any value less than zero will result in default being used. Three pleasing sizes, `bfPaperTabBar_tapCircleDiameterSmall`, `bfPaperTabBar_tapCircleDiameterMedium`, and `bfPaperTabBar_tapCircleDiameterLarge` are also available for use. 44 | 45 | `BOOL rippleFromTapLocation`
46 | A flag to set to YES to have the tap-circle ripple from point of touch. If this is set to NO, the tap-circle will always ripple from the center of the tab. Default is YES. 47 | 48 | `UIColor *underlineColor`
49 | The UIColor to use for the underline below the currently selected tab. NOTE: Setting this defeats the "Smart Color" ability of this underline. 50 | 51 | `CGFloat underlineThickness`
52 | The CGFLoat to set the thickness (height) of the underline. NOTE: Any value greater than 1 will cover up the bottoms of low-hanging letters of a default TabBarItem's title. 53 | 54 | `BOOL showUnderline`
55 | A flag to set to YES to show an underline bar that tracks the currently selected tab. 56 | 57 | `BOOL showTapCircleAndBackgroundFade`
58 | A flag to set to YES to show the tap-circle and background fade. If NO, they will not appear. 59 | 60 | 61 | Usage 62 | --------- 63 | Add the _BFPaperTabBar_ header and implementation file to your project. (.h & .m) 64 | 65 | ### Using Storyboards 66 | The easiest way to use a BFPaperTabBar is to set up a UITabBarController in your Storyboard and then set its UITabBar's class to BFPaperTabBar. 67 | ![Set Class](https://raw.githubusercontent.com/bfeher/BFPaperTabBar/master/set-class.png "Set Class") 68 | 69 | ### Programmatically Creating a BFPaperTabBar 70 | ```objective-c 71 | BFPaperTabBar *tabBar = [[BFPaperTabBar alloc] init]; 72 | ``` 73 | 74 | ### Customized Example 75 | *After setting your UITabBarController's UITabBar class to BFPaperTabBar: (Taken directly from example project.)*
76 | ```objective-c 77 | ((BFPaperTabBar *)self.tabBar).rippleFromTapLocation = NO; // YES = spawn tap-circles from tap locaiton. NO = spawn tap-circles from the center of the tab. 78 | 79 | ((BFPaperTabBar *)self.tabBar).usesSmartColor = NO; // YES = colors are chosen from the tabBar.tintColor. NO = colors will be shades of gray. 80 | 81 | ((BFPaperTabBar *)self.tabBar).tapCircleColor = [[UIColor paperColorLightBlue] colorWithAlphaComponent:0.2]; // Set this to customize the tap-circle color. 82 | 83 | ((BFPaperTabBar *)self.tabBar).backgroundFadeColor = [UIColor paperColorGreen800]; // Set this to customize the background fade color. 84 | 85 | ((BFPaperTabBar *)self.tabBar).tapCircleDiameter = bfPaperTabBar_tapCircleDiameterLarge; // Set this to customize the tap-circle diameter. 86 | 87 | ((BFPaperTabBar *)self.tabBar).underlineColor = [UIColor paperColorDeepPurpleA400]; // Set this to customize the color of the underline which highlights the currently selected tab. 88 | 89 | ((BFPaperTabBar *)self.tabBar).showUnderline = NO; // YES = show the underline bar, NO = hide the underline bar. 90 | 91 | ((BFPaperTabBar *)self.tabBar).underlineThickness = 2.f; // Set this to adjust the thickness (height) of the underline bar. Not that any value greater than 1 could cover up parts of the TabBarItem's title. 92 | 93 | ((BFPaperTabBar *)self.tabBar).showTapCircleAndBackgroundFade = NO; // YES = show the tap-circles and add a color fade the background. NO = do not show the tap-circles and background fade. 94 | ``` 95 | 96 | Cocoapods 97 | ------- 98 | 99 | CocoaPods are the best way to manage library dependencies in Objective-C projects. 100 | Learn more at http://cocoapods.org 101 | 102 | Add this to your podfile to add BFPaperTabBar to your project. 103 | ```ruby 104 | platform :ios, '7.0' 105 | pod 'BFPaperTabBar', '~> 1.0.6' 106 | ``` 107 | 108 | 109 | License 110 | -------- 111 | _BFPaperTabBar_ uses the MIT License: 112 | 113 | > Please see included [LICENSE file](https://raw.githubusercontent.com/bfeher/BFPaperTabBar/master/LICENSE.md). 114 | -------------------------------------------------------------------------------- /frame1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperTabBar/dd31d9d072cdeabb10e6097d8987a3eedb327fe7/frame1.png -------------------------------------------------------------------------------- /set-class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperTabBar/dd31d9d072cdeabb10e6097d8987a3eedb327fe7/set-class.png --------------------------------------------------------------------------------