├── .gitignore ├── .travis.yml ├── Example ├── Podfile ├── RaisePlaceholder.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── RaisePlaceholder-Example.xcscheme ├── RaisePlaceholder │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── RaisePlaceholder.podspec ├── RaisePlaceholder.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── RaisePlaceholder.xcscheme ├── RaisePlaceholder ├── Assets │ └── .gitkeep ├── Classes │ └── .gitkeep ├── Info.plist └── RaisePlaceholder.h └── Sources └── RaisePlaceholder.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -workspace Example/RaisePlaceholder.xcworkspace -scheme RaisePlaceholder-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'RaisePlaceholder_Example' do 4 | pod 'RaisePlaceholder', :path => '../' 5 | 6 | target 'RaisePlaceholder_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 12 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 13 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 14 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 15 | C2252709E3AE107AC68F7603 /* Pods_RaisePlaceholder_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B51B585260B70C43A3B4F67 /* Pods_RaisePlaceholder_Tests.framework */; }; 16 | CF2EE890FC389989CB1AD8E3 /* Pods_RaisePlaceholder_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 19AD2D5390F68A8DC41C6A5D /* Pods_RaisePlaceholder_Example.framework */; }; 17 | FFFEE1C51EED7AFA00832F2C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FFFEE1C31EED7AFA00832F2C /* Main.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 26 | remoteInfo = RaisePlaceholder; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 19AD2D5390F68A8DC41C6A5D /* Pods_RaisePlaceholder_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RaisePlaceholder_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 21EF33B6E24FDB028B17D022 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 33 | 4E50C37D4CC77BB9024E2618 /* Pods-RaisePlaceholder_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaisePlaceholder_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RaisePlaceholder_Example/Pods-RaisePlaceholder_Example.release.xcconfig"; sourceTree = ""; }; 34 | 5816556E5856D9CB90C4379D /* Pods-RaisePlaceholder_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaisePlaceholder_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RaisePlaceholder_Tests/Pods-RaisePlaceholder_Tests.debug.xcconfig"; sourceTree = ""; }; 35 | 5B51B585260B70C43A3B4F67 /* Pods_RaisePlaceholder_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RaisePlaceholder_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 607FACD01AFB9204008FA782 /* RaisePlaceholder_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RaisePlaceholder_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 39 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 40 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 42 | 607FACE51AFB9204008FA782 /* RaisePlaceholder_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RaisePlaceholder_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 45 | B6EEFB81C50A4119AFD7ACBB /* RaisePlaceholder.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = RaisePlaceholder.podspec; path = ../RaisePlaceholder.podspec; sourceTree = ""; }; 46 | ED1A1FDC0379F63404B8DA5F /* Pods-RaisePlaceholder_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaisePlaceholder_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RaisePlaceholder_Example/Pods-RaisePlaceholder_Example.debug.xcconfig"; sourceTree = ""; }; 47 | FF6FCEF16F2431F3C47AD3FB /* Pods-RaisePlaceholder_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaisePlaceholder_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RaisePlaceholder_Tests/Pods-RaisePlaceholder_Tests.release.xcconfig"; sourceTree = ""; }; 48 | FFFEE1C41EED7AFA00832F2C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | CF2EE890FC389989CB1AD8E3 /* Pods_RaisePlaceholder_Example.framework in Frameworks */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | C2252709E3AE107AC68F7603 /* Pods_RaisePlaceholder_Tests.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 0E3016448FE1EEB24CB1D7BB /* Pods */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | ED1A1FDC0379F63404B8DA5F /* Pods-RaisePlaceholder_Example.debug.xcconfig */, 75 | 4E50C37D4CC77BB9024E2618 /* Pods-RaisePlaceholder_Example.release.xcconfig */, 76 | 5816556E5856D9CB90C4379D /* Pods-RaisePlaceholder_Tests.debug.xcconfig */, 77 | FF6FCEF16F2431F3C47AD3FB /* Pods-RaisePlaceholder_Tests.release.xcconfig */, 78 | ); 79 | name = Pods; 80 | sourceTree = ""; 81 | }; 82 | 607FACC71AFB9204008FA782 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 86 | 607FACD21AFB9204008FA782 /* Example for RaisePlaceholder */, 87 | 607FACE81AFB9204008FA782 /* Tests */, 88 | 607FACD11AFB9204008FA782 /* Products */, 89 | 0E3016448FE1EEB24CB1D7BB /* Pods */, 90 | D02C7D883D98186FF8E4C4BF /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 607FACD11AFB9204008FA782 /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 607FACD01AFB9204008FA782 /* RaisePlaceholder_Example.app */, 98 | 607FACE51AFB9204008FA782 /* RaisePlaceholder_Tests.xctest */, 99 | ); 100 | name = Products; 101 | sourceTree = ""; 102 | }; 103 | 607FACD21AFB9204008FA782 /* Example for RaisePlaceholder */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | FFFEE1C31EED7AFA00832F2C /* Main.storyboard */, 107 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 108 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 109 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 110 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 111 | 607FACD31AFB9204008FA782 /* Supporting Files */, 112 | ); 113 | name = "Example for RaisePlaceholder"; 114 | path = RaisePlaceholder; 115 | sourceTree = ""; 116 | }; 117 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 607FACD41AFB9204008FA782 /* Info.plist */, 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | 607FACE81AFB9204008FA782 /* Tests */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 129 | 607FACE91AFB9204008FA782 /* Supporting Files */, 130 | ); 131 | path = Tests; 132 | sourceTree = ""; 133 | }; 134 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 607FACEA1AFB9204008FA782 /* Info.plist */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | B6EEFB81C50A4119AFD7ACBB /* RaisePlaceholder.podspec */, 146 | 21EF33B6E24FDB028B17D022 /* README.md */, 147 | ); 148 | name = "Podspec Metadata"; 149 | sourceTree = ""; 150 | }; 151 | D02C7D883D98186FF8E4C4BF /* Frameworks */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 19AD2D5390F68A8DC41C6A5D /* Pods_RaisePlaceholder_Example.framework */, 155 | 5B51B585260B70C43A3B4F67 /* Pods_RaisePlaceholder_Tests.framework */, 156 | ); 157 | name = Frameworks; 158 | sourceTree = ""; 159 | }; 160 | /* End PBXGroup section */ 161 | 162 | /* Begin PBXNativeTarget section */ 163 | 607FACCF1AFB9204008FA782 /* RaisePlaceholder_Example */ = { 164 | isa = PBXNativeTarget; 165 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RaisePlaceholder_Example" */; 166 | buildPhases = ( 167 | 3CCED458657B6F184A5FBC60 /* [CP] Check Pods Manifest.lock */, 168 | 607FACCC1AFB9204008FA782 /* Sources */, 169 | 607FACCD1AFB9204008FA782 /* Frameworks */, 170 | 607FACCE1AFB9204008FA782 /* Resources */, 171 | 662FC7BDD23A900E31EE202D /* [CP] Embed Pods Frameworks */, 172 | 633B01E51A2B888B94B93E9C /* [CP] Copy Pods Resources */, 173 | ); 174 | buildRules = ( 175 | ); 176 | dependencies = ( 177 | ); 178 | name = RaisePlaceholder_Example; 179 | productName = RaisePlaceholder; 180 | productReference = 607FACD01AFB9204008FA782 /* RaisePlaceholder_Example.app */; 181 | productType = "com.apple.product-type.application"; 182 | }; 183 | 607FACE41AFB9204008FA782 /* RaisePlaceholder_Tests */ = { 184 | isa = PBXNativeTarget; 185 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RaisePlaceholder_Tests" */; 186 | buildPhases = ( 187 | 8FF1D429AAFCEB02644612C3 /* [CP] Check Pods Manifest.lock */, 188 | 607FACE11AFB9204008FA782 /* Sources */, 189 | 607FACE21AFB9204008FA782 /* Frameworks */, 190 | 607FACE31AFB9204008FA782 /* Resources */, 191 | 86F38EDA541D2C84A0AE1727 /* [CP] Embed Pods Frameworks */, 192 | 6CDD4F838A5F2874FC6B89E3 /* [CP] Copy Pods Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 198 | ); 199 | name = RaisePlaceholder_Tests; 200 | productName = Tests; 201 | productReference = 607FACE51AFB9204008FA782 /* RaisePlaceholder_Tests.xctest */; 202 | productType = "com.apple.product-type.bundle.unit-test"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | 607FACC81AFB9204008FA782 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastSwiftUpdateCheck = 0720; 211 | LastUpgradeCheck = 0820; 212 | ORGANIZATIONNAME = CocoaPods; 213 | TargetAttributes = { 214 | 607FACCF1AFB9204008FA782 = { 215 | CreatedOnToolsVersion = 6.3.1; 216 | DevelopmentTeam = PAFK4RNFW2; 217 | LastSwiftMigration = 0820; 218 | }; 219 | 607FACE41AFB9204008FA782 = { 220 | CreatedOnToolsVersion = 6.3.1; 221 | LastSwiftMigration = 0820; 222 | TestTargetID = 607FACCF1AFB9204008FA782; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RaisePlaceholder" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = 607FACC71AFB9204008FA782; 235 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | 607FACCF1AFB9204008FA782 /* RaisePlaceholder_Example */, 240 | 607FACE41AFB9204008FA782 /* RaisePlaceholder_Tests */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXResourcesBuildPhase section */ 246 | 607FACCE1AFB9204008FA782 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | FFFEE1C51EED7AFA00832F2C /* Main.storyboard in Resources */, 251 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 252 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | 607FACE31AFB9204008FA782 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXResourcesBuildPhase section */ 264 | 265 | /* Begin PBXShellScriptBuildPhase section */ 266 | 3CCED458657B6F184A5FBC60 /* [CP] Check Pods Manifest.lock */ = { 267 | isa = PBXShellScriptBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | inputPaths = ( 272 | ); 273 | name = "[CP] Check Pods Manifest.lock"; 274 | outputPaths = ( 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | shellPath = /bin/sh; 278 | shellScript = "diff \"${PODS_ROOT}/../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"; 279 | showEnvVarsInLog = 0; 280 | }; 281 | 633B01E51A2B888B94B93E9C /* [CP] Copy Pods Resources */ = { 282 | isa = PBXShellScriptBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | ); 286 | inputPaths = ( 287 | ); 288 | name = "[CP] Copy Pods Resources"; 289 | outputPaths = ( 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | shellPath = /bin/sh; 293 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaisePlaceholder_Example/Pods-RaisePlaceholder_Example-resources.sh\"\n"; 294 | showEnvVarsInLog = 0; 295 | }; 296 | 662FC7BDD23A900E31EE202D /* [CP] Embed Pods Frameworks */ = { 297 | isa = PBXShellScriptBuildPhase; 298 | buildActionMask = 2147483647; 299 | files = ( 300 | ); 301 | inputPaths = ( 302 | ); 303 | name = "[CP] Embed Pods Frameworks"; 304 | outputPaths = ( 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | shellPath = /bin/sh; 308 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaisePlaceholder_Example/Pods-RaisePlaceholder_Example-frameworks.sh\"\n"; 309 | showEnvVarsInLog = 0; 310 | }; 311 | 6CDD4F838A5F2874FC6B89E3 /* [CP] Copy Pods Resources */ = { 312 | isa = PBXShellScriptBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | ); 316 | inputPaths = ( 317 | ); 318 | name = "[CP] Copy Pods Resources"; 319 | outputPaths = ( 320 | ); 321 | runOnlyForDeploymentPostprocessing = 0; 322 | shellPath = /bin/sh; 323 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaisePlaceholder_Tests/Pods-RaisePlaceholder_Tests-resources.sh\"\n"; 324 | showEnvVarsInLog = 0; 325 | }; 326 | 86F38EDA541D2C84A0AE1727 /* [CP] Embed Pods Frameworks */ = { 327 | isa = PBXShellScriptBuildPhase; 328 | buildActionMask = 2147483647; 329 | files = ( 330 | ); 331 | inputPaths = ( 332 | ); 333 | name = "[CP] Embed Pods Frameworks"; 334 | outputPaths = ( 335 | ); 336 | runOnlyForDeploymentPostprocessing = 0; 337 | shellPath = /bin/sh; 338 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaisePlaceholder_Tests/Pods-RaisePlaceholder_Tests-frameworks.sh\"\n"; 339 | showEnvVarsInLog = 0; 340 | }; 341 | 8FF1D429AAFCEB02644612C3 /* [CP] Check Pods Manifest.lock */ = { 342 | isa = PBXShellScriptBuildPhase; 343 | buildActionMask = 2147483647; 344 | files = ( 345 | ); 346 | inputPaths = ( 347 | ); 348 | name = "[CP] Check Pods Manifest.lock"; 349 | outputPaths = ( 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | shellPath = /bin/sh; 353 | shellScript = "diff \"${PODS_ROOT}/../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"; 354 | showEnvVarsInLog = 0; 355 | }; 356 | /* End PBXShellScriptBuildPhase section */ 357 | 358 | /* Begin PBXSourcesBuildPhase section */ 359 | 607FACCC1AFB9204008FA782 /* Sources */ = { 360 | isa = PBXSourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 364 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | 607FACE11AFB9204008FA782 /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | /* End PBXSourcesBuildPhase section */ 377 | 378 | /* Begin PBXTargetDependency section */ 379 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 380 | isa = PBXTargetDependency; 381 | target = 607FACCF1AFB9204008FA782 /* RaisePlaceholder_Example */; 382 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 383 | }; 384 | /* End PBXTargetDependency section */ 385 | 386 | /* Begin PBXVariantGroup section */ 387 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 388 | isa = PBXVariantGroup; 389 | children = ( 390 | 607FACDF1AFB9204008FA782 /* Base */, 391 | ); 392 | name = LaunchScreen.xib; 393 | sourceTree = ""; 394 | }; 395 | FFFEE1C31EED7AFA00832F2C /* Main.storyboard */ = { 396 | isa = PBXVariantGroup; 397 | children = ( 398 | FFFEE1C41EED7AFA00832F2C /* Base */, 399 | ); 400 | name = Main.storyboard; 401 | sourceTree = ""; 402 | }; 403 | /* End PBXVariantGroup section */ 404 | 405 | /* Begin XCBuildConfiguration section */ 406 | 607FACED1AFB9204008FA782 /* Debug */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | ALWAYS_SEARCH_USER_PATHS = NO; 410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 411 | CLANG_CXX_LIBRARY = "libc++"; 412 | CLANG_ENABLE_MODULES = YES; 413 | CLANG_ENABLE_OBJC_ARC = YES; 414 | CLANG_WARN_BOOL_CONVERSION = YES; 415 | CLANG_WARN_CONSTANT_CONVERSION = YES; 416 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 417 | CLANG_WARN_EMPTY_BODY = YES; 418 | CLANG_WARN_ENUM_CONVERSION = YES; 419 | CLANG_WARN_INFINITE_RECURSION = YES; 420 | CLANG_WARN_INT_CONVERSION = YES; 421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 422 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 423 | CLANG_WARN_UNREACHABLE_CODE = YES; 424 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 425 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 426 | COPY_PHASE_STRIP = NO; 427 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 428 | ENABLE_STRICT_OBJC_MSGSEND = YES; 429 | ENABLE_TESTABILITY = YES; 430 | GCC_C_LANGUAGE_STANDARD = gnu99; 431 | GCC_DYNAMIC_NO_PIC = NO; 432 | GCC_NO_COMMON_BLOCKS = YES; 433 | GCC_OPTIMIZATION_LEVEL = 0; 434 | GCC_PREPROCESSOR_DEFINITIONS = ( 435 | "DEBUG=1", 436 | "$(inherited)", 437 | ); 438 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 441 | GCC_WARN_UNDECLARED_SELECTOR = YES; 442 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 443 | GCC_WARN_UNUSED_FUNCTION = YES; 444 | GCC_WARN_UNUSED_VARIABLE = YES; 445 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 446 | MTL_ENABLE_DEBUG_INFO = YES; 447 | ONLY_ACTIVE_ARCH = YES; 448 | SDKROOT = iphoneos; 449 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 450 | }; 451 | name = Debug; 452 | }; 453 | 607FACEE1AFB9204008FA782 /* Release */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | ALWAYS_SEARCH_USER_PATHS = NO; 457 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 458 | CLANG_CXX_LIBRARY = "libc++"; 459 | CLANG_ENABLE_MODULES = YES; 460 | CLANG_ENABLE_OBJC_ARC = YES; 461 | CLANG_WARN_BOOL_CONVERSION = YES; 462 | CLANG_WARN_CONSTANT_CONVERSION = YES; 463 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 464 | CLANG_WARN_EMPTY_BODY = YES; 465 | CLANG_WARN_ENUM_CONVERSION = YES; 466 | CLANG_WARN_INFINITE_RECURSION = YES; 467 | CLANG_WARN_INT_CONVERSION = YES; 468 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 469 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 470 | CLANG_WARN_UNREACHABLE_CODE = YES; 471 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 472 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 473 | COPY_PHASE_STRIP = NO; 474 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 475 | ENABLE_NS_ASSERTIONS = NO; 476 | ENABLE_STRICT_OBJC_MSGSEND = YES; 477 | GCC_C_LANGUAGE_STANDARD = gnu99; 478 | GCC_NO_COMMON_BLOCKS = YES; 479 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 480 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 481 | GCC_WARN_UNDECLARED_SELECTOR = YES; 482 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 483 | GCC_WARN_UNUSED_FUNCTION = YES; 484 | GCC_WARN_UNUSED_VARIABLE = YES; 485 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 486 | MTL_ENABLE_DEBUG_INFO = NO; 487 | SDKROOT = iphoneos; 488 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 489 | VALIDATE_PRODUCT = YES; 490 | }; 491 | name = Release; 492 | }; 493 | 607FACF01AFB9204008FA782 /* Debug */ = { 494 | isa = XCBuildConfiguration; 495 | baseConfigurationReference = ED1A1FDC0379F63404B8DA5F /* Pods-RaisePlaceholder_Example.debug.xcconfig */; 496 | buildSettings = { 497 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 498 | DEVELOPMENT_TEAM = PAFK4RNFW2; 499 | INFOPLIST_FILE = RaisePlaceholder/Info.plist; 500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 501 | MODULE_NAME = ExampleApp; 502 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | SWIFT_VERSION = 3.0; 505 | }; 506 | name = Debug; 507 | }; 508 | 607FACF11AFB9204008FA782 /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | baseConfigurationReference = 4E50C37D4CC77BB9024E2618 /* Pods-RaisePlaceholder_Example.release.xcconfig */; 511 | buildSettings = { 512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 513 | DEVELOPMENT_TEAM = PAFK4RNFW2; 514 | INFOPLIST_FILE = RaisePlaceholder/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 516 | MODULE_NAME = ExampleApp; 517 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 518 | PRODUCT_NAME = "$(TARGET_NAME)"; 519 | SWIFT_VERSION = 3.0; 520 | }; 521 | name = Release; 522 | }; 523 | 607FACF31AFB9204008FA782 /* Debug */ = { 524 | isa = XCBuildConfiguration; 525 | baseConfigurationReference = 5816556E5856D9CB90C4379D /* Pods-RaisePlaceholder_Tests.debug.xcconfig */; 526 | buildSettings = { 527 | FRAMEWORK_SEARCH_PATHS = ( 528 | "$(SDKROOT)/Developer/Library/Frameworks", 529 | "$(inherited)", 530 | ); 531 | GCC_PREPROCESSOR_DEFINITIONS = ( 532 | "DEBUG=1", 533 | "$(inherited)", 534 | ); 535 | INFOPLIST_FILE = Tests/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 537 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 538 | PRODUCT_NAME = "$(TARGET_NAME)"; 539 | SWIFT_VERSION = 3.0; 540 | }; 541 | name = Debug; 542 | }; 543 | 607FACF41AFB9204008FA782 /* Release */ = { 544 | isa = XCBuildConfiguration; 545 | baseConfigurationReference = FF6FCEF16F2431F3C47AD3FB /* Pods-RaisePlaceholder_Tests.release.xcconfig */; 546 | buildSettings = { 547 | FRAMEWORK_SEARCH_PATHS = ( 548 | "$(SDKROOT)/Developer/Library/Frameworks", 549 | "$(inherited)", 550 | ); 551 | INFOPLIST_FILE = Tests/Info.plist; 552 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 553 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 554 | PRODUCT_NAME = "$(TARGET_NAME)"; 555 | SWIFT_VERSION = 3.0; 556 | }; 557 | name = Release; 558 | }; 559 | /* End XCBuildConfiguration section */ 560 | 561 | /* Begin XCConfigurationList section */ 562 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "RaisePlaceholder" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 607FACED1AFB9204008FA782 /* Debug */, 566 | 607FACEE1AFB9204008FA782 /* Release */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RaisePlaceholder_Example" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 607FACF01AFB9204008FA782 /* Debug */, 575 | 607FACF11AFB9204008FA782 /* Release */, 576 | ); 577 | defaultConfigurationIsVisible = 0; 578 | defaultConfigurationName = Release; 579 | }; 580 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RaisePlaceholder_Tests" */ = { 581 | isa = XCConfigurationList; 582 | buildConfigurations = ( 583 | 607FACF31AFB9204008FA782 /* Debug */, 584 | 607FACF41AFB9204008FA782 /* Release */, 585 | ); 586 | defaultConfigurationIsVisible = 0; 587 | defaultConfigurationName = Release; 588 | }; 589 | /* End XCConfigurationList section */ 590 | }; 591 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 592 | } 593 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder.xcodeproj/xcshareddata/xcschemes/RaisePlaceholder-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // RaisePlaceholder 4 | // 5 | // Created by najanda89@gmail.com on 06/11/2017. 6 | // Copyright (c) 2017 najanda89@gmail.com. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 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 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 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 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/RaisePlaceholder/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // NJPlaceholder 4 | // 5 | // Created by Lee Jiho on 2017. 6. 11.. 6 | // Copyright © 2017년 Lee Jiho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import RaisePlaceholder 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet var identierTextField: RaisePlaceholder! 15 | @IBOutlet var passwordTextField: RaisePlaceholder! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | identierTextField.animationDuration = 0.5 21 | identierTextField.subjectColor = UIColor.orange 22 | identierTextField.underLineColor = UIColor.orange 23 | 24 | // Do any additional setup after loading the view, typically from a nib. 25 | } 26 | 27 | @IBAction func endEditingTextField() { 28 | 29 | if identierTextField.becomeFirstResponder() { 30 | identierTextField.endEditing(true) 31 | } else { 32 | passwordTextField.endEditing(true) 33 | } 34 | 35 | } 36 | 37 | override func didReceiveMemoryWarning() { 38 | super.didReceiveMemoryWarning() 39 | // Dispose of any resources that can be recreated. 40 | } 41 | 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import RaisePlaceholder 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Lee Jiho 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Language](https://img.shields.io/badge/Swift-3.1-orange.svg) [![Cocoapods](https://cocoapod-badges.herokuapp.com/v/RaisePlaceholder/1.0.1/badge.png)](https://github.com/najanda89/RaisePlaceholder) [![LICENSE: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 2 | 3 | 4 | 5 | ## RaisePlaceholder 6 | 7 | Enter a text in UITextField, it displays the placeholder as a subject. 8 | 9 | ## Preview 10 | 11 | 12 | ## Installation 13 | 14 | #### CocoaPods 15 | RaisePlaceholder is available through **[CocoaPods](https://cocoapods.org/)**. To install it, simply add the following line to your Podfile: 16 | 17 | ``` 18 | pod 'RaisePlaceholder' 19 | ``` 20 | 21 | ## Usage 22 | 23 | Insert 'RaisePlaceholder' in your UITextField custom class. 24 | 25 | ![Subclass](https://drive.google.com/uc?id=0BziiFaGlWpr-akEzbXpiOEMtZ0U) 26 | 27 | ### Customize 28 | 29 | **Use IBInspectable** 30 | 31 | ![IBInspectable](https://drive.google.com/uc?id=0BziiFaGlWpr-YTdneXJyUlh4a2c) 32 | 33 | **Use Code** 34 | 35 | ```Swift 36 | import RaisePlaceholder 37 | 38 | @IBOutlet weak var raisePlaceholder: RaisePlaceholder! 39 | 40 | raisePlaceholder.animationDuration = 0.5 41 | raisePlaceholder.subjectColor = UIColor.orange 42 | raisePlaceholder.underLineColor = UIColor.orange 43 | 44 | ``` 45 | 46 | ## License 47 | RaisePlaceholder is available under MIT license. See the **[LICENSE](https://github.com/najanda89/RaisePlaceholder/blob/master/LICENSE)** file for more info. 48 | -------------------------------------------------------------------------------- /RaisePlaceholder.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'RaisePlaceholder' 3 | s.version = '1.0.3' 4 | s.summary = 'UITextField Placeholder UI' 5 | 6 | s.description = 'Enter a text in UITextField, it displays the placeholder as a UITextField subject.' 7 | 8 | s.homepage = 'https://github.com/najanda89/RaisePlaceholder' 9 | s.license = { :type => 'MIT', :file => 'LICENSE' } 10 | s.author = { 'Jiho Lee' => 'najanda89@gmail.com' } 11 | s.source = { :git => 'https://github.com/najanda89/RaisePlaceholder.git', :tag => s.version.to_s } 12 | s.social_media_url = 'https://twitter.com/najanda89' 13 | s.ios.deployment_target = '8.0' 14 | s.source_files = 'Sources/*.swift' 15 | end 16 | -------------------------------------------------------------------------------- /RaisePlaceholder.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FF7172B31EF03BB0006508A8 /* RaisePlaceholder.h in Headers */ = {isa = PBXBuildFile; fileRef = FF7172B11EF03BB0006508A8 /* RaisePlaceholder.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | FF7172C01EF05CE4006508A8 /* RaisePlaceholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF7172BF1EF05CE4006508A8 /* RaisePlaceholder.swift */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | FF7172AE1EF03BB0006508A8 /* RaisePlaceholder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RaisePlaceholder.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | FF7172B11EF03BB0006508A8 /* RaisePlaceholder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RaisePlaceholder.h; sourceTree = ""; }; 17 | FF7172B21EF03BB0006508A8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 18 | FF7172BF1EF05CE4006508A8 /* RaisePlaceholder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RaisePlaceholder.swift; path = Sources/RaisePlaceholder.swift; sourceTree = SOURCE_ROOT; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | FF7172AA1EF03BB0006508A8 /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | FF7172A41EF03BB0006508A8 = { 33 | isa = PBXGroup; 34 | children = ( 35 | FF7172B01EF03BB0006508A8 /* RaisePlaceholder */, 36 | FF7172AF1EF03BB0006508A8 /* Products */, 37 | ); 38 | sourceTree = ""; 39 | }; 40 | FF7172AF1EF03BB0006508A8 /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | FF7172AE1EF03BB0006508A8 /* RaisePlaceholder.framework */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | FF7172B01EF03BB0006508A8 /* RaisePlaceholder */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | FF7172B11EF03BB0006508A8 /* RaisePlaceholder.h */, 52 | FF7172BF1EF05CE4006508A8 /* RaisePlaceholder.swift */, 53 | FF7172B21EF03BB0006508A8 /* Info.plist */, 54 | ); 55 | path = RaisePlaceholder; 56 | sourceTree = ""; 57 | }; 58 | /* End PBXGroup section */ 59 | 60 | /* Begin PBXHeadersBuildPhase section */ 61 | FF7172AB1EF03BB0006508A8 /* Headers */ = { 62 | isa = PBXHeadersBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | FF7172B31EF03BB0006508A8 /* RaisePlaceholder.h in Headers */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXHeadersBuildPhase section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | FF7172AD1EF03BB0006508A8 /* RaisePlaceholder */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = FF7172B61EF03BB0006508A8 /* Build configuration list for PBXNativeTarget "RaisePlaceholder" */; 75 | buildPhases = ( 76 | FF7172A91EF03BB0006508A8 /* Sources */, 77 | FF7172AA1EF03BB0006508A8 /* Frameworks */, 78 | FF7172AB1EF03BB0006508A8 /* Headers */, 79 | FF7172AC1EF03BB0006508A8 /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = RaisePlaceholder; 86 | productName = RaisePlaceholder; 87 | productReference = FF7172AE1EF03BB0006508A8 /* RaisePlaceholder.framework */; 88 | productType = "com.apple.product-type.framework"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | FF7172A51EF03BB0006508A8 /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastUpgradeCheck = 0830; 97 | ORGANIZATIONNAME = "Lee Jiho"; 98 | TargetAttributes = { 99 | FF7172AD1EF03BB0006508A8 = { 100 | CreatedOnToolsVersion = 8.3.3; 101 | DevelopmentTeam = PAFK4RNFW2; 102 | LastSwiftMigration = 0830; 103 | ProvisioningStyle = Automatic; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = FF7172A81EF03BB0006508A8 /* Build configuration list for PBXProject "RaisePlaceholder" */; 108 | compatibilityVersion = "Xcode 3.2"; 109 | developmentRegion = English; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | ); 114 | mainGroup = FF7172A41EF03BB0006508A8; 115 | productRefGroup = FF7172AF1EF03BB0006508A8 /* Products */; 116 | projectDirPath = ""; 117 | projectRoot = ""; 118 | targets = ( 119 | FF7172AD1EF03BB0006508A8 /* RaisePlaceholder */, 120 | ); 121 | }; 122 | /* End PBXProject section */ 123 | 124 | /* Begin PBXResourcesBuildPhase section */ 125 | FF7172AC1EF03BB0006508A8 /* Resources */ = { 126 | isa = PBXResourcesBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXResourcesBuildPhase section */ 133 | 134 | /* Begin PBXSourcesBuildPhase section */ 135 | FF7172A91EF03BB0006508A8 /* Sources */ = { 136 | isa = PBXSourcesBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | FF7172C01EF05CE4006508A8 /* RaisePlaceholder.swift in Sources */, 140 | ); 141 | runOnlyForDeploymentPostprocessing = 0; 142 | }; 143 | /* End PBXSourcesBuildPhase section */ 144 | 145 | /* Begin XCBuildConfiguration section */ 146 | FF7172B41EF03BB0006508A8 /* Debug */ = { 147 | isa = XCBuildConfiguration; 148 | buildSettings = { 149 | ALWAYS_SEARCH_USER_PATHS = NO; 150 | CLANG_ANALYZER_NONNULL = YES; 151 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 152 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 153 | CLANG_CXX_LIBRARY = "libc++"; 154 | CLANG_ENABLE_MODULES = YES; 155 | CLANG_ENABLE_OBJC_ARC = YES; 156 | CLANG_WARN_BOOL_CONVERSION = YES; 157 | CLANG_WARN_CONSTANT_CONVERSION = YES; 158 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 159 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 160 | CLANG_WARN_EMPTY_BODY = YES; 161 | CLANG_WARN_ENUM_CONVERSION = YES; 162 | CLANG_WARN_INFINITE_RECURSION = YES; 163 | CLANG_WARN_INT_CONVERSION = YES; 164 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 165 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 166 | CLANG_WARN_UNREACHABLE_CODE = YES; 167 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 168 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 169 | COPY_PHASE_STRIP = NO; 170 | CURRENT_PROJECT_VERSION = 1; 171 | DEBUG_INFORMATION_FORMAT = dwarf; 172 | ENABLE_STRICT_OBJC_MSGSEND = YES; 173 | ENABLE_TESTABILITY = YES; 174 | GCC_C_LANGUAGE_STANDARD = gnu99; 175 | GCC_DYNAMIC_NO_PIC = NO; 176 | GCC_NO_COMMON_BLOCKS = YES; 177 | GCC_OPTIMIZATION_LEVEL = 0; 178 | GCC_PREPROCESSOR_DEFINITIONS = ( 179 | "DEBUG=1", 180 | "$(inherited)", 181 | ); 182 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 183 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 184 | GCC_WARN_UNDECLARED_SELECTOR = YES; 185 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 186 | GCC_WARN_UNUSED_FUNCTION = YES; 187 | GCC_WARN_UNUSED_VARIABLE = YES; 188 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 189 | MTL_ENABLE_DEBUG_INFO = YES; 190 | ONLY_ACTIVE_ARCH = YES; 191 | SDKROOT = iphoneos; 192 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 193 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 194 | SWIFT_VERSION = 4.0; 195 | TARGETED_DEVICE_FAMILY = "1,2"; 196 | VERSIONING_SYSTEM = "apple-generic"; 197 | VERSION_INFO_PREFIX = ""; 198 | }; 199 | name = Debug; 200 | }; 201 | FF7172B51EF03BB0006508A8 /* Release */ = { 202 | isa = XCBuildConfiguration; 203 | buildSettings = { 204 | ALWAYS_SEARCH_USER_PATHS = NO; 205 | CLANG_ANALYZER_NONNULL = YES; 206 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 207 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 208 | CLANG_CXX_LIBRARY = "libc++"; 209 | CLANG_ENABLE_MODULES = YES; 210 | CLANG_ENABLE_OBJC_ARC = YES; 211 | CLANG_WARN_BOOL_CONVERSION = YES; 212 | CLANG_WARN_CONSTANT_CONVERSION = YES; 213 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 214 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 215 | CLANG_WARN_EMPTY_BODY = YES; 216 | CLANG_WARN_ENUM_CONVERSION = YES; 217 | CLANG_WARN_INFINITE_RECURSION = YES; 218 | CLANG_WARN_INT_CONVERSION = YES; 219 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 220 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 221 | CLANG_WARN_UNREACHABLE_CODE = YES; 222 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 223 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 224 | COPY_PHASE_STRIP = NO; 225 | CURRENT_PROJECT_VERSION = 1; 226 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 227 | ENABLE_NS_ASSERTIONS = NO; 228 | ENABLE_STRICT_OBJC_MSGSEND = YES; 229 | GCC_C_LANGUAGE_STANDARD = gnu99; 230 | GCC_NO_COMMON_BLOCKS = YES; 231 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 232 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 233 | GCC_WARN_UNDECLARED_SELECTOR = YES; 234 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 235 | GCC_WARN_UNUSED_FUNCTION = YES; 236 | GCC_WARN_UNUSED_VARIABLE = YES; 237 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 238 | MTL_ENABLE_DEBUG_INFO = NO; 239 | SDKROOT = iphoneos; 240 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 241 | SWIFT_VERSION = 4.0; 242 | TARGETED_DEVICE_FAMILY = "1,2"; 243 | VALIDATE_PRODUCT = YES; 244 | VERSIONING_SYSTEM = "apple-generic"; 245 | VERSION_INFO_PREFIX = ""; 246 | }; 247 | name = Release; 248 | }; 249 | FF7172B71EF03BB0006508A8 /* Debug */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | CLANG_ENABLE_MODULES = YES; 253 | CODE_SIGN_IDENTITY = ""; 254 | DEFINES_MODULE = YES; 255 | DEVELOPMENT_TEAM = PAFK4RNFW2; 256 | DYLIB_COMPATIBILITY_VERSION = 1; 257 | DYLIB_CURRENT_VERSION = 1; 258 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 259 | INFOPLIST_FILE = RaisePlaceholder/Info.plist; 260 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 261 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 262 | PRODUCT_BUNDLE_IDENTIFIER = com.zzzbag.RaisePlaceholder; 263 | PRODUCT_NAME = "$(TARGET_NAME)"; 264 | PROVISIONING_PROFILE_SPECIFIER = ""; 265 | SKIP_INSTALL = YES; 266 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 267 | SWIFT_VERSION = 4.0; 268 | }; 269 | name = Debug; 270 | }; 271 | FF7172B81EF03BB0006508A8 /* Release */ = { 272 | isa = XCBuildConfiguration; 273 | buildSettings = { 274 | CLANG_ENABLE_MODULES = YES; 275 | CODE_SIGN_IDENTITY = ""; 276 | DEFINES_MODULE = YES; 277 | DEVELOPMENT_TEAM = PAFK4RNFW2; 278 | DYLIB_COMPATIBILITY_VERSION = 1; 279 | DYLIB_CURRENT_VERSION = 1; 280 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 281 | INFOPLIST_FILE = RaisePlaceholder/Info.plist; 282 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 283 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 284 | PRODUCT_BUNDLE_IDENTIFIER = com.zzzbag.RaisePlaceholder; 285 | PRODUCT_NAME = "$(TARGET_NAME)"; 286 | PROVISIONING_PROFILE_SPECIFIER = ""; 287 | SKIP_INSTALL = YES; 288 | SWIFT_VERSION = 4.0; 289 | }; 290 | name = Release; 291 | }; 292 | /* End XCBuildConfiguration section */ 293 | 294 | /* Begin XCConfigurationList section */ 295 | FF7172A81EF03BB0006508A8 /* Build configuration list for PBXProject "RaisePlaceholder" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | FF7172B41EF03BB0006508A8 /* Debug */, 299 | FF7172B51EF03BB0006508A8 /* Release */, 300 | ); 301 | defaultConfigurationIsVisible = 0; 302 | defaultConfigurationName = Release; 303 | }; 304 | FF7172B61EF03BB0006508A8 /* Build configuration list for PBXNativeTarget "RaisePlaceholder" */ = { 305 | isa = XCConfigurationList; 306 | buildConfigurations = ( 307 | FF7172B71EF03BB0006508A8 /* Debug */, 308 | FF7172B81EF03BB0006508A8 /* Release */, 309 | ); 310 | defaultConfigurationIsVisible = 0; 311 | defaultConfigurationName = Release; 312 | }; 313 | /* End XCConfigurationList section */ 314 | }; 315 | rootObject = FF7172A51EF03BB0006508A8 /* Project object */; 316 | } 317 | -------------------------------------------------------------------------------- /RaisePlaceholder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RaisePlaceholder.xcodeproj/xcshareddata/xcschemes/RaisePlaceholder.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /RaisePlaceholder/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/najanda89/RaisePlaceholder/e3d3870959ee1e3213300d5dc8e83fc5e1743967/RaisePlaceholder/Assets/.gitkeep -------------------------------------------------------------------------------- /RaisePlaceholder/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/najanda89/RaisePlaceholder/e3d3870959ee1e3213300d5dc8e83fc5e1743967/RaisePlaceholder/Classes/.gitkeep -------------------------------------------------------------------------------- /RaisePlaceholder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /RaisePlaceholder/RaisePlaceholder.h: -------------------------------------------------------------------------------- 1 | // 2 | // RaisePlaceholder.h 3 | // RaisePlaceholder 4 | // 5 | // Created by Lee Jiho on 2017. 6. 14.. 6 | // Copyright © 2017년 Lee Jiho. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for RaisePlaceholder. 12 | FOUNDATION_EXPORT double RaisePlaceholderVersionNumber; 13 | 14 | //! Project version string for RaisePlaceholder. 15 | FOUNDATION_EXPORT const unsigned char RaisePlaceholderVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/RaisePlaceholder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // RaisePlaceholder.swift 3 | // RaisePlaceholder 4 | // 5 | // Created by Lee Jiho on 2017. 6. 11.. 6 | // Copyright © 2017년 Lee Jiho. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class RaisePlaceholder: UITextField, UITextFieldDelegate { 12 | 13 | @IBInspectable public var animationDuration: Double = 0.5 14 | @IBInspectable public var subjectColor: UIColor = UIColor.black 15 | @IBInspectable public var underLineColor: UIColor = UIColor.black 16 | 17 | fileprivate let placeholderLabelFontSize: CGFloat = 12.0 18 | fileprivate var placeholderLabel: UILabel? 19 | fileprivate var titlePlaceholder: String? 20 | 21 | override init(frame: CGRect) { 22 | super.init(frame: frame) 23 | delegate = self 24 | } 25 | 26 | required public init?(coder aDecoder: NSCoder) { 27 | super.init(coder: aDecoder) 28 | delegate = self 29 | } 30 | 31 | override public func draw(_ rect: CGRect) { 32 | drawUnderLine() 33 | createPlaceholderLabel() 34 | self.clipsToBounds = false 35 | self.borderStyle = .none 36 | } 37 | 38 | fileprivate func drawUnderLine() { 39 | 40 | let underLineView = UIView(frame: CGRect(x: 0, y: frame.size.height - 1, width: frame.size.width, height: 1)) 41 | underLineView.backgroundColor = underLineColor 42 | 43 | self.addSubview(underLineView) 44 | 45 | } 46 | 47 | fileprivate func createPlaceholderLabel() { 48 | 49 | let origin = self.frame.origin 50 | let label = UILabel(frame: CGRect(x: origin.x, y: origin.y, width: self.frame.size.width, height: 15.0)) 51 | label.center = self.center 52 | label.text = "" 53 | label.font = UIFont.systemFont(ofSize: self.placeholderLabelFontSize) 54 | label.textColor = subjectColor 55 | 56 | if let superView = self.superview { 57 | superView.insertSubview(label, belowSubview: self) 58 | } 59 | 60 | self.placeholderLabel = label 61 | 62 | } 63 | 64 | public func textFieldDidBeginEditing(_ textField: UITextField) { 65 | 66 | if let placeholderLabel = self.placeholderLabel, self.text == "" { 67 | 68 | if placeholderLabel.alpha == 0 { 69 | placeholderLabel.alpha = 1 70 | } 71 | 72 | if self.placeholder == "" { 73 | self.titlePlaceholder = placeholderLabel.text 74 | } else { 75 | self.titlePlaceholder = self.placeholder 76 | } 77 | 78 | self.placeholder = "" 79 | 80 | let frame = placeholderLabel.frame 81 | UIView.animate(withDuration: animationDuration, animations: { 82 | placeholderLabel.text = self.titlePlaceholder 83 | placeholderLabel.font = UIFont.systemFont(ofSize: self.placeholderLabelFontSize) 84 | placeholderLabel.textColor = self.subjectColor 85 | placeholderLabel.frame.origin.y = frame.origin.y - placeholderLabel.frame.size.height - (self.frame.size.height / 2 - frame.size.height / 2) 86 | }, completion: { (isComplete) in 87 | 88 | }) 89 | } 90 | } 91 | 92 | public func textFieldDidEndEditing(_ textField: UITextField) { 93 | 94 | if let placeholderLabel = self.placeholderLabel, self.text == "" { 95 | let frame = placeholderLabel.frame 96 | UIView.animate(withDuration: animationDuration, animations: { 97 | 98 | placeholderLabel.alpha = 1 99 | placeholderLabel.textColor = #colorLiteral(red: 0, green: 0, blue: 0.09803921569, alpha: 0.22) 100 | 101 | placeholderLabel.frame.origin.y = frame.origin.y + placeholderLabel.frame.size.height + (self.frame.size.height / 2 - frame.size.height / 2) 102 | if let pointSize = self.font?.pointSize { 103 | placeholderLabel.font = UIFont.systemFont(ofSize: pointSize) 104 | } 105 | 106 | }, completion: { (isComplete) in 107 | self.placeholder = self.titlePlaceholder 108 | placeholderLabel.alpha = 0 109 | }) 110 | } 111 | } 112 | } 113 | --------------------------------------------------------------------------------