3.2.0
This release contains improvements to the input set functionality:
- There is a new
KeyboardInputProvider
protocol. StandardKeyboardInputProvider
tries to use the current locale (fallback to English) and can be inherited.StaticKeyboardInputProvider
uses three static input sets.InputSet+English
has been renamed toInputSet+Locale
and has more sets.InputSet+Locale
extension has support for basic English, German, Italian and Swedish.StandardKeyboardInputProvider
is used by default in the context, but you can change this at anytime.
The release also introduces a new "keyboard layout" concept, where a keyboard layout is an input set with surrounding actions:
- There is a new
KeyboardLayout
struct. - There is a new
KeyboardLayoutProvider
protocol.StandardKeyboardLayoutProvider
uses the current context and can be inherited.StaticKeyboardLayoutProvider
uses a static layout that is provided at init.
StandardKeyboardLayoutProvider
is used by default in the context, but you can change this at anytime.
There are new properties in the KeyboardContext
.
This release also makes it easier to resolve system keyboard dimensions:
CGFloat+Keyboard
has utils to resolve the standard keyboard row height.KeyboardStackViewComponent
s use this new standard height as default height.UIEdgeInsets+Keyboard
has utils to resolve the standard keyboard row item insets.KeyboardButtonRowComponent
s use these new standard insets as default insets.
The demos have been updated with these changes.
Bug fixes:
- The context controller propertis are marked as
@unowned
to fix a memory leak.
Deprecations:
CGFloat+KeyboardDimensions
is deprecated and will be removed in 4.0.KeyboardContext
'scontroller
is now deprecated and will be removed in 4.0 .Usage is strongly discouraged. Use the context instead.
Breaking:
KeyboardContext
has new properties to make the new input and layout additions possible. If you have created your own context, you will have to add these.