Latest 0.0.2
Homepage https://github.com/shuuchen/WWElasticTextField
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

UITextField with elastic bounce effect on touch.

WWElasticTextField

Requirements

  • Xcode 7+
  • iOS 8.0+
  • ARC
  • Swift 2.0+

Installation

CocoaPods

use_frameworks!
pod "WWElasticTextField"

Usage

Simply replace UITextField with WWElasticTextField in source code or interface builder.

In source code

import WWElasticTextField

override func viewDidLoad() {
  super.viewDidLoad()

  /* ... */

  /* initialize */
  let elasticTextField = WWElasticTextField(frame: CGRectMake(0, 0, 97, 30))

  /* set position */
  elasticTextField.center = view.center

  /* customize */
  elasticTextField.overshootAmount = 30

  /* add to super view */
  view.addSubview(elasticTextField)

  /* ... */
}

In interface builder

Set up

Drag a new UITextView from object library and set its custom class to be WWElasticTextField.

WWElasticTextField

Customize

Play with the value of overshootAmount (positive or negative) and see how the elastic extent changes accordingly.

WWElasticTextField

Tutorial

https://www.raywenderlich.com/100939/how-to-create-an-elastic-animation-with-swift

License

Released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "WWElasticTextField",
    "version": "0.0.2",
    "summary": "UITextField with elastic bounce effect.",
    "description": "UITextField with elastic bounce effect.nA more interactable text fieldn                Following the tutorial by Daniel Tavares on raywenderlich:nhttps://www.raywenderlich.com/100939/how-to-create-an-elastic-animation-with-swift",
    "homepage": "https://github.com/shuuchen/WWElasticTextField",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "shuchen": "[email protected]"
    },
    "social_media_url": "http://twitter.com/shuchen",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/shuuchen/WWElasticTextField.git",
        "tag": "0.0.2"
    },
    "source_files": [
        "WWElasticTextField",
        "WWElasticTextField/**/*.{swift}"
    ],
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This