Skip to content

UITextField for iOS that enables the user to see both the Input Text and the Placeholder

License

Notifications You must be signed in to change notification settings

zaltzy/AnimatedFormFieldTableViewCell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AnimatedFormFieldTableViewCell

The AnimatedFormFieldTableViewCell allows you to implement a UITableViewCell with an embedded UITextField that automatically scales the textfield's placeholder upon user interaction.

Installation: Grab the "AnimatedFormFieldTableViewCell.xib" and "AnimatedFormFieldTableViewCell.swift" files from the "AnimatedFormFieldTableViewCell" folder and drag them to your project".

In order to use AnimatedFormFieldTableViewCell, all you have to do is:

  1. Register the AnimatedFormFieldTableViewCell nib on the ViewController on which you are implementing your UITableView for your reuse identifier.

  2. Dequeue your cell on CellForRowAtIndexPath as a AnimatedFormFieldTableViewCell.

  3. Change the placeholder's label text by calling setLabelText on the cell itself.

And you're pretty much done :). Everything should take care of itself from this point forward.

Notes:

  1. In order to access the embedded UITextField you can simply call the cell's cellTextField property.

  2. The AnimatedFormFieldTableViewCell conforms to the UITextFieldDelegate protocol, so if you wish to implement any of the UITextFieldDelegate for the cell's textField, you just need to set the delegate on the cell itself (and not on the textField - there's no need for that - the cell will take care of that).

  3. For best results - cell height should be 60.

About

UITextField for iOS that enables the user to see both the Input Text and the Placeholder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%