PKAutofillTextField 1.0.2

PKAutofillTextField 1.0.2

Maintained by Praveen Kumar Shrivastav.



PKAutofillTextField

CI Status Version License Platform

Feature:

  • Ease to integrate by just creating instance and add to view
  • Holds all inputs w.r.t. their unique identifier
  • Store default values without giving input manually, just set those values while intializing
  • Ability to delete records

Screenshot

Installation

CocoaPods

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

pod 'PKAutofillTextField'

Manual

Copy the entire PKSecurePin folder which contains two swift files and add to your project

cp -rf PKAutofillTextField/Classes/ <to_your_project_dir>

Usage

		// import the PKAutofillTextField
		import PKAutofillTextField

		class ViewController: UIViewController, PKAutofillTextFieldDelegate {

			override func viewDidLoad() {
        		// instantiate PKAutofillTextField
        		// presenting: self
        		// keyIdentifier: unique identifier for textfield
        		// buttonTitle: to show the button title on textfield
        
        		let textField = PKAutofillTextField.init(frame: CGRect.init(x: 5, y: 400, width: 400, height: 50), presenting: self, keyIdentifier: "server", delegate: self, buttonTitle: "show")
        
        		// some default values for textfield
        		textField.defaultValues(values: ["https://google.com", "https://weather.com"])
        
        		// add textfield to view
        		self.view.addSubview(textField)
    		}

    		// callback methods of PKAutofillTextFieldDelegate
    		func selectedValue(value: String) {
        		//implementation goes here after selecting the value from lists
    		}
    	}

Example

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

Author

Praveen Kumar Shrivastav, [email protected]

License

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