{"id":13625171,"url":"https://github.com/danielamitay/DAKeyboardControl","last_synced_at":"2025-04-16T06:31:54.701Z","repository":{"id":2406306,"uuid":"3373793","full_name":"danielamitay/DAKeyboardControl","owner":"danielamitay","description":"DAKeyboardControl adds keyboard awareness and scrolling dismissal (ala iMessages app) to any view with only 1 line of code.","archived":false,"fork":false,"pushed_at":"2022-09-09T12:21:14.000Z","size":774,"stargazers_count":1569,"open_issues_count":40,"forks_count":203,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-07T04:13:59.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielamitay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-07T02:55:11.000Z","updated_at":"2025-01-17T16:00:58.000Z","dependencies_parsed_at":"2022-08-20T19:50:21.312Z","dependency_job_id":null,"html_url":"https://github.com/danielamitay/DAKeyboardControl","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielamitay%2FDAKeyboardControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielamitay%2FDAKeyboardControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielamitay%2FDAKeyboardControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielamitay%2FDAKeyboardControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielamitay","download_url":"https://codeload.github.com/danielamitay/DAKeyboardControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248908412,"owners_count":21181521,"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":[],"created_at":"2024-08-01T21:01:51.617Z","updated_at":"2025-04-16T06:31:54.648Z","avatar_url":"https://github.com/danielamitay.png","language":"Objective-C","readme":"# DAKeyboardControl\n\n`DAKeyboardControl` allows you to easily add keyboard awareness and scrolling dismissal (a receding keyboard ala iMessages app) to any `UIView`,`UIScrollView` or `UITableView` with only 1 line of code. `DAKeyboardControl` automatically extends `UIView` and provides a block callback with the keyboard's current frame.\n\n`DAKeyboardControl` now fully supports orientation changes, iPhone \u0026 iPad, and is even aware of keyboard undocking or splitting on the iPad.\n\nNo hacks, fully App Store safe.\n\n![Screenshot](https://github.com/danielamitay/DAKeyboardControl/raw/master/screenshot.png)\n\n[Video demonstration on YouTube](http://www.youtube.com/watch?v=J6GLro0cyDU)\n\n## Installation\n\n- Copy over the `DAKeyboardControl` folder to your project folder.\n- `#import \"DAKeyboardControl.h\"`\n\n## Usage\n\nExample project included (DAKeyboardControlExample)\n\n### Adding pan-to-dismiss (functionality introduced in iMessages)\n\n```objective-c\n[self.view addKeyboardPanningWithActionHandler:^(CGRect keyboardFrameInView) {\n        // Move interface objects accordingly\n\t\t// Animation block is handled for you\n    }];\n\t// Make sure to call [self.view removeKeyboardControl] before the view is released.\n\t// (It's the balancing call)\n```\n\n### Adding keyboard awareness (appearance and disappearance only)\n\n```objective-c\n[self.view addKeyboardNonpanningWithActionHandler:^(CGRect keyboardFrameInView) {\n        // Move interface objects accordingly\n\t\t// Animation block is handled for you\n    }];\n\t// Make sure to call [self.view removeKeyboardControl] before the view is released.\n\t// (It's the balancing call)\n```\n\n### Supporting an above-keyboard input view\n\nThe `keyboardTriggerOffset` property allows you to choose at what point the user's finger \"engages\" the keyboard.\n\n```objective-c\nself.view.keyboardTriggerOffset = 44.0f;\t// Input view frame height\n\n[self.view addKeyboardPanningWithActionHandler:^(CGRect keyboardFrameInView) {\n        // Move input view accordingly\n\t\t// Animation block is handled for you\n    }];\n\t// Make sure to call [self.view removeKeyboardControl] before the view is released.\n\t// (It's the balancing call)\n```\n\n### Dismissing the keyboard (convenience method)\n\n```objective-c\n[self.view hideKeyboard];\n```\n\n### Remove the NSNotification observer at the end of a VC's life (convenience method)\n\n```objective-c\n[self.view removeKeyboardControl];\n```\n\n## Notes\n\n### Tested in App Store!\nAll code is iOS 5.0+ safe and well documented, and is already in production apps on the App Store.\n\n### Using with a `UITextView`\nMake sure to call `addKeyboardPanningWithActionHandler:` on the `UITextView` itself if you wish for it to allow panning inside itself.\n\n### Keyboard Delay On First Appearance\nStandard iOS issue. Use Brandon William's [UIResponder category](https://github.com/mbrandonw/UIResponder-KeyboardCache) to cache the keyboard before first use.\n\n### Automatic Reference Counting (ARC) support\n`DAKeyboardControl` was made with ARC enabled by default.\n\n## Contact\n\n- [@danielamitay](http://twitter.com/danielamitay)\n- hello@danielamitay.com\n- http://www.danielamitay.com\n\nIf you use/enjoy `DAKeyboardControl`, let me know!\n\n## License\n\n### MIT License\n\nCopyright (c) 2012 Daniel Amitay (http://danielamitay.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielamitay%2FDAKeyboardControl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielamitay%2FDAKeyboardControl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielamitay%2FDAKeyboardControl/lists"}