HideKeyboardTapGestureManager
Use https://github.com/bonyadmitr/KeyboardHideManager. This one is deprecated and will be deleted soon.
Install / Use
/learn @bonyadmitr/HideKeyboardTapGestureManagerREADME
HideKeyboardTapGestureManager
Use https://github.com/bonyadmitr/KeyboardHideManager. This one is deprecated and will be deleted soon.
![]()
HideKeyboardTapGestureManager - easy to use, codeless manager to hide keyboard by tapping on views for iOS written in Swift.

Structure
- Features
- Requirements
- Installation
- Usage
- User Iteraction Enabled
- Code usage
- Xib support
- To do
- License
Features
- [x] 3 simple actions to setup
- [x] Multiple views setup
- [x] Codeless usage
- [x] Code only usage
- [x] Xib support
- [x] Warning logs for code usage
Requirements
- Swift 3.0+
- iOS 8.0+
Installation
CocoaPods
pod 'HideKeyboardTapGestureManager', '~> 1.0'
<details>
<summary>Full CocoaPods Guide (click to expand)</summary>
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate HideKeyboardTapGestureManager into your Xcode project using CocoaPods, create file Podfile with content:
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'HideKeyboardTapGestureManager', '~> 1.0'
end
Then, run the following command:
$ pod install
Close 'Your Target Name'.xcodeproj and open 'Your Target Name'.xcworkspace.
</details>Carthage (code only)
HideKeyboardTapGestureManager cannot be used in IB due .framework issue. See Code usage section.
github "bonyadmitr/HideKeyboardTapGestureManager" ~> 1.0
<details>
<summary>Full Carthage Guide (click to expand)</summary>
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate HideKeyboardTapGestureManager into your Xcode project using Carthage, create file Cartfile with content:
github "bonyadmitr/HideKeyboardTapGestureManager" ~> 1.0
Run carthage update to build the framework and drag the built HideKeyboardTapGestureManager.framework into your Xcode project.
Manually
If you prefer not to use either of the aforementioned dependency managers, you can integrate HideKeyboardTapGestureManager into your project manually.
Drag HideKeyboardTapGestureManager folder in your project
Usage
-
- Drag Object from Object library

-
- Setup
HideKeyboardTapGestureManagerin Class field
- Setup

-
- Connect views with
targets
- Connect views with

User Iteraction Enabled
Target must be UIView subclass and user iteraction enabled is on. You can set it in IB in View section: (example for UILabel)

or in code:
someView.isUserInteractionEnabled = true
Code usage
You can use HideKeyboardTapGestureManager in code:
Connect object:
@IBOutlet var hideKeyboardTapGestureManager: HideKeyboardTapGestureManager!
or add in code:
let hideKeyboardTapGestureManager = HideKeyboardTapGestureManager()
Add new targets:
hideKeyboardTapGestureManager.add(targets: [someView1])
or remove old ones:
hideKeyboardTapGestureManager.remove(targets: [someView2])
hideKeyboardTapGestureManager.removeAllTargets()
Xib support
To use with xib you must add strong property to controller:
@IBOutlet var hideKeyboardTapGestureManager: HideKeyboardTapGestureManager!
Otherwise it will be deinited. It is logic of Objects in xibs.
To do
- [x] Add example
- [ ] Add tests
- [ ] Add comments
- [ ] Add CI
License
HideKeyboardTapGestureManager is released under the MIT license. See LICENSE for details.
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
