Latest 0.1.0
License MIT
Platforms ios 9.0
Frameworks UIKit

CI Status

What you can do?

- change font and color of placeholder
- limit textField input
- shake animation
- zoom in/out focus animation 
- character range validation
- Hoshi Effect with above feature
- closure callback of character change in textField
- closure callback of textFieldDidBeginEditing
- closure callback of textFieldDidEndEditing
- all other default features of UITextField!!!

Zoom animation

Clumsy view hierarchy

Zoom in TableViewCell

The Example app is cluttered to show how it performs in different/critical view hierarchy and situations. For better experience run the Example app.


To run the example project, clone the repo, and run pod install from the Example directory first.

import TextFieldWrapper

implement zoom in/out:

yourTextField.zoomScale = 1.4 // some value > 1 for zoomIn effect.
yourTextField.addBlurToView = self.view // In which view you want to add transparent blur effect.

implement character changed event:

yourTextField.maxCharacter = 15
yourTextField.characterChangedEvent = { [weak self] (str, num) in
    // your implementation

Prevent Trimming and check validation

yourTextField.maxCharacter = 15
yourTextField.shouldTrim = false
yourTextField.characterChangedEvent = { [weak self] (str, num) in
// your implementation
let flag = yourTextField.isValid

shake animation can be accessed in 3 ways:

  1. yourTextField.shake()
  2. yourTextField.shake(borderColor: .red, borderWidth: 2.0)
  3. yourTextField.shake(borderColor: .red, borderWidth: 4, completion: { 
    [weak self] in
    //your implementation

run the Example project, you will have a clean idea.


iOS 9
Swift 3
Xcode 8



TextFieldWrapper is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TextFieldWrapper"


Just drag and drop the TextFieldWrapper folder to your project.


S.M.Moinuddin, [email protected]


TextFieldWrapper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "TextFieldWrapper",
    "version": "0.1.0",
    "summary": "A wrapper of UITextField.",
    "description": "Limit character input in TextField, trim string when character limit exit, get the character change event, validate inputed character range, modify placeholder color and font, all these functionality you will get with this Wrapper.nAlso you will have eye catchy Zoom In/Out focus animation while editing and end of editing SMTextField. All you have to do is:nyourTextField.zoomScale = 1.4 // some value > 1nyourTextField.addBlurToView = self.view // In which view you want to add transparent blur effect.nnThis wrapper also gives you SMHoshiTextField which have the same effect of HoshiTextField form TextFieldEffects by Rau00fal Riera. It also has all the funtionality of SMTextField.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "S.M.Moinuddin": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.0"
    "platforms": {
        "ios": "9.0"
    "source_files": "TextFieldWrapper/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This