{"id":2951,"url":"https://github.com/nfhipona/AutoCompleteTextField","last_synced_at":"2025-08-03T12:31:48.391Z","repository":{"id":56902547,"uuid":"54223495","full_name":"nfhipona/AutoCompleteTextField","owner":"nfhipona","description":"TextField with smart suggestion for email inputs","archived":false,"fork":false,"pushed_at":"2023-09-05T02:04:41.000Z","size":372,"stargazers_count":65,"open_issues_count":2,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-29T04:53:01.219Z","etag":null,"topics":["carthage","cocoapods","email-suggestion","ios","ios-development","smart-suggestion","swift"],"latest_commit_sha":null,"homepage":"http://nfhipona.github.io/AutoCompleteTextField/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfhipona.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-18T18:34:26.000Z","updated_at":"2024-04-14T00:33:23.000Z","dependencies_parsed_at":"2024-01-02T21:17:47.502Z","dependency_job_id":"4e879f95-75a7-4d9a-9b80-6c05ccd4bd63","html_url":"https://github.com/nfhipona/AutoCompleteTextField","commit_stats":null,"previous_names":["nferocious76/autocompletetextfield"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfhipona%2FAutoCompleteTextField","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfhipona%2FAutoCompleteTextField/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfhipona%2FAutoCompleteTextField/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfhipona%2FAutoCompleteTextField/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfhipona","download_url":"https://codeload.github.com/nfhipona/AutoCompleteTextField/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543211,"owners_count":17934444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","cocoapods","email-suggestion","ios","ios-development","smart-suggestion","swift"],"created_at":"2024-01-05T20:16:27.204Z","updated_at":"2024-12-07T00:31:07.792Z","avatar_url":"https://github.com/nfhipona.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["TextField \u0026 TextView"],"readme":"# AutoCompleteTextField\n\n[![CI Status](https://img.shields.io/badge/build-passed-brightgreen.svg)](https://img.shields.io/badge/build-passed-brightgreen.svg)\n[![Version](https://img.shields.io/badge/pod-v0.5.0-blue.svg)](https://img.shields.io/badge/pod-v0.5.0-blue.svg)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://img.shields.io/badge/Lisence-MIT-yellow.svg)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Platform](https://img.shields.io/badge/platform-ios-lightgrey.svg)](https://img.shields.io/badge/platform-ios-lightgrey.svg)\n\n![ezgif com-resize 1](https://cloud.githubusercontent.com/assets/6511079/16903266/0f2c58e2-4c50-11e6-827c-57b47992c9b2.gif)\n\n\n## Features\n- [x] Provides a subclass of UITextField that has suggestion from input\n- [x] Has autocomplete input feature\n- [x] Data suggestion are provided by users\n- [x] Enable store smart domains\n- [x] Optimized and light weight\n\n\n## Requirements\n\n- iOS 12.0+\n- Swift 5.x\n\n\n## Installation\n\n#### CocoaPods\nYou can use [CocoaPods](http://cocoapods.org/) to install `AutoCompleteTextField` by adding it to your `Podfile`:\n\n```ruby\npod \"AutoCompleteTextField\"\n```\n\n#### Carthage\nCreate a `Cartfile` that lists the framework and run `carthage bootstrap`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/AutoCompleteTextField.framework` to an iOS project.\n\n```\ngithub \"nferocious76/AutoCompleteTextField\"\n```\n\n#### Manually\n1. Download and drop ```/Pod/Classes```folder in your project.  \n2. Congratulations!  \n\n## Usage\n\n```Swift\n\n// Initializing `AutoCompleteTextField` \nlet myTextField = AutoCompleteTextField(frame: CGRect(x: 20, y: 64, width: view.frame.width - 40, height: 40), dataSource: `YourDataSource`, delegate: `YourDelegate`)\n\n// Setting `dataSource`, it can be set from the XCode IB like `TextFieldDelegate` in which will appear as `actfDataSource`\nmyTextField.dataSource = `YourDataSource`\n\n// Setting delimiter (optional). If set, it will only look for suggestion after the delimiter\nmyTextField.setDelimiter(\"@\")\n\n// Show `AutoCompleteButton`\nmyTextField.showAutoCompleteButtonWithImage(UIImage(named: \"checked\"), viewMode: .whileEditing)\n\n// Providing data source to get the suggestion from inputs\nfunc autoCompleteTextFieldDataSource(_ autoCompleteTextField: AutoCompleteTextField) -\u003e [ACTFWeightedDomain] {\n    return weightedDomains // AutoCompleteTextField.domainNames // [ACTFDomain(text: \"gmail.com\", weight: 0), ACTFDomain(text: \"hotmail.com\", weight: 0), ACTFDomain(text: \"domain.net\", weight: 0)]\n}\n\n// optional delegate for checking what was suggested\nfunc autoCompleteTextField(_ autoCompleteTextField: AutoCompleteTextField, didSuggestDomain domain: ACTFDomain) {\n    print(\"Suggested domain: \\(domain.text) - weight: \\(domain.weight)\")\n}\n\n```\n\n## ACTFDomain\n\n`ACTFDomain` is class type that conforms to the `Codable`. User can store and retrieve smart domains.\n\nOne example may be 'gmail.com' and 'georgetown.edu'. Users are more likely to have a 'gmail.com' account so we would want that to show up before 'georgetown.edu', even though that is out of alphabetical order.\n\n`ACTFDomain` is sorted based on its usage with auto storing flag that is default to true.\n\nThis is just one example. Manually providing a suggestion gives more flexibility and does not force the usage of an array of strings. \n\n```Swift\n\n// Usage\nlet g1 = ACTFDomain(text: \"gmail.com\", weight: 10)\nlet g2 = ACTFDomain(text: \"googlemail.com\", weight: 5)\nlet g3 = ACTFDomain(text: \"google.com\", weight: 4)\nlet g4 = ACTFDomain(text: \"georgetown.edu\", weight: 1)\n\nlet weightedDomains = [g1, g2, g3, g4] // [ACTFDomain]\n\n// Storing\n\n// store single\nif g1.store() {\n    print(\"Store success\")\n}\n\n// store multiple\nlet errors = ACTFDomain.store(domains: weightedDomains)\nif errors.count \u003e 0 {\n    print(\"Store domain errors: \", errors)\n}\n\n// Retrieving\n\n// retrieved single\nif let domain = ACTFDomain.domain(for: \"gmail.com\") {\n    print(\"Retrieved single: \", domain.text, domain.weight)\n}\n\n// retrieved multiple\nlet keys = [\"gmail.com\", \"googlemail.com\", \"google.com\", \"georgetown.edu\"]\nlet retriedDomains = ACTFDomain.domain(for: keys)\nprint(\"Retrieved domains: \", retriedDomains.map ({ \"Domain: \\($0.text) - weight: \\($0.weight)\" }))\n\n```\n\n## Contribute\nWe would love for you to contribute to `AutoCompleteTextField`. See the [LICENSE](https://github.com/nferocious76/AutoCompleteTextField/blob/master/LICENSE) file for more info.\n\n## Author\n\nNeil Francis Ramirez Hipona, nferocious76@gmail.com\n\n### About\n\nThis project was inpired by 'HTAutocompleteTextField' an Objc-C framework of a similar feature.\n\n## License\n\nAutoCompleteTextField is available under the MIT license. See the [LICENSE](https://github.com/nferocious76/AutoCompleteTextField/blob/master/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfhipona%2FAutoCompleteTextField","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfhipona%2FAutoCompleteTextField","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfhipona%2FAutoCompleteTextField/lists"}