{"id":15037790,"url":"https://github.com/sgr-ksmt/formtoolbar","last_synced_at":"2025-04-09T23:33:09.215Z","repository":{"id":56911674,"uuid":"82358594","full_name":"sgr-ksmt/FormToolbar","owner":"sgr-ksmt","description":"Simple, movable and powerful toolbar for UITextField and UITextView.","archived":false,"fork":false,"pushed_at":"2020-03-25T04:09:50.000Z","size":745,"stargazers_count":86,"open_issues_count":2,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T14:18:39.566Z","etag":null,"topics":["easy-to-use","ios","keyboard","powerful","swift","swift-3","swift-framework","swift-library","textfield","textview","toolbar"],"latest_commit_sha":null,"homepage":null,"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/sgr-ksmt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"sgr-ksmt"}},"created_at":"2017-02-18T03:32:07.000Z","updated_at":"2023-10-05T03:37:58.000Z","dependencies_parsed_at":"2022-08-21T04:20:37.386Z","dependency_job_id":null,"html_url":"https://github.com/sgr-ksmt/FormToolbar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgr-ksmt%2FFormToolbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgr-ksmt%2FFormToolbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgr-ksmt%2FFormToolbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgr-ksmt%2FFormToolbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgr-ksmt","download_url":"https://codeload.github.com/sgr-ksmt/FormToolbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129982,"owners_count":21052675,"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":["easy-to-use","ios","keyboard","powerful","swift","swift-3","swift-framework","swift-library","textfield","textview","toolbar"],"created_at":"2024-09-24T20:35:44.277Z","updated_at":"2025-04-09T23:33:09.189Z","avatar_url":"https://github.com/sgr-ksmt.png","language":"Swift","funding_links":["https://github.com/sponsors/sgr-ksmt"],"categories":[],"sub_categories":[],"readme":"# FormToolbar\nSimple, movable and powerful toolbar for UITextField and UITextView.\n\n[![GitHub release](https://img.shields.io/github/release/sgr-ksmt/FormToolbar.svg)](https://github.com/sgr-ksmt/FormToolbar/releases)\n![Language](https://img.shields.io/badge/language-Swift%204-orange.svg)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods  Compatible](https://img.shields.io/badge/Cocoa%20Pods-compatible-4BC51D.svg?style=flat)](https://cocoapods.org)\n\n|       Sample GIF        |        Capture        |\n|:-----------------------:|:---------------------:|\n| ![gif](docs/sample.gif) | ![gif](docs/img1.png) |\n\n- [Appetize.io's Demo is here!](https://appetize.io/embed/w7muzzpbfr2p5fw1juctnp9qn0?device=iphone7\u0026scale=100\u0026orientation=portrait\u0026osVersion=10.2)\n\n## Feature\n- Easy to use. (Just add inputs to toolbar).\n- available to use `UITextField` and `UITextView`. (mix ok!!)\n\n## Usage\n### Getting Started\n\n- ViewController has two text fields and one text view.\n\n```swift\nclass ViewController: UIViewController {\n    @IBOutlet private weak var emailTextField: UITextField!\n    @IBOutlet private weak var passwordTextField: UITextField!\n    @IBOutlet private weak var profileTextView: UITextView!\n}\n```\n\n- Create Toolbar (and attach toolbar to textfield's inputAccessoryView)\n\n```swift\n    self.toolbar = FormToolbar(inputs: [emailTextField, passwordTextField, profileTextView])\n```\n\n- Call *update()* on UITextField's delegate method. (or UItextView's delegate method.)\n\n```swift\nfunc textFieldDidBeginEditing(_ textField: UITextField) {\n    toolbar.updater()\n}\n```\n\n- \"Is that all?\" - ***Yeah, that is all.*** :thumbsup:\n\n**NOTE:** There is demo project!!\n\n### Advanced\n- Back/Forward button type\n\n```swift\ntoolbar.direction = .leftRight\ntoolbar.direction = .upDown\n```\n\n*Left-Right*  \n![gif](docs/img2.png)  \n\u003cbr /\u003e\n*Up-Down*  \n![gif](docs/img3.png)\n\n- \"Done\" button's title\n\n```swift\ntoolbar.doneButtonTitle = \"👇\"\n```\n\n![gif](docs/img4.png)\n\n\n- Change button color\n\n```swift\ntoolbar.backButtonTintColor = .red\ntoolbar.forwardButtonTintColor = .green\ntoolbar.doneButtonTintColor = .purple\n\n// or set all together\ntoolbar.setButtonsTintColor(.red)\n```\n\n![gif](docs/img5.png)\n\n\n- Get current/previous/next input\n\n```swift\ntoolbar.currentInput\ntoolbar.previousInput\ntoolbar.nextInput\n\nif let activeTextField = toolbar.currentInput as? UITextField {\n    // ...\n}\n```\n\n- Update Inputs\n\n```swift\nlet newInputs: [FormInput] = [emailTextField, passwordTextField]\ntoolbar.set(inputs: newInputs)\n```\n\n- Go forward when UITextField's return key pressed\n\n```swift\nfunc textFieldShouldReturn(_ textField: UITextField) -\u003e Bool {\n    toolbar.goForward()\n    return true\n}\n```\n\n\n## Requirements\n- iOS 9.0+\n- Xcode 8.2.1+\n- Swift 3.0+\n\n## Installation\n\n### Carthage\n\n- Add the following to your *Cartfile*:\n\n```bash\ngithub \"sgr-ksmt/FormToolbar\" ~\u003e 1.0\n```\n\n- Run `carthage update`\n- Add the framework as described.\n\u003cbr\u003e Details: [Carthage Readme](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application)\n\n\n### CocoaPods\n\n**FormToolbar** is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'FormToolbar', '~\u003e 1.0'\n```\n\nand run `pod install`\n\n### Manually Install\nDownload all `*.swift` files and put your project.\n\n## Change log\nChange log is [here](https://github.com/sgr-ksmt/FormToolbar/blob/master/CHANGELOG.md).\n\n## Communication\n- If you found a bug, open an issue.\n- If you have a feature request, open an issue.\n- If you want to contribute, submit a pull request.:muscle:\n\n## License\n\n**FormToolbar** is under MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgr-ksmt%2Fformtoolbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgr-ksmt%2Fformtoolbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgr-ksmt%2Fformtoolbar/lists"}