{"id":2975,"url":"https://github.com/nathantannar4/InputBarAccessoryView","last_synced_at":"2025-08-06T13:31:58.808Z","repository":{"id":24148380,"uuid":"100748577","full_name":"nathantannar4/InputBarAccessoryView","owner":"nathantannar4","description":"A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments","archived":false,"fork":false,"pushed_at":"2024-10-30T06:15:02.000Z","size":6358,"stargazers_count":1177,"open_issues_count":44,"forks_count":232,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-12-08T17:44:23.513Z","etag":null,"topics":["input","swift","uicomponent","uikit"],"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/nathantannar4.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-18T20:39:34.000Z","updated_at":"2024-12-05T09:05:30.000Z","dependencies_parsed_at":"2024-11-19T18:17:52.478Z","dependency_job_id":"ac515441-3248-4238-91e5-ce156ca2a6b4","html_url":"https://github.com/nathantannar4/InputBarAccessoryView","commit_stats":{"total_commits":311,"total_committers":29,"mean_commits":"10.724137931034482","dds":"0.37942122186495175","last_synced_commit":"17ced92a5dccb36512b408b6276353631d7cbe57"},"previous_names":[],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathantannar4%2FInputBarAccessoryView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathantannar4%2FInputBarAccessoryView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathantannar4%2FInputBarAccessoryView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathantannar4%2FInputBarAccessoryView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathantannar4","download_url":"https://codeload.github.com/nathantannar4/InputBarAccessoryView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228770387,"owners_count":17969906,"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":["input","swift","uicomponent","uikit"],"created_at":"2024-01-05T20:16:27.895Z","updated_at":"2024-12-09T14:30:42.555Z","avatar_url":"https://github.com/nathantannar4.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Chat [🔝](#readme)"],"sub_categories":["TextField \u0026 TextView","Chat"],"readme":"[![Image](./Screenshots/Preview.gif)]()\n\n# InputBarAccessoryView\n\n### Features\n\n- [x] Autocomplete text with @mention, #hashtag or any other prefix \n- [x] A self-sizing `UITextView` with an optional fixed height (can be replaced with any other view)\n- [x] Image paste support   \n- [x] Autocomplete attributed text highlighting\n- [x] Reactive components that respond to given events\n- [x] Top/Bottom/Left/Right `InputStackView`s that act as toolbars to place buttons\n- [x] Drop in attachment view for file/photo management\n- [x] Plugin support for your own `InputPlugin`s\n- [x] Compatible with all iPhones and iPads\n- [x] RTL Support\n\n### Installation via Swift Package Manager (SPM)\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.\nOnce you have your Swift package set up, adding InputBarAccessoryView as a dependency is as easy as adding it to the dependencies value of your Package.swift.\n\n```\ndependencies: [\n    .package(url: \"https://github.com/nathantannar4/InputBarAccessoryView.git\", .upToNextMajor(from: \"6.0.0\"))\n]\n```\nYou can also add it via Xcode SPM editor with URL:\n```\nhttps://github.com/nathantannar4/InputBarAccessoryView.git\n```\n\n### Requirements\n\niOS 14.0+\nSwift 6\n\n\u003e The latest iOS 13 release is v6.5.1\n\n\u003e The latest iOS 12 release is v5.5.0\n\n\u003e CocoaPods and RxExtensions were removed in 6.0.0\n\n\u003e The latest iOS 11 release is v5.1.0\n\n\u003e The latest Swift 5.0 release is v5.1.0 \n\n\u003e The latest Swift 4.2 release is v4.2.2 \n\n### Documentation\n\n[Getting Started](./GETTING_STARTED.md)\n\n\u003e See the Example project to see how you can make the iMessage, Slack, Facebook and GitHawk input bars!\n\n### Example Usage\n\n\u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotA.png\" width=\"242\" height=\"432\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotB.png\" width=\"242\" height=\"432\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotC.png\" width=\"242\" height=\"432\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotD.png\" width=\"242\" height=\"432\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotE.png\" width=\"242\" height=\"432\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/ScreenshotF.png\" width=\"242\" height=\"432\"\u003e\n\n### Featured In\n\nAdd your app to the list of apps using this library and make a pull request.\n\n- [MessageKit](https://github.com/MessageKit/MessageKit) *(renamed to MessageInputBar)*\n\u003cp\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/MessageKit/MessageKit/master/Assets/mklogo.png\" title=\"MessageKit Logo\" height=\"50\"\u003e\n\u003c/p\u003e\n\n- [MessageViewController](https://github.com/GitHawkApp/MessageViewController) *(Autocomplete Highlighting Algorithm)*\n\u003cp\u003e\n  \u003cimg src=\"https://avatars3.githubusercontent.com/u/32285710?s=200\u0026v=4\" title=\"GitHawk Logo\" height=\"50\"\u003e\n\u003c/p\u003e\n\n### See Also\n\niMessage style [TypingIndicator](https://github.com/nathantannar4/TypingIndicator) for chat apps\n\n## Latest Releases\n7.0.0\n   - **Breaking change**: Drop iOS 13 support\n   - **Breaking change**: Move to Swift 6, fully support  Swift concurrency\n\n6.5.0\n   - Bump Swift version to 5.10\n   - Perform layout changes on main thread\n   \n6.4.0\n   - Fixed bottom gap calculations for embedded controllers\n   \n6.3.0\n   - Fixed the gap between keyboard and input bar when used on pagesheet/formsheet on iPad\n   - Fixed crash after adding image attachment\n\n6.2.0\n   - Remove `canBecomeFirstResponder` on `InputTextView` to fix `UITextViewDelegate` methods not being called\n   \n6.1.1\n   - Fixed warning for Xcode 14\n\n6.1.0\n   - #230 Added additionalInputViewBottomConstraintConstant to KeyboardManager as a way for providing additional bottom constraint constant offset for inputAccessoryView. Example implementation can be found in AdditionalBottomSpaceExampleViewController\n\n6.0.0\n   - **Breaking change**: Drop iOS 12 support\n   - **Breaking change**: Drop CocoaPods support \u0026 RxSwift extension (it was available only via CocoaPods)\n   - KeyboardManager will not update position of inputAccessoryView from interactive dismiss panGesture when the keyboard is floating\n   - Update docs\n    \nSee [CHANGELOG](./CHANGELOG.md) for more details and older releases.\n\n**Find a bug? Open an issue!**\n\n## Layout\n\nThe layout of the `InputBarAccessoryView` is made of of 4  `InputStackView`'s and an `InputTextView`. The padding of the subviews can be easily adjusted by changing the `padding` and `textViewPadding` properties. The constraints will automatically be updated.\n\n\u003cimg src=\"https://raw.githubusercontent.com/nathantannar4/InputBarAccessoryView/master/Screenshots/Layout.png\"\u003e\n\nIt is important to note that each of the `InputStackView `'s to the left and right of the `InputTextView` are anchored by a width constraint. This way the `InputTextView` will always fill the space inbetween in addition to providing methods that can easily be called to hide all buttons to the right or left of the `InputTextView` by setting the width constraint constant to 0. The bottom and top stack views are not height constraint and rely on their `intrinsicContentSize`\n\n```swift\nfunc setLeftStackViewWidthConstant(to newValue: CGFloat, animated: Bool)\n\nfunc setRightStackViewWidthConstant(to newValue: CGFloat, animated: Bool)\n```\n\n### Reactive Hooks\n\nEach `InputBarButtonItem` has properties that can hold actions that will be executed during various hooks such as the button being touched, the `UITextView `text changing and more! Thanks to these easy hooks with a few lines of code the items can be easily resized and animated similar to that of the Facebook messenger app.\n\n```swift\n// MARK: - Hooks\n    \npublic typealias InputBarButtonItemAction = ((InputBarButtonItem) -\u003e Void)    \n    \nprivate var onTouchUpInsideAction: InputBarButtonItemAction?\nprivate var onKeyboardEditingBeginsAction: InputBarButtonItemAction?\nprivate var onKeyboardEditingEndsAction: InputBarButtonItemAction?\nprivate var onKeyboardSwipeGestureAction: ((InputBarButtonItem, UISwipeGestureRecognizer) -\u003e Void)?\nprivate var onTextViewDidChangeAction: ((InputBarButtonItem, InputTextView) -\u003e Void)?\nprivate var onSelectedAction: InputBarButtonItemAction?\nprivate var onDeselectedAction: InputBarButtonItemAction?\nprivate var onEnabledAction: InputBarButtonItemAction?\nprivate var onDisabledAction: InputBarButtonItemAction?\n```\n\n## Author\n\u003cp\u003e\n\t\u003cimg src=\"https://github.com/nathantannar4/NTComponents/raw/master/NTComponents/Assets/Nathan.png\" width=\"100\" height=\"100\"\u003e\n\u003c/p\u003e\n\n**Nathan Tannar** - [https://nathantannar.me](https://nathantannar.me)\n**Jakub Kaspar** - [https://jakubkaspar.dev](https://jakubkaspar.dev)\n\n## License\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathantannar4%2FInputBarAccessoryView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathantannar4%2FInputBarAccessoryView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathantannar4%2FInputBarAccessoryView/lists"}