You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/iqkeyboardmanager/README.md
+57-30Lines changed: 57 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -1,42 +1,65 @@
1
1
# @nativescript/iqkeyboardmanager
2
2
3
-
A NativeScript wrapper for the popular [IQKeyboardManager](https://cocoapods.org/pods/IQKeyboardManager) iOS framework, which provides an elegant solution for preventing the iOS keyboard from covering `UITextView` controls.
4
-
5
-

A NativeScript wrapper for the popular [IQKeyboardManager](https://cocoapods.org/pods/IQKeyboardManager) iOS framework, which provides an elegant solution for preventing the iOS keyboard from covering `UITextView` controls.
27
+
28
+

29
+
30
+
27
31
## Installation
28
32
33
+
To install the plugin, run the following command from the root folder of your project:
34
+
29
35
```cli
30
36
npm install @nativescript/iqkeyboardmanager
31
37
```
32
38
33
-
## Usage
39
+
## Use @nativescript/iqkeyboardmanager
34
40
35
-
Related text fields should be siblings for the IQKeyboardManager to automatically
41
+
The following sections describe how to use the `@nativescript/iqkeyboardmanager` plugin in the different flavors that NativeScript supports.
42
+
43
+
> **Note** Make related text fields siblings for the IQKeyboardManager to automatically
36
44
add the `previous`(`<`) and `next`(`>`) buttons to the accessory bar. The user can then use those buttons to jump back and forth.
37
45
38
46
### Core
39
-
To register the plugin in core/plain NativeScript, use the `xmlns` attribute to add it to the xml namespace.
47
+
1. Register the plugin namespace with Page's `xmlns` attribute under a prefix( `IQKeyboardManager` for example) that you can use to access the `PreviousNextView`.
<previousNextView><!-- add this 'wrapper' to enable those previous / next buttons -->
@@ -112,8 +136,9 @@ Then use it.
112
136
</stackLayout>
113
137
</previousNextView>
114
138
```
139
+
For a demo app, visit [NativeScript Svelte: IQ Keyboard Manager](https://stackblitz.com/edit/nativescript-stackblitz-templates-rygnsk?file=app/components/Home.svelte).
115
140
116
-
### Adding a hint text to a TextView's accessory bar
141
+
### Adding a hint text to the TextView accessory bar
117
142
118
143
By default, when a `TextField` is focused, the keyboard manager shows the field's hint label in the accessory bar above the keyboard.
You can find the complete demo at [NativeScript Svelte](https://stackblitz.com/edit/nativescript-stackblitz-templates-rygnsk?file=app/components/Home.svelte)
The following are links to the plugin demo apps in the different JS flavors.
212
239
213
-
See the full example at [NativeScript React: iqkeyboardmanager](https://stackblitz.com/edit/nativescript-stackblitz-templates-5uygfj?file=src/components/ScreenOne.tsx)
240
+
*[NativeScript TS: IQ Keyboard Manager](https://stackblitz.com/edit/nativescript-stackblitz-templates-sia8th?file=app/main-page.xml).
241
+
*[NativeScript Svelte: IQ Keyboard Manager](https://stackblitz.com/edit/nativescript-stackblitz-templates-rygnsk?file=app/components/Home.svelte)
242
+
*[NativeScript React: IQ Keyboard Manager](https://stackblitz.com/edit/nativescript-stackblitz-templates-5uygfj?file=src/components/ScreenOne.tsx)
214
243
215
244
216
-
#### Tweaking the appearance and behavior
245
+
### Tweaking the appearance and behavior
246
+
247
+
To tweak the appearance and behavior of `PreviousNextView`, follow the steps below:
217
248
218
249
1. Add the following path to your app’s `references.d.ts` file.
iOS has a feature where a text field's QuickType search suggestion bar can suggest `one-time` code values for multi-factor authentication that were texted to your device.
247
274
248
-
If the field is identified as a `one-time` code field, the suggestion will appear for about 3 minutes after being received. The user simply has to tap the suggestion to fill in the value — no short-term memorization or copy/paste gestures required. Examples of message formats are:
275
+
If the field is identified as a `one-time` code field, the suggestion will appear for about 3 minutes after being received. The user simply has to tap the suggestion to fill in the value — no short-term memorization or copy/paste gestures are required. Examples of message formats are:
There are other `textContentType` values you might want to use. You can read more about the property in [this article](https://medium.com/developerinsider/ios12-password-autofill-automatic-strong-password-and-security-code-autofill-6e7db8da1810).
271
298
272
-
## Documentation
299
+
## Native documentation
273
300
274
301
For more details on how IQKeyboardManager works, including more detailed API documentation, refer to [the library's CocoaPod page](https://cocoapods.org/pods/IQKeyboardManager).
0 commit comments