Swiftpack.co - Package - danielsaidi/KeyboardKitSwiftUI

Version Platform Swift 5.1 License Twitter: @danielsaidi

About KeyboardKitSwiftUI

KeyboardKitSwiftUI extends KeyboardKit with SwiftUI functionality.

This library is temporarily a separate project, since Xcode can't handle iOS 13 features in a framework that targets iOS 11. If this would be a part of KeyboardKit, you would have to add a weak SwiftUI dependency to your project to avoid crashes on iOS 11 and 12 devices.

Read more about SwiftUI support in the main repository.

Installation

Swift Package Manager

https://github.com/danielsaidi/KeyboardKitSwiftUI.git

CocoaPods

target 'MyApp' do
  pod 'KeyboardKit'
end

target 'MyKeyboard' do
  pod 'KeyboardKit'
end

Contact me

Feel free to reach out if you have questions or if you want to contribute in any way:

Supporters

KeyboardKit is proudly supported by:

Anomaly Software

Your company can support KeyboardKit by either sponsoring the project on GitHub Sponsors or by paying for consultation. I'ld be happy to help you out with your keyboard needs.

License

KeyboardKitSwiftUI is available under the MIT license. See LICENSE file for more info.

Github

link
Stars: 11

Used By

Total: 0

Releases

- 2020-09-15 19:02:29

This version makes the View+Geometry extension internal.

If you use it, consider copying it from SwiftUIKit.

- 2020-09-13 21:45:48

This version makes the .emojiCategory action use a clear interactable background for system buttons.

- 2020-09-13 13:02:39

This version adds new autocomplete tools:

  • ObservableAutocompleteContext can be used to bind autocomplete results to views.
  • AutocompleteToolbar is a customizable toolbar for displaying autocomplete results.

The toolbar uses the new observable context to populate itself with suggestions.

- 2020-09-12 09:43:53

This version improves the documentation and adds more configuration options to some views.

- 2020-09-12 09:43:42

This version improves the documentation and fixes an invalid package reference.

- 2020-09-12 09:43:26

This version fixes a bug, where the next keyboard "globe" button didn't do anything.

This version also adjusts the system image font weight, to more closely fit the native keyboards.

- 2020-07-14 12:21:13

This version adds a bunch of extended iOS13/SwiftUI/Combine-specific logic.

There are a lot more not covered in these release notes or in the readme, but I've tried to apply most things in the demo.

  • ObservableKeyboardContext contains more information.
  • Image+Keyboard contains more keyboard-specific icons.
  • KeyboardGridRow has been deleted and replaced with an HStack.
  • KeyboardSetting can resolve a unique key for an Identifiable context.
  • PersistedKeyboardSetting can resolve a unique key for an Identifiable context.

The new Gestures and System namespace help you build native-imitating keyboards:

  • View+keyboardAction applies keyboard action-specific gestures to any view.

  • View+keyboardGestures applies keyboard-specific gestures to any view.

  • The various +system extensions apply a system keyboard logic to various types.

  • You can also use the many extensions within these namespaces to build custom views.

There are new System mimicking keyboard views:

  • SystemKeyboardBottomRow mimics the bottommost row in a system keyboard.
  • SystemKeyboardButton mimics a system keyboard button.
  • SystemKeyboardButtonRow mimics a row in a system keyboard.
  • SystemKeyboardStyle defines a style for system keyboards.
  • SystemKeyboardVStack is a VStack that applies the correct system keyboard style.
  • AlphabeticSystemKeyboard mimics an alphabetical system keyboard.
  • NumericSystemKeyboard mimics a numeric system keyboard.
  • SymbolicSystemKeyboard mimics a symbolic system keyboard.

There is a new Toast namespace that contains utils to show toast messages above a keyboard.

Breaking changes:

  • View withClearInteractableBackground has been renamed to clearInteractableBackground.

- 2020-05-06 13:13:22

This version updates external dependencies to their latest versions.

- 2020-05-06 13:13:12

This version updates external dependencies to their latest versions.

- 2020-03-20 15:56:20

This version adds a missing dependency to KeyboardKit.

- 2020-03-20 15:55:18

This version adds the first (and so far limited) support for SwiftUI. Many new features are iOS 13-specific.

There are some new views that can be used in SwiftUI-based apps and keyboard extensions:

  • KeyboardGrid distributes actions evenly within a grid.
  • KeyboardGridRow is used for each row in the grid.
  • KeyboardHostingController can be used to wrap any View in a keyboard extension.
  • KeyboardImageButton view lets you show an .image action or Image in a Button.
  • NextKeyboardButton sets itself up with a globe icon and works as a standard "next keyboard" button.
  • PersistedKeyboardSetting is a new property wrapper for persisting settings in UserDefaults.

as well as some extensions:

  • Color.clearInteractable can be used instead of .clear to allow gestures to be detected.
  • Image.globe returns the icon that is used for "next keyboard".
  • KeyboardInputViewController setup(with:View) sets up a KeyboardHostingController.
  • View withClearInteractableBackground() can be used to make an entire view interactable.