GMTextField
If you like this pod, please give me a ★ at the top right of the page!
Overview
GMTextField are customizable TextFields based on material design. This pod can be helpful if you want to use a simple and easy to use TextFields with cool animations. It also have a multiline textfield.
- They have few different animations
- They support different sizes
- They also support side buttons, place holders and error messages
- You can define custom verifications using completions
Check out the example if you whant to see it in action!
Preview Samples
- One line
Scale minimize | yShake | Rotation shake | xShake |
---|---|---|---|
- Multiline
Animation | Scroll |
---|---|
Please, Let me know if you find any problem with it.
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- Swift 5.
- iOS 13 or higher.
Installation
Cocoapods
To integrate GMTextField into your Xcode project using CocoaPods, you have to specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
use_frameworks!
pod 'GMTextField', '~> 0.8'
Then, run the following command:
$ pod install
Usage and Implementation
-
Create a View in the View Controller you want the TextFiels, and then change the class to GMTextFieldSingularLine or GMTextFieldMultipleLines.
-
import GMTextField
import GMTextField
- Create view reference in the ViewController
- Modify the customization you want
- Implement the delegate methods
- Run the app
NOTE: This is the first version of this pod (0.3)
Customization
protocol GMCustomization {
var leftImage: UIImage? { get set }
var rightImage: UIImage? { get set }
var placeHolder: String! { get set }
var color: UIColor! { get set }
var textColor: UIColor? { get set }
var textFont: UIFont? { get set }
var errorTextFont: UIFont? { get set }
var placeHolderTextFont: UIFont? { get set }
var errorColor: UIColor? { get set }
var verificationOnlyAtEnd: Bool? { get set }
var numberOfCharacters: Int? { get set }
var numberOfLines: Int? { get set }
}
You also can moodify few properties on the stpryboard
Author
Gianpiero Mode Tw: @GianMode Linkedln: www.linkedin.com/in/gianpiero-mode-a001b6a7
License
GMTextField is available under the MIT license. See the LICENSE file for more info.