To run the example project, clone the repo, and run pod install
from the Example directory first.
Swift 3.0 iOS 10 and above
CreoleTextfield is a textfield object which manage to do automatically validation based of type which you have select.
Supported Textfield Type:
1.None
2.Email
3.Password
4.PhoneNumber
5.Postal code
6.Date of birth
If you don't want use pod, then you can drag CreoleTextField file into your project and directly use it. Here is Swift Code:
let yourTextField = CreoleTextField.init(frame: CGRect.init(x: X, y: Y, width: WIDTH, height: HEIGHT))
yourTextField.TextfieldType = CreoleTextFieldType.email.rawValue// set textfield type like email, none,password,dateofbirth,phone,postalcode
yourTextField.maxLength = YOUR_MAX_LENGHT
yourTextField.setTextFieldView()
yourTextField.delegateObj = self
//Here is delegate method for CreoleTextField
extension yourControllername:CreoleTextFieldDelegate{
func textFieldDidBeginEditing(_ textField: CreoleTextField){
}
func textFieldShouldEndEditing(_ textField: CreoleTextField) -> Bool{
return true
}
func textFieldDidEndEditing(_ textField: CreoleTextField){
}
func textField(_ textField: CreoleTextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) ->Bool{
return true
}
}
CreoleTextField is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "CreoleTextField"
Nirmalsinh Rathod, [email protected] www.creolestudios.com
CreoleTextField is available under the MIT license. See the LICENSE file for more info.