{"id":2572,"url":"https://github.com/IdleHandsApps/IHKeyboardAvoiding","last_synced_at":"2025-08-06T13:32:54.413Z","repository":{"id":17766473,"uuid":"20627133","full_name":"IdleHandsApps/IHKeyboardAvoiding","owner":"IdleHandsApps","description":"IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required!","archived":false,"fork":false,"pushed_at":"2022-09-08T16:58:03.000Z","size":13048,"stargazers_count":1408,"open_issues_count":20,"forks_count":153,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-07-31T17:47:50.846Z","etag":null,"topics":[],"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/IdleHandsApps.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}},"created_at":"2014-06-08T21:40:18.000Z","updated_at":"2025-07-13T18:05:06.000Z","dependencies_parsed_at":"2022-09-05T05:20:46.824Z","dependency_job_id":null,"html_url":"https://github.com/IdleHandsApps/IHKeyboardAvoiding","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/IdleHandsApps/IHKeyboardAvoiding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdleHandsApps%2FIHKeyboardAvoiding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdleHandsApps%2FIHKeyboardAvoiding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdleHandsApps%2FIHKeyboardAvoiding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdleHandsApps%2FIHKeyboardAvoiding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IdleHandsApps","download_url":"https://codeload.github.com/IdleHandsApps/IHKeyboardAvoiding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IdleHandsApps%2FIHKeyboardAvoiding/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268099746,"owners_count":24196100,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-01-05T20:16:17.228Z","updated_at":"2025-08-06T13:32:54.080Z","avatar_url":"https://github.com/IdleHandsApps.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Keyboard [🔝](#readme)","Keyboard","Other"],"sub_categories":["Keyboard","Other free courses","Mathematics"],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg alt=\"IHKeyboardAvoiding\" src=\"https://github.com/IdleHandsApps/IHKeyboardAvoiding/blob/master/KeyboardAvoiding/KeyboardAvoiding/Assets.xcassets/AppIcon.appiconset/Icon-76.png\" /\u003e\n\u003c/p\u003e\n\nIHKeyboardAvoiding [![Language: Swift 4.2](https://img.shields.io/badge/Swift-4.2-orange.svg)](https://swift.org)\n------------------------------\n\nAn elegant solution for keeping any UIView visible when the keyboard is being shown\n\n![alt demo](https://github.com/IdleHandsApps/IHKeyboardAvoiding/blob/gh-pages/IHKeyboardAvoidingDemo.gif)\n\n## Requirements\n\n|                  |  IHKeyboardAvoiding Version  |\n|------------------|--------------------|\n|    Objective C   |        2.6.0       |\n|       Swift      |        3.0.0 +     |\n\n## Description\n\nIHKeyboardAvoiding will translate any UIView up when the keyboard is being shown, then return it when the keyboard is hidden.  \n\nRegister an ```avoidingView```(UIView) with IHKeyboardAvoiding; when the keyboard is shown, if  the ```avoidingView's``` frame will be intersected by the keyboard, then it will move up just above the keyboard. When the keyboard is dismissed, the ```avoidingView``` is returned to its original position.\n\nWhat sets IHKeyboardAvoiding apart from other keyboard avoiding solutions is that it doesn't require placing your content in a UIScrollView.  No scroll view is used. And it isn't restricted to keeping UITextFields visible, with IHKeyboardAvoiding any UIView can avoid the keyboard\n\nIf Autolayout is used then the constraints are animated, otherwise a CGAffine translation is done.\n\n## Supported Features\n\n* iPhone keyboard\n* iPad docked keyboard\n* iPad undocked keyboard\n* iPad split keyboard\n* landscape \u0026 protrait\n* 3rd party keyboards\n* Auto Layout\n* AutoResizingMask (Springs \u0026 Struts)\n\n## How to install\n\nAdd this to your CocoaPods Podfile.\n```\npod 'IHKeyboardAvoiding'\n```\n\n## How to use\n\nTo set the avoiding view\n```swift\nKeyboardAvoiding.avoidingView = self.avoidingView\n```\n\nPut it in ```viewDidLoad()``` or ```viewDidAppear(_ animated: Bool)``` depending on your usage\n\nIf you're unsure put it in ```viewDidAppear(_ animated: Bool)```\n\nIf you need to set the avoidingView, or its properites, dynamically consider putting it in ```textViewShouldBeginEditing(_ textView: UITextView)```\n\nOptional methods    \n```KeyboardAvoiding.setAvoidingView(self.avoidingView, withTriggerView: self.triggerView)``` Use this to set an avoidingView but have a different view that triggers the avoiding. If a triggerView's frame will be intersected by the keyboard, then the avoidingView will be moved so that the triggerView is above the keyboard\n```KeyboardAvoiding.buffer``` The avoidingView will move if the keyboard is within ```buffer``` points of the triggerView's frame.  Default buffer is 0  \n```KeyboardAvoiding.paddingForCurrentAvoidingView``` The padding to put between the keyboard and triggerView.  Default padding is 0\n\nEnable tap to dismiss the keyboard by simply changing any UIView to be an instance of KeyboardDismissingView in you nib/storyboard\n\n## Buy now and get this free gift :)\n\nA Codable extension to decode arrays and to catch \u0026 log all decoding failures\nhttps://github.com/IdleHandsApps/SafeDecoder\n\nButton styles that are centralied and reusable, and hooked up to InterfaceBuilder\nhttps://github.com/IdleHandsApps/DesignableButton\n\nA fully automatic status bar overlay for No Internet Connection messages\nhttps://github.com/IdleHandsApps/StatusBarOverlay\n\n## IHKeyboardAvoiding vs UIScrollView solutions - Fight, fight!\nUIScrollView pros:\n* They're quick n easy\n\nIHKeyboardAvoiding pros:\n* You dont have scrollviews littered throughout your app\n* Having multiple scrollviews in your view heirarchy can cause problems\n* When the keyboard hides, scrollviews dont always scroll back to their original position\n* Scrollviews only scroll enough to keep the focused textfield visible\n* IHKeyboardAvoiding provides control over which UIViews are visible when the keyboard appears\n\n## Similar keyboard avoiding solutions\n\nhttps://github.com/michaeltyson/TPKeyboardAvoiding (UIScrollView based)  \nhttps://github.com/kirpichenko/EKKeyboardAvoiding (UIScrollView based)  \nhttps://github.com/robbdimitrov/RDVKeyboardAvoiding (UIScrollView based) \nhttps://github.com/hackiftekhar/IQKeyboardManager (looks interesting) \nhttps://github.com/danielamitay/DAKeyboardControl (looks interesting)\n\n## Author\n\n* Fraser Scott-Morrison (fraserscottmorrison@me.com)\n\nIt'd be great to hear about any cool apps that are using IHKeyboardAvoiding\n\n## License \n\nDistributed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIdleHandsApps%2FIHKeyboardAvoiding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIdleHandsApps%2FIHKeyboardAvoiding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIdleHandsApps%2FIHKeyboardAvoiding/lists"}