├── screenshot ├── HTYTextField.gif └── HTYTextField.mov ├── .gitignore ├── HTYTextField ├── HTYTextField.h ├── Info.plist └── HTYTextField.swift ├── HTYTextField.podspec ├── HTYTextFieldDemo ├── ViewController.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard └── AppDelegate.swift ├── LICENSE ├── README.md └── HTYTextField.xcodeproj └── project.pbxproj /screenshot/HTYTextField.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanton/HTYTextField/HEAD/screenshot/HTYTextField.gif -------------------------------------------------------------------------------- /screenshot/HTYTextField.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanton/HTYTextField/HEAD/screenshot/HTYTextField.mov -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /HTYTextField/HTYTextField.h: -------------------------------------------------------------------------------- 1 | // 2 | // HTYTextField.h 3 | // HTYTextField 4 | // 5 | // Created by  on 11/3/15. 6 | // Copyright © 2015 Hanton. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for HTYTextField. 12 | FOUNDATION_EXPORT double HTYTextFieldVersionNumber; 13 | 14 | //! Project version string for HTYTextField. 15 | FOUNDATION_EXPORT const unsigned char HTYTextFieldVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /HTYTextField.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "HTYTextField" 4 | s.version = "1.1" 5 | s.summary = "A UITextField with bouncy placeholder." 6 | 7 | s.homepage = "https://github.com/hanton/HTYTextField" 8 | # s.screenshots = "https://github.com/hanton/HTYTextField/blob/master/screenshot/HTYTextField.gif" 9 | 10 | s.license = "MIT" 11 | 12 | s.author = { "Hanton Yang" => "hanton.yang@gmail.com" } 13 | 14 | s.platform = :ios, "8.0" 15 | 16 | s.source = { :git => "https://github.com/hanton/HTYTextField.git", :tag => s.version.to_s } 17 | s.source_files = "HTYTextField/*.swift" 18 | s.requires_arc = true 19 | 20 | end 21 | -------------------------------------------------------------------------------- /HTYTextFieldDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // HTYTextFieldDemo 4 | // 5 | // Created by  on 11/3/15. 6 | // Copyright © 2015 Hanton. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import HTYTextField 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var emailTextField: HTYTextField! 15 | @IBOutlet weak var passwordTextField: HTYTextField! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | emailTextField.rightPlaceholder = "XXX@XXX.XX" 21 | passwordTextField.rightPlaceholder = "6-12 digits" 22 | } 23 | 24 | override func touchesBegan(_ touches: Set, with event: UIEvent?) { 25 | view.endEditing(true) 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /HTYTextField/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.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Hanton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HTYTextField 2 | ## A UITextField with bouncy placeholder. 3 | 4 | Screenshot 5 | ---------- 6 | 7 | ![screenshot](https://github.com/hanton/HTYTextField/blob/master/screenshot/HTYTextField.gif) 8 | 9 | Installation 10 | ----- 11 | 12 | **CocoaPods** 13 | 14 | * Add the dependency to your Podfile: 15 | ```ruby 16 | use_frameworks! 17 | 18 | pod 'HTYTextField' 19 | ... 20 | ``` 21 | 22 | * Run `pod install` to install the dependencies. 23 | 24 | **Source files** 25 | 26 | Just clone this repository or download it in zip-file. Then you will find source files under **HTYTextField** directory. Copy them to your project. 27 | 28 | Usage 29 | ----- 30 | * Import the header file to your view controller: 31 | ```swift 32 | import HTYTextField 33 | 34 | @IBOutlet weak var emailTextField: HTYTextField! 35 | @IBOutlet weak var passwordTextField: HTYTextField! 36 | 37 | emailTextField.rightPlaceholder = "xxx@xxx.xx" 38 | passwordTextField.rightPlaceholder = "6~12 digits" 39 | ``` 40 | 41 | Requirements 42 | ---------- 43 | - iOS 8.0+ 44 | - Xcode 7+ 45 | - Swift 2+ 46 | 47 | Contributing 48 | ---------- 49 | Anyone who would like to contribute to the project is more than welcome. 50 | 51 | * Fork this repo 52 | * Make your changes 53 | * Submit pull request 54 | 55 | ## License 56 | HTYTextField is released under the MIT license. 57 | 58 | Contact 59 | ---------- 60 | Hanton Yang (hanton.yang@gmail.com) 61 | -------------------------------------------------------------------------------- /HTYTextFieldDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /HTYTextFieldDemo/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.1 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 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HTYTextFieldDemo/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /HTYTextFieldDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // HTYTextFieldDemo 4 | // 5 | // Created by  on 11/3/15. 6 | // Copyright © 2015 Hanton. 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: [UIApplication.LaunchOptionsKey: 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 | -------------------------------------------------------------------------------- /HTYTextField/HTYTextField.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HTYBounceTextField.swift 3 | // HTYBounceTextFieldDemo 4 | // 5 | // Created by  on 10/28/15. 6 | // Copyright © 2015 Hanton. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class HTYTextField: UITextField { 12 | 13 | open var rightPlaceholder: String = "" { 14 | didSet { 15 | rightPlaceholderLabel.text = rightPlaceholder 16 | } 17 | } 18 | 19 | fileprivate var fakePlaceholderLabel: UILabel! 20 | fileprivate var rightPlaceholderLabel: UILabel! 21 | fileprivate var translateX: CGFloat! 22 | { 23 | get { 24 | let attributes = [NSAttributedString.Key.font: font!] 25 | let rightPlaceholderTextSize = rightPlaceholderLabel.text!.size(withAttributes: attributes) 26 | let rightPlaceholderTextWidth = rightPlaceholderTextSize.width 27 | let translateX = textRect(forBounds: bounds).width - rightPlaceholderTextWidth 28 | return translateX 29 | } 30 | } 31 | 32 | required public init?(coder aDecoder: NSCoder) { 33 | super.init(coder: aDecoder) 34 | 35 | fakePlaceholderLabel = UILabel(frame: placeholderRect(forBounds: bounds)) 36 | fakePlaceholderLabel.font = font 37 | fakePlaceholderLabel.text = placeholder 38 | fakePlaceholderLabel.textColor = .lightGray 39 | fakePlaceholderLabel.alpha = 1.0 40 | addSubview(fakePlaceholderLabel) 41 | 42 | rightPlaceholderLabel = UILabel(frame: placeholderRect(forBounds: bounds)) 43 | rightPlaceholderLabel.font = font 44 | rightPlaceholderLabel.text = rightPlaceholder 45 | rightPlaceholderLabel.textColor = .lightGray 46 | rightPlaceholderLabel.alpha = 0.0 47 | addSubview(rightPlaceholderLabel) 48 | } 49 | 50 | // MARK: - UITextField Observing 51 | 52 | override open func willMove(toSuperview newSuperview: UIView!) { 53 | if newSuperview != nil { 54 | NotificationCenter.default.addObserver(self, selector: #selector(HTYTextField.didBeginEditing(_:)), name:UITextField.textDidBeginEditingNotification, object: self) 55 | 56 | NotificationCenter.default.addObserver(self, selector: #selector(HTYTextField.didEndEditing(_:)), name:UITextField.textDidEndEditingNotification, object: self) 57 | } else { 58 | NotificationCenter.default.removeObserver(self) 59 | } 60 | } 61 | 62 | @objc open func didBeginEditing(_ notification: Notification) { 63 | placeholder = nil 64 | 65 | if notification.object is HTYTextField{ 66 | if notification.object as! HTYTextField === self { 67 | UIView.animate(withDuration: 0.5, delay: 0.0, usingSpringWithDamping: 0.4, initialSpringVelocity: 0, options: .curveEaseIn, animations: { () -> Void in 68 | if self.text!.isEmpty { 69 | self.fakePlaceholderLabel.transform = self.fakePlaceholderLabel.transform.translatedBy(x: self.translateX, y: 0.0) 70 | self.fakePlaceholderLabel.alpha = 0.0 71 | 72 | self.rightPlaceholderLabel.transform = self.rightPlaceholderLabel.transform.translatedBy(x: self.translateX, y: 0.0) 73 | self.rightPlaceholderLabel.alpha = 1.0 74 | } 75 | }, completion: nil) 76 | } 77 | } 78 | } 79 | 80 | @objc open func didEndEditing(_ notification: Notification) { 81 | if notification.object is HTYTextField{ 82 | if notification.object as! HTYTextField === self{ 83 | UIView.animate(withDuration: 0.5, delay: 0.0, usingSpringWithDamping: 0.4, initialSpringVelocity: 0, options: .curveEaseIn, animations: { () -> Void in 84 | if self.text!.isEmpty { 85 | self.fakePlaceholderLabel.transform = self.fakePlaceholderLabel.transform.translatedBy(x: -self.translateX, y: 0.0) 86 | self.fakePlaceholderLabel.alpha = 1.0 87 | 88 | self.rightPlaceholderLabel.transform = self.rightPlaceholderLabel.transform.translatedBy(x: -self.translateX, y: 0.0) 89 | self.rightPlaceholderLabel.alpha = 0.0 90 | } 91 | }, completion: nil) 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /HTYTextFieldDemo/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 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /HTYTextField.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4063A58C1BE9010C002055E0 /* HTYTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 4063A58B1BE9010C002055E0 /* HTYTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 4063A59A1BE9013C002055E0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4063A5991BE9013C002055E0 /* AppDelegate.swift */; }; 12 | 4063A59C1BE9013C002055E0 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4063A59B1BE9013C002055E0 /* ViewController.swift */; }; 13 | 4063A59F1BE9013C002055E0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4063A59D1BE9013C002055E0 /* Main.storyboard */; }; 14 | 4063A5A11BE9013C002055E0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4063A5A01BE9013C002055E0 /* Assets.xcassets */; }; 15 | 4063A5A41BE9013C002055E0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4063A5A21BE9013C002055E0 /* LaunchScreen.storyboard */; }; 16 | 4063A5AA1BE90167002055E0 /* HTYTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4063A5A91BE90167002055E0 /* HTYTextField.swift */; }; 17 | 4063A5AB1BE906BC002055E0 /* HTYTextField.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4063A5881BE9010C002055E0 /* HTYTextField.framework */; }; 18 | 4063A5AC1BE906BC002055E0 /* HTYTextField.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4063A5881BE9010C002055E0 /* HTYTextField.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 4063A5AD1BE906BC002055E0 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 4063A57F1BE9010C002055E0 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 4063A5871BE9010C002055E0; 27 | remoteInfo = HTYTextField; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXCopyFilesBuildPhase section */ 32 | 4063A5AF1BE906BC002055E0 /* Embed Frameworks */ = { 33 | isa = PBXCopyFilesBuildPhase; 34 | buildActionMask = 2147483647; 35 | dstPath = ""; 36 | dstSubfolderSpec = 10; 37 | files = ( 38 | 4063A5AC1BE906BC002055E0 /* HTYTextField.framework in Embed Frameworks */, 39 | ); 40 | name = "Embed Frameworks"; 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXCopyFilesBuildPhase section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | 4063A5881BE9010C002055E0 /* HTYTextField.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HTYTextField.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 4063A58B1BE9010C002055E0 /* HTYTextField.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTYTextField.h; sourceTree = ""; }; 48 | 4063A58D1BE9010C002055E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 4063A5971BE9013C002055E0 /* HTYTextFieldDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HTYTextFieldDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 4063A5991BE9013C002055E0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 51 | 4063A59B1BE9013C002055E0 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 52 | 4063A59E1BE9013C002055E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 4063A5A01BE9013C002055E0 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 4063A5A31BE9013C002055E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 4063A5A51BE9013C002055E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 4063A5A91BE90167002055E0 /* HTYTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTYTextField.swift; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 4063A5841BE9010C002055E0 /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 4063A5941BE9013C002055E0 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | 4063A5AB1BE906BC002055E0 /* HTYTextField.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 4063A57E1BE9010C002055E0 = { 79 | isa = PBXGroup; 80 | children = ( 81 | 4063A5981BE9013C002055E0 /* HTYTextFieldDemo */, 82 | 4063A58A1BE9010C002055E0 /* HTYTextField */, 83 | 4063A5891BE9010C002055E0 /* Products */, 84 | ); 85 | sourceTree = ""; 86 | }; 87 | 4063A5891BE9010C002055E0 /* Products */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 4063A5881BE9010C002055E0 /* HTYTextField.framework */, 91 | 4063A5971BE9013C002055E0 /* HTYTextFieldDemo.app */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 4063A58A1BE9010C002055E0 /* HTYTextField */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 4063A58B1BE9010C002055E0 /* HTYTextField.h */, 100 | 4063A5A91BE90167002055E0 /* HTYTextField.swift */, 101 | 4063A58D1BE9010C002055E0 /* Info.plist */, 102 | ); 103 | path = HTYTextField; 104 | sourceTree = ""; 105 | }; 106 | 4063A5981BE9013C002055E0 /* HTYTextFieldDemo */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 4063A5991BE9013C002055E0 /* AppDelegate.swift */, 110 | 4063A59B1BE9013C002055E0 /* ViewController.swift */, 111 | 4063A59D1BE9013C002055E0 /* Main.storyboard */, 112 | 4063A5A01BE9013C002055E0 /* Assets.xcassets */, 113 | 4063A5A21BE9013C002055E0 /* LaunchScreen.storyboard */, 114 | 4063A5A51BE9013C002055E0 /* Info.plist */, 115 | ); 116 | path = HTYTextFieldDemo; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXHeadersBuildPhase section */ 122 | 4063A5851BE9010C002055E0 /* Headers */ = { 123 | isa = PBXHeadersBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | 4063A58C1BE9010C002055E0 /* HTYTextField.h in Headers */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | /* End PBXHeadersBuildPhase section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 4063A5871BE9010C002055E0 /* HTYTextField */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 4063A5901BE9010C002055E0 /* Build configuration list for PBXNativeTarget "HTYTextField" */; 136 | buildPhases = ( 137 | 4063A5831BE9010C002055E0 /* Sources */, 138 | 4063A5841BE9010C002055E0 /* Frameworks */, 139 | 4063A5851BE9010C002055E0 /* Headers */, 140 | 4063A5861BE9010C002055E0 /* Resources */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | ); 146 | name = HTYTextField; 147 | productName = HTYTextField; 148 | productReference = 4063A5881BE9010C002055E0 /* HTYTextField.framework */; 149 | productType = "com.apple.product-type.framework"; 150 | }; 151 | 4063A5961BE9013C002055E0 /* HTYTextFieldDemo */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 4063A5A61BE9013C002055E0 /* Build configuration list for PBXNativeTarget "HTYTextFieldDemo" */; 154 | buildPhases = ( 155 | 4063A5931BE9013C002055E0 /* Sources */, 156 | 4063A5941BE9013C002055E0 /* Frameworks */, 157 | 4063A5951BE9013C002055E0 /* Resources */, 158 | 4063A5AF1BE906BC002055E0 /* Embed Frameworks */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | 4063A5AE1BE906BC002055E0 /* PBXTargetDependency */, 164 | ); 165 | name = HTYTextFieldDemo; 166 | productName = HTYTextFieldDemo; 167 | productReference = 4063A5971BE9013C002055E0 /* HTYTextFieldDemo.app */; 168 | productType = "com.apple.product-type.application"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 4063A57F1BE9010C002055E0 /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastSwiftUpdateCheck = 0710; 177 | LastUpgradeCheck = 1020; 178 | ORGANIZATIONNAME = Hanton; 179 | TargetAttributes = { 180 | 4063A5871BE9010C002055E0 = { 181 | CreatedOnToolsVersion = 7.1; 182 | LastSwiftMigration = 0810; 183 | }; 184 | 4063A5961BE9013C002055E0 = { 185 | CreatedOnToolsVersion = 7.1; 186 | LastSwiftMigration = 0810; 187 | }; 188 | }; 189 | }; 190 | buildConfigurationList = 4063A5821BE9010C002055E0 /* Build configuration list for PBXProject "HTYTextField" */; 191 | compatibilityVersion = "Xcode 3.2"; 192 | developmentRegion = en; 193 | hasScannedForEncodings = 0; 194 | knownRegions = ( 195 | en, 196 | Base, 197 | ); 198 | mainGroup = 4063A57E1BE9010C002055E0; 199 | productRefGroup = 4063A5891BE9010C002055E0 /* Products */; 200 | projectDirPath = ""; 201 | projectRoot = ""; 202 | targets = ( 203 | 4063A5961BE9013C002055E0 /* HTYTextFieldDemo */, 204 | 4063A5871BE9010C002055E0 /* HTYTextField */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 4063A5861BE9010C002055E0 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | 4063A5951BE9013C002055E0 /* Resources */ = { 218 | isa = PBXResourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | 4063A5A41BE9013C002055E0 /* LaunchScreen.storyboard in Resources */, 222 | 4063A5A11BE9013C002055E0 /* Assets.xcassets in Resources */, 223 | 4063A59F1BE9013C002055E0 /* Main.storyboard in Resources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXSourcesBuildPhase section */ 230 | 4063A5831BE9010C002055E0 /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 4063A5AA1BE90167002055E0 /* HTYTextField.swift in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | 4063A5931BE9013C002055E0 /* Sources */ = { 239 | isa = PBXSourcesBuildPhase; 240 | buildActionMask = 2147483647; 241 | files = ( 242 | 4063A59C1BE9013C002055E0 /* ViewController.swift in Sources */, 243 | 4063A59A1BE9013C002055E0 /* AppDelegate.swift in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | /* End PBXSourcesBuildPhase section */ 248 | 249 | /* Begin PBXTargetDependency section */ 250 | 4063A5AE1BE906BC002055E0 /* PBXTargetDependency */ = { 251 | isa = PBXTargetDependency; 252 | target = 4063A5871BE9010C002055E0 /* HTYTextField */; 253 | targetProxy = 4063A5AD1BE906BC002055E0 /* PBXContainerItemProxy */; 254 | }; 255 | /* End PBXTargetDependency section */ 256 | 257 | /* Begin PBXVariantGroup section */ 258 | 4063A59D1BE9013C002055E0 /* Main.storyboard */ = { 259 | isa = PBXVariantGroup; 260 | children = ( 261 | 4063A59E1BE9013C002055E0 /* Base */, 262 | ); 263 | name = Main.storyboard; 264 | sourceTree = ""; 265 | }; 266 | 4063A5A21BE9013C002055E0 /* LaunchScreen.storyboard */ = { 267 | isa = PBXVariantGroup; 268 | children = ( 269 | 4063A5A31BE9013C002055E0 /* Base */, 270 | ); 271 | name = LaunchScreen.storyboard; 272 | sourceTree = ""; 273 | }; 274 | /* End PBXVariantGroup section */ 275 | 276 | /* Begin XCBuildConfiguration section */ 277 | 4063A58E1BE9010C002055E0 /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | ALWAYS_SEARCH_USER_PATHS = NO; 281 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 282 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 283 | CLANG_CXX_LIBRARY = "libc++"; 284 | CLANG_ENABLE_MODULES = YES; 285 | CLANG_ENABLE_OBJC_ARC = YES; 286 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 287 | CLANG_WARN_BOOL_CONVERSION = YES; 288 | CLANG_WARN_COMMA = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 292 | CLANG_WARN_EMPTY_BODY = YES; 293 | CLANG_WARN_ENUM_CONVERSION = YES; 294 | CLANG_WARN_INFINITE_RECURSION = YES; 295 | CLANG_WARN_INT_CONVERSION = YES; 296 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 297 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 298 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 299 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 300 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 301 | CLANG_WARN_STRICT_PROTOTYPES = YES; 302 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 303 | CLANG_WARN_UNREACHABLE_CODE = YES; 304 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 305 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 306 | COPY_PHASE_STRIP = NO; 307 | CURRENT_PROJECT_VERSION = 1; 308 | DEBUG_INFORMATION_FORMAT = dwarf; 309 | ENABLE_STRICT_OBJC_MSGSEND = YES; 310 | ENABLE_TESTABILITY = YES; 311 | GCC_C_LANGUAGE_STANDARD = gnu99; 312 | GCC_DYNAMIC_NO_PIC = NO; 313 | GCC_NO_COMMON_BLOCKS = YES; 314 | GCC_OPTIMIZATION_LEVEL = 0; 315 | GCC_PREPROCESSOR_DEFINITIONS = ( 316 | "DEBUG=1", 317 | "$(inherited)", 318 | ); 319 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 320 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 321 | GCC_WARN_UNDECLARED_SELECTOR = YES; 322 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 323 | GCC_WARN_UNUSED_FUNCTION = YES; 324 | GCC_WARN_UNUSED_VARIABLE = YES; 325 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 326 | MTL_ENABLE_DEBUG_INFO = YES; 327 | ONLY_ACTIVE_ARCH = YES; 328 | SDKROOT = iphoneos; 329 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 330 | TARGETED_DEVICE_FAMILY = "1,2"; 331 | VERSIONING_SYSTEM = "apple-generic"; 332 | VERSION_INFO_PREFIX = ""; 333 | }; 334 | name = Debug; 335 | }; 336 | 4063A58F1BE9010C002055E0 /* Release */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 346 | CLANG_WARN_BOOL_CONVERSION = YES; 347 | CLANG_WARN_COMMA = YES; 348 | CLANG_WARN_CONSTANT_CONVERSION = YES; 349 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 351 | CLANG_WARN_EMPTY_BODY = YES; 352 | CLANG_WARN_ENUM_CONVERSION = YES; 353 | CLANG_WARN_INFINITE_RECURSION = YES; 354 | CLANG_WARN_INT_CONVERSION = YES; 355 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 357 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 359 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 360 | CLANG_WARN_STRICT_PROTOTYPES = YES; 361 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 362 | CLANG_WARN_UNREACHABLE_CODE = YES; 363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 364 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 365 | COPY_PHASE_STRIP = NO; 366 | CURRENT_PROJECT_VERSION = 1; 367 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 368 | ENABLE_NS_ASSERTIONS = NO; 369 | ENABLE_STRICT_OBJC_MSGSEND = YES; 370 | GCC_C_LANGUAGE_STANDARD = gnu99; 371 | GCC_NO_COMMON_BLOCKS = YES; 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 379 | MTL_ENABLE_DEBUG_INFO = NO; 380 | SDKROOT = iphoneos; 381 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | VALIDATE_PRODUCT = YES; 384 | VERSIONING_SYSTEM = "apple-generic"; 385 | VERSION_INFO_PREFIX = ""; 386 | }; 387 | name = Release; 388 | }; 389 | 4063A5911BE9010C002055E0 /* Debug */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | CLANG_ENABLE_MODULES = YES; 393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 394 | DEFINES_MODULE = YES; 395 | DYLIB_COMPATIBILITY_VERSION = 1; 396 | DYLIB_CURRENT_VERSION = 1; 397 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 398 | INFOPLIST_FILE = HTYTextField/Info.plist; 399 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 400 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 401 | PRODUCT_BUNDLE_IDENTIFIER = com.hanton.HTYTextField; 402 | PRODUCT_NAME = "$(TARGET_NAME)"; 403 | SKIP_INSTALL = YES; 404 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 405 | SWIFT_VERSION = 5.0; 406 | }; 407 | name = Debug; 408 | }; 409 | 4063A5921BE9010C002055E0 /* Release */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | CLANG_ENABLE_MODULES = YES; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 414 | DEFINES_MODULE = YES; 415 | DYLIB_COMPATIBILITY_VERSION = 1; 416 | DYLIB_CURRENT_VERSION = 1; 417 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 418 | INFOPLIST_FILE = HTYTextField/Info.plist; 419 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 420 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 421 | PRODUCT_BUNDLE_IDENTIFIER = com.hanton.HTYTextField; 422 | PRODUCT_NAME = "$(TARGET_NAME)"; 423 | SKIP_INSTALL = YES; 424 | SWIFT_VERSION = 5.0; 425 | }; 426 | name = Release; 427 | }; 428 | 4063A5A71BE9013C002055E0 /* Debug */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 432 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 433 | INFOPLIST_FILE = HTYTextFieldDemo/Info.plist; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 435 | PRODUCT_BUNDLE_IDENTIFIER = com.hanton.HTYTextFieldDemo; 436 | PRODUCT_NAME = "$(TARGET_NAME)"; 437 | SWIFT_VERSION = 5.0; 438 | }; 439 | name = Debug; 440 | }; 441 | 4063A5A81BE9013C002055E0 /* Release */ = { 442 | isa = XCBuildConfiguration; 443 | buildSettings = { 444 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 445 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 446 | INFOPLIST_FILE = HTYTextFieldDemo/Info.plist; 447 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 448 | PRODUCT_BUNDLE_IDENTIFIER = com.hanton.HTYTextFieldDemo; 449 | PRODUCT_NAME = "$(TARGET_NAME)"; 450 | SWIFT_VERSION = 5.0; 451 | }; 452 | name = Release; 453 | }; 454 | /* End XCBuildConfiguration section */ 455 | 456 | /* Begin XCConfigurationList section */ 457 | 4063A5821BE9010C002055E0 /* Build configuration list for PBXProject "HTYTextField" */ = { 458 | isa = XCConfigurationList; 459 | buildConfigurations = ( 460 | 4063A58E1BE9010C002055E0 /* Debug */, 461 | 4063A58F1BE9010C002055E0 /* Release */, 462 | ); 463 | defaultConfigurationIsVisible = 0; 464 | defaultConfigurationName = Release; 465 | }; 466 | 4063A5901BE9010C002055E0 /* Build configuration list for PBXNativeTarget "HTYTextField" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | 4063A5911BE9010C002055E0 /* Debug */, 470 | 4063A5921BE9010C002055E0 /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | defaultConfigurationName = Release; 474 | }; 475 | 4063A5A61BE9013C002055E0 /* Build configuration list for PBXNativeTarget "HTYTextFieldDemo" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 4063A5A71BE9013C002055E0 /* Debug */, 479 | 4063A5A81BE9013C002055E0 /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | /* End XCConfigurationList section */ 485 | }; 486 | rootObject = 4063A57F1BE9010C002055E0 /* Project object */; 487 | } 488 | --------------------------------------------------------------------------------