diff --git a/AppearanceKit.podspec b/AppearanceKit.podspec index c1d3cda..e974d1b 100644 --- a/AppearanceKit.podspec +++ b/AppearanceKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'AppearanceKit' - s.version = '2.8.1' + s.version = '2.8.2' s.summary = 'Change the appearance of UIKit elements.' # This description is used to generate tags and improve search results. diff --git a/AppearanceKit/Classes/appearances/content/UILabelAppearance.swift b/AppearanceKit/Classes/appearances/content/UILabelAppearance.swift index 7e3c128..a8223df 100644 --- a/AppearanceKit/Classes/appearances/content/UILabelAppearance.swift +++ b/AppearanceKit/Classes/appearances/content/UILabelAppearance.swift @@ -43,6 +43,10 @@ public extension UILabelAppearance { self.configure(aLabel) return } + if let aTextField = content as? UITextField { + self.configure(aTextField) + return + } //assert(false) } @@ -74,4 +78,22 @@ public extension UILabelAppearance { } } + + public func configure(_ content: T) where T: UITextField { + let aContent = content + + aContent.backgroundColor = self.backgroundColor?.color + aContent.tintColor = self.tintColor?.color + + aContent.font = self.font?.font + aContent.textColor = self.textColor?.color + + if let alignement = self.alignement { + aContent.textAlignment = alignement + } + if let adjusts = self.adjustsFontSizeToFitWidth { + aContent.adjustsFontSizeToFitWidth = adjusts + } + } } + diff --git a/Example/AppearanceKit.xcodeproj/project.pbxproj b/Example/AppearanceKit.xcodeproj/project.pbxproj index 3c37cd4..2b48897 100644 --- a/Example/AppearanceKit.xcodeproj/project.pbxproj +++ b/Example/AppearanceKit.xcodeproj/project.pbxproj @@ -7,20 +7,20 @@ objects = { /* Begin PBXBuildFile section */ - 82DFCF2BCEE814F4E66E6BB2 /* Pods_AppearanceKit_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A50AF171A1DB057AAF3EB9BE /* Pods_AppearanceKit_Tests.framework */; }; + 1091EA7842F69757D81A7CEB /* Pods_AppearanceKit_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 519C8FE5B1882CAFBE056CD7 /* Pods_AppearanceKit_Tests.framework */; }; F8B1405D1F62BAF400285C3E /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1477DDAF404D88F5DF3B5C53 /* Pods-AppearanceKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppearanceKit_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AppearanceKit_Tests/Pods-AppearanceKit_Tests.release.xcconfig"; sourceTree = ""; }; + 201BEDD4D80A9B34353E8E4F /* Pods-AppearanceKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppearanceKit_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AppearanceKit_Tests/Pods-AppearanceKit_Tests.debug.xcconfig"; sourceTree = ""; }; + 519C8FE5B1882CAFBE056CD7 /* Pods_AppearanceKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppearanceKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACE51AFB9204008FA782 /* AppearanceKit_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppearanceKit_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 73A435F0A059F6822F466CA6 /* AppearanceKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AppearanceKit.podspec; path = ../AppearanceKit.podspec; sourceTree = ""; }; - 7CAD82AC61018F352E6CF5F6 /* Pods-AppearanceKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppearanceKit_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AppearanceKit_Tests/Pods-AppearanceKit_Tests.release.xcconfig"; sourceTree = ""; }; 7EB7D8DB96CA94A134CADAB9 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 979EDEAF339C3E81A858C794 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - A50AF171A1DB057AAF3EB9BE /* Pods_AppearanceKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppearanceKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DAFDD4C472C58A553D761EED /* Pods-AppearanceKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppearanceKit_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AppearanceKit_Tests/Pods-AppearanceKit_Tests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -28,17 +28,17 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 82DFCF2BCEE814F4E66E6BB2 /* Pods_AppearanceKit_Tests.framework in Frameworks */, + 1091EA7842F69757D81A7CEB /* Pods_AppearanceKit_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 033A51ED4F5E781E387954EF /* Frameworks */ = { + 1390B2055FDBE97789D8E729 /* Frameworks */ = { isa = PBXGroup; children = ( - A50AF171A1DB057AAF3EB9BE /* Pods_AppearanceKit_Tests.framework */, + 519C8FE5B1882CAFBE056CD7 /* Pods_AppearanceKit_Tests.framework */, ); name = Frameworks; sourceTree = ""; @@ -49,8 +49,8 @@ 607FACF51AFB993E008FA782 /* Podspec Metadata */, 607FACE81AFB9204008FA782 /* Tests */, 607FACD11AFB9204008FA782 /* Products */, - F26ABF3340F5B1F488C7756B /* Pods */, - 033A51ED4F5E781E387954EF /* Frameworks */, + 935E14FBA07A7A7F78211459 /* Pods */, + 1390B2055FDBE97789D8E729 /* Frameworks */, ); sourceTree = ""; }; @@ -89,11 +89,11 @@ name = "Podspec Metadata"; sourceTree = ""; }; - F26ABF3340F5B1F488C7756B /* Pods */ = { + 935E14FBA07A7A7F78211459 /* Pods */ = { isa = PBXGroup; children = ( - DAFDD4C472C58A553D761EED /* Pods-AppearanceKit_Tests.debug.xcconfig */, - 7CAD82AC61018F352E6CF5F6 /* Pods-AppearanceKit_Tests.release.xcconfig */, + 201BEDD4D80A9B34353E8E4F /* Pods-AppearanceKit_Tests.debug.xcconfig */, + 1477DDAF404D88F5DF3B5C53 /* Pods-AppearanceKit_Tests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -105,12 +105,12 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AppearanceKit_Tests" */; buildPhases = ( - 761C5DA0DEF49A1FC6712755 /* [CP] Check Pods Manifest.lock */, + 67CCE012A78C602FF17DEE7E /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, - 40751C50E963B8A6C1E2B7EA /* [CP] Embed Pods Frameworks */, - A1D385C8681DDECFA2CAEE72 /* [CP] Copy Pods Resources */, + 0B302C6D0434CFCCB8EC8F65 /* [CP] Embed Pods Frameworks */, + E95664E58E6F1D5124CFE339 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -167,7 +167,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 40751C50E963B8A6C1E2B7EA /* [CP] Embed Pods Frameworks */ = { + 0B302C6D0434CFCCB8EC8F65 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -189,7 +189,7 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AppearanceKit_Tests/Pods-AppearanceKit_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 761C5DA0DEF49A1FC6712755 /* [CP] Check Pods Manifest.lock */ = { + 67CCE012A78C602FF17DEE7E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -207,7 +207,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - A1D385C8681DDECFA2CAEE72 /* [CP] Copy Pods Resources */ = { + E95664E58E6F1D5124CFE339 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -339,7 +339,7 @@ }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DAFDD4C472C58A553D761EED /* Pods-AppearanceKit_Tests.debug.xcconfig */; + baseConfigurationReference = 201BEDD4D80A9B34353E8E4F /* Pods-AppearanceKit_Tests.debug.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", @@ -358,7 +358,7 @@ }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7CAD82AC61018F352E6CF5F6 /* Pods-AppearanceKit_Tests.release.xcconfig */; + baseConfigurationReference = 1477DDAF404D88F5DF3B5C53 /* Pods-AppearanceKit_Tests.release.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 82d65d5..d1fe983 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - AppearanceKit (2.8.1): + - AppearanceKit (2.8.2): - ContentKit - RepresentationKit - ContentKit (2.0): @@ -28,7 +28,7 @@ CHECKOUT OPTIONS: :git: https://github.com/averello/RepresentationKit.git SPEC CHECKSUMS: - AppearanceKit: d049bd1e2d212aad7b237c3807348344814029a5 + AppearanceKit: 7baea1604102dd933265b84eeb553aa2daa708dd ContentKit: 1fd3e6e87cee63cc68e728d12bf9c0b764239249 RepresentationKit: 13e70a642c8f6ff8ea045b76cbe7814d443e735d diff --git a/Example/Pods/Local Podspecs/AppearanceKit.podspec.json b/Example/Pods/Local Podspecs/AppearanceKit.podspec.json index 89aa81c..4108ebe 100644 --- a/Example/Pods/Local Podspecs/AppearanceKit.podspec.json +++ b/Example/Pods/Local Podspecs/AppearanceKit.podspec.json @@ -1,6 +1,6 @@ { "name": "AppearanceKit", - "version": "2.8.1", + "version": "2.8.2", "summary": "Change the appearance of UIKit elements.", "description": "TODO: Add long description of the pod here.", "homepage": "https://github.com/averello/AppearanceKit", @@ -13,7 +13,7 @@ }, "source": { "git": "https://github.com/averello/AppearanceKit.git", - "tag": "2.8.1" + "tag": "2.8.2" }, "platforms": { "ios": "9.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 82d65d5..d1fe983 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - AppearanceKit (2.8.1): + - AppearanceKit (2.8.2): - ContentKit - RepresentationKit - ContentKit (2.0): @@ -28,7 +28,7 @@ CHECKOUT OPTIONS: :git: https://github.com/averello/RepresentationKit.git SPEC CHECKSUMS: - AppearanceKit: d049bd1e2d212aad7b237c3807348344814029a5 + AppearanceKit: 7baea1604102dd933265b84eeb553aa2daa708dd ContentKit: 1fd3e6e87cee63cc68e728d12bf9c0b764239249 RepresentationKit: 13e70a642c8f6ff8ea045b76cbe7814d443e735d diff --git a/Example/Pods/Target Support Files/AppearanceKit/Info.plist b/Example/Pods/Target Support Files/AppearanceKit/Info.plist index 9e07126..c3fee17 100644 --- a/Example/Pods/Target Support Files/AppearanceKit/Info.plist +++ b/Example/Pods/Target Support Files/AppearanceKit/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.8.1 + 2.8.2 CFBundleSignature ???? CFBundleVersion