{"id":15038969,"url":"https://github.com/adboco/keyboard","last_synced_at":"2025-10-23T19:47:15.478Z","repository":{"id":32686063,"uuid":"133345961","full_name":"adboco/Keyboard","owner":"adboco","description":"Keyboard makes easy to use inputAccessoryView in UIViewController, UITextView, UITextField and UISearchBar.","archived":false,"fork":false,"pushed_at":"2021-11-14T16:00:04.000Z","size":44,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T12:09:26.046Z","etag":null,"topics":["cocoapods","ios","ios-app","keyboard-layout","mit-license","pods","swift","swift-4","swift-library","swift4","xcode","xcode9"],"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/adboco.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}},"created_at":"2018-05-14T10:44:31.000Z","updated_at":"2023-11-27T16:09:13.000Z","dependencies_parsed_at":"2022-07-20T00:02:30.704Z","dependency_job_id":null,"html_url":"https://github.com/adboco/Keyboard","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/adboco/Keyboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FKeyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FKeyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FKeyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FKeyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adboco","download_url":"https://codeload.github.com/adboco/Keyboard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FKeyboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259462559,"owners_count":22861512,"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":["cocoapods","ios","ios-app","keyboard-layout","mit-license","pods","swift","swift-4","swift-library","swift4","xcode","xcode9"],"created_at":"2024-09-24T20:41:01.011Z","updated_at":"2025-10-23T19:47:15.386Z","avatar_url":"https://github.com/adboco.png","language":"Swift","readme":"# Keyboard\n\n[![Version](https://img.shields.io/cocoapods/v/KeyboardSwift.svg?style=flat)](https://cocoapods.org/pods/KeyboardSwift)\n[![License](https://img.shields.io/cocoapods/l/KeyboardSwift.svg?style=flat)](https://cocoapods.org/pods/KeyboardSwift)\n[![Platform](https://img.shields.io/cocoapods/p/KeyboardSwift.svg?style=flat)](https://cocoapods.org/pods/KeyboardSwift)\n[![Swift Version](https://img.shields.io/badge/swift-4.1-orange.svg)](https://cocoapods.org/pods/KeyboardSwift)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fadboco%2FKeyboard.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fadboco%2FKeyboard?ref=badge_shield)\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n* Xcode 9.0+\n* iOS 8.0+\n\n## Installation\n\nKeyboard is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'KeyboardSwift'\n```\n\n## Usage\n\n```swift\nimport KeyboardSwift\n```\n\nYou can use Keyboard in ``UIViewController`` or any ``UIView`` with ``inputAccessoryView`` (``UITextField``, ``UISearchBar``, ``UITextView``). Simply call ``keyboard`` and configure it with the items you want. An example:\n\n```swift\nlet cancelItem = KeyboardItem.barButton(title: \"Cancel\", style: .plain) { item in\n\t// Called when cancel item is tapped\n    self.textView.endEditing(true)\n}\n\nlet countLabel = UILabel()\ncountLabel.text = \"0\"\nlet labelItem = KeyboardItem.custom(view: countLabel)\n\nlet doneItem = KeyboardItem.barButton(title: \"Done\", style: .done) { item in\n\t// Called when done item is tapped\n    self.textView.endEditing(true)\n}\n\ntextView.keyboard.with(items: cancelItem, .flexibleSpace, labelItem, .flexibleSpace, doneItem)\n```\n\n![alt text](https://github.com/adboco/Keyboard/blob/master/Assets/keyboard1.png \"Keyboard\")\n\n### KeyboardItem\n\n```swift\n/// Default bar button item\ncase barButton(title: String, style: UIBarButtonItemStyle, action: UIBarButtonItemTargetClosure?)\n\n/// System bar button item\ncase systemBarButton(system: UIBarButtonSystemItem, action: UIBarButtonItemTargetClosure?)\n\n/// Flexible space\ncase flexibleSpace\n\n/// Fixed space\ncase fixedSpace(width: CGFloat)\n\n/// Custom view\ncase custom(view: UIView)\n```\n\n### Customize\n\nYou can customize the ``accessoryView`` calling ``customize`` method:\n\n```swift\ntextView.keyboard.customize { (toolbar, items) in\n    toolbar.isTranslucent = false\n    toolbar.tintColor = .purple\n}\n```\n\n### Keyboard Events\n\nOnly available in ``UIViewController`` or subclass:\n\n```swift\ncase willShow\ncase willHide\ncase didShow\ncase didHide\n```\n\nExample:\n\n```swift\noverride func viewDidLoad() {\n\tsuper.viewDidLoad()\n\n\t// Subscribe\n\tself.keyboard.subscribe(to: .willShow) { sender in\n\t    // TODO: something to do when keyboard will be shown\n\t}\n\n\t// ...\n\n\t// Unsubscribe\n\tself.keyboard.unsubscribe()\n}\n```\n\n## Author\n\nadboco@telefonica.net, Adrián Bouza Correa\n\n## License\n\nKeyboard is available under the MIT license. See the LICENSE file for more info.\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fadboco%2FKeyboard.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fadboco%2FKeyboard?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadboco%2Fkeyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadboco%2Fkeyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadboco%2Fkeyboard/lists"}