Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.42 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.42 KB

RGSTextFieldReveal

New Material UITextField

This project is an implementation of a Dribbble shot.

iPhone 5

Storyboard Example

  • Add an UIView to your storyboard.
  • Change its subclass to RGSTextFieldReveal.
  • Change its Intrinsic Size to Placeholder.
  • Change width to None.

For full example please download project.

Storyboard

Customization

RGSTextFieldReveal can be customized via the following @properties

var placeholderButton: UIButton!

var reveralView: UIView!
var textField: UITextField!
    
var reveralViewMinHeight: CGFloat
var reveralViewMaxHeight: CGFloat

var openDuration: Double
var closeDuration: Double

var isOpen: Bool

func open()
func close()

##Limitation RGSTextFieldReveal calls self.superview!.layoutIfNeeded() apart of its animation, so if you need full control when your view calls layoutIfNeeded(), then RGSTextFieldReveal is not for you. Also, RGSTextFieldReveal.placeholderButton.titleLabel doesn't animate its scale when RGSTextFieldReveal open/close.