среда, 2 октября 2019 г.

MSVTextFieldPod

MSVTextFieldPod

CI Status Version License Platform

Example

img

To run the example project, clone the repo, and run pod install from the Example directory first.

There is simple task: How to make UITextfield highlight when tapped? (On focus)

simpleTextField.onFocus { textField, isBegin in     textField.backgroundColor = isBegin ? UIColor.yellow : UIColor.lightGray  }

How to check input and highlight?

simpleTextField.onFocus { textField, isBegin in     textField.backgroundColor = isBegin ? UIColor.yellow : UIColor.lightGray  }.onChange { _, string in     return string.count < 10 // check for 10 symbols max  }

Requirements

Installation

MSVTextFieldPod is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'MSVTextFieldPod'

Author

Serge Moskalenko, https://github.com/sergemoskalenko

License

MSVTextFieldPod is available under the MIT license. See the LICENSE file for more info.

Комментариев нет:

Related Posts Plugin for WordPress, Blogger...