{"id":2963,"url":"https://github.com/serralvo/TextFieldCounter","last_synced_at":"2025-08-06T16:31:37.597Z","repository":{"id":56924164,"uuid":"75477706","full_name":"serralvo/TextFieldCounter","owner":"serralvo","description":"UITextField character counter with lovable UX 💖. No math skills required 🙃.","archived":false,"fork":false,"pushed_at":"2019-12-27T20:05:11.000Z","size":1193,"stargazers_count":439,"open_issues_count":4,"forks_count":31,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-10T12:04:49.205Z","etag":null,"topics":["swift","textfield","uitextfield"],"latest_commit_sha":null,"homepage":"","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/serralvo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-03T14:13:33.000Z","updated_at":"2024-01-11T18:46:16.000Z","dependencies_parsed_at":"2022-08-20T22:50:28.894Z","dependency_job_id":null,"html_url":"https://github.com/serralvo/TextFieldCounter","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serralvo%2FTextFieldCounter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serralvo%2FTextFieldCounter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serralvo%2FTextFieldCounter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serralvo%2FTextFieldCounter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serralvo","download_url":"https://codeload.github.com/serralvo/TextFieldCounter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923711,"owners_count":17992567,"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":["swift","textfield","uitextfield"],"created_at":"2024-01-05T20:16:27.540Z","updated_at":"2024-12-09T16:31:07.425Z","avatar_url":"https://github.com/serralvo.png","language":"Swift","funding_links":[],"categories":["UI","Libs","UIKit","UI [🔝](#readme)"],"sub_categories":["TextField \u0026 TextView","UI","Other free courses"],"readme":"# TextFieldCounter\n    UITextField character counter with lovable UX 💖. No math skills required 🙃.\n\n[![Swift Version][swift-image]][swift-url]\n[![License][license-image]][license-url]\n[![Build Status][build-status-image]][build-status-url]\n[![codecov](https://codecov.io/gh/serralvo/TextFieldCounter/branch/master/graph/badge.svg)](https://codecov.io/gh/serralvo/TextFieldCounter)\n![CocoaPods][pod-version-image]\n\n## Features\n\n- [x] Set max length of `UITextField`.\n- [x] A beautiful and animated label about the limits. Show it by ascending or descending way.\n- [x] Haptic Feedback.\n- [x] Easy setup with `@IBInspectable`.\n\n![TextFieldCounter][demo-image]\n\n## Requirements\n\n|TextFieldCounter Version| 1.1.0 | 1.0.4|\n|---|---|---|\n|iOS Version | 10.0+| 8.0+|\n|Xcode Version | 11.2| 8|\n\n## Installation\n\n#### CocoaPods\nYou can use [CocoaPods](http://cocoapods.org/) to install `TextFieldCounter` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '10.0'\nuse_frameworks!\npod 'TextFieldCounter'\n```\n\nTo get the full benefits import `TextFieldCounter` wherever you import UIKit\n\n``` swift\nimport UIKit\nimport TextFieldCounter\n```\n\n#### Manually\n1. Download and drop ```TextFieldCounter.swift``` in your project.  \n2. Congratulations 🚀 \n\n## Usage example\n\n#### By Inspector\n\n1. Set the class and configure the options.\n\n![Inspector][inspector-image]\n\n#### Programmatically\n\n```swift\nimport TextFieldCounter\n\nlet frame = CGRect(x: 20, y: 80, width: 320, height: 30)\nlet textField = TextFieldCounter(frame: frame, limit: 20, animate: true, ascending: true, counterColor: .black, limitColor: .red)\n\nview.addSubview(textField)\n```\n\n##### Use Delegate\n\nSet `counterDelegate` and enjoy it 🚀:\n\n```swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    textField.counterDelegate = self\n}\n\nfunc didReachMaxLength(textField: TextFieldCounter) {\n    print(\"didReachMaxLength\")\n}\n\n```\n\n## Next Steps\n\n- Add `UIAppearance` support\n- Add More tests\n- Add Carthage support\n\n## Contribute\n\nWe would ❤️ to see your contribution! To contribute to **TextFieldCounter**, check the ``LICENSE`` file for more info.\n\n## License\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n## About\n\nCreated by Fabricio Serralvo – [serralvo.co](https://serralvo.co)\n\nSpecial thanks 👍 to [@ciceroduarte](https://github.com/ciceroduarte) and [@rogerluan](https://github.com/rogerluan)\n\n[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg\n[swift-url]: https://swift.org/\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n[build-status-image]: https://api.travis-ci.org/serralvo/TextFieldCounter.svg\n[pod-version-image]: https://img.shields.io/cocoapods/v/TextFieldCounter.svg\n[build-status-url]: https://travis-ci.org/serralvo/TextFieldCounter\n[inspector-image]:https://github.com/serralvo/TextFieldCounter/blob/master/Images/inspector.png\n[demo-image]:https://github.com/serralvo/TextFieldCounter/blob/master/Images/demo.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserralvo%2FTextFieldCounter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserralvo%2FTextFieldCounter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserralvo%2FTextFieldCounter/lists"}