DNMeterialTextField 0.0.1

DNMeterialTextField 0.0.1

Maintained by Dhiru.




DNMeterialTextField

Version License Platform

DNMeterialTextFiled

This TextFiled is created using Swift languagge and this is available iOS , inspired by Material Design , Android EditText com.google.android.material.textfield.TextInputEditText

With icons

Without icons

Example

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

Requirements

Platform : iOS , Swift 4.3+

Installation

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

pod 'DNMeterialTextField'

Uses

  1. DNMeterialTextField connect this file to your TextField in Storyboard .

  2. Using code :

let textField = DNMeterialTextField(frame: CGRect(x: 0, y: 0, width: 200.00, height: 40.00)) textField.borderStyle = .none //important textField.placeholder = "Enter Email" self.view.addSubview(textField)

Customize

Inspectable Properties (Storyboard)

Border Style Must be set to none (4th in image)

Modify using code :

  1. Change roundness self.textField.cornerRadius = 10.0

  2. Change Active Color self.textField.activeBorderColor = UIColor.orange

  3. Change InAcitve Color self.textField.inactiveColor = .darkGray

  4. Change Left Side icon ( set nil to remove icon default = nil ) self.textField.leftSideIcon = UIImage(named:”ic_user”)

Author

Dhiru-Dev, [email protected]

StackOvrflow

License

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