MagicKeyboard is a library for seamlessly managing the position of text inputs during iOS keyboard appearance. It automatically positions UITextField
/UITextViews
so they are visible when the keyboard appears. No Code Required!
Add MagicKeyboard to your project using Swift Package Manager. In your Xcode project, select File
> Swift Packages
> Add Package Dependency
and enter the repository URL.
MagicKeyboard is a codeless solution to positioning input views when the keyboard appears. All you need to do is instantiate an instance of MagicKeyboard
that will live for the lifetime of the application.
class AppDelegate: UIResponder, UIApplicationDelegate {
let magicKeyboard = MagicKeyboard()
...
}
That is all that's needed! MagicKeyboard will handle positioning input views inside a regular UIView
or UIScrollView
when the keyboard appears.
MagicKeyboard is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 1 |
Last commit: 1 year ago |
keyboardWillShow
and inputDidBeginEditing
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics