From 0c9dbea890979a3cb319e1e881ba39628755dc2c Mon Sep 17 00:00:00 2001 From: Ivan Zinovyev Date: Tue, 20 Dec 2016 17:15:51 +0300 Subject: [PATCH] Edit read --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index bacbbdd..15d1c9a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,41 @@ target "ProjectName" do end ``` +## Usage +Set height of UIView to 50. Create IBOutlet: +```swift +@IBOutlet weak var textField: UIAnimatedTextField! +``` + +In order to enable placeholder, set placeholder property: +```swift +textField.placeholder = "Enter something" +``` + +### Simple type +By default you use simple type. It is just a text field. + +### Password type +In order to use UIAnimatedTextField for password input, specify its type as .password +```swift +textField.type = .password +end +``` + +### Date type +In order to use UIAnimatedTextField for date input, specify its type as .date +```swift +textField.type = .date +end +``` +Also you can set date format and done button title: +```swift +// "Done" by default +textField.doneTitle = "Ok" +// dd/MM/YYYY" by default +textField.dateFormat = "dd MMMM YYYY" +``` + ## Example To run the example project, clone the repo, and run `pod install` from the Example directory first.