Skip to content

UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text.

License

Notifications You must be signed in to change notification settings

pritasam/RPFloatingPlaceholders

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPFloatingPlaceholders

UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text.

Please see the included example app for sample usage.

Options:

Animate upward (default)

Upwards animation

Animate downward

Downwards animation

Supports:

ARC & iOS 7+

Caveat: I am using setFrame: so these classes probably won't play well with storyboards using Auto Layout at runtime. You should still be able to programmatically add them to a view that has Auto Layout enabled and they should work fine, but loading from a storyboard doesn't set the frames correctly. I welcome any pull requests to fix this since I don't have much experience with Auto Layout.

A little help from my friends:

Please feel free to fork and create a pull request for bug fixes or improvements, being sure to maintain the general coding style and adding comments as necessary.

Credit:

Credit for the design concept goes to Matt D. Smith.

About

UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text.

Resources

License

Stars

Watchers

Forks

Packages

No packages published