nativescript-iqkeyboardmanager
Advanced tools
Comparing version 1.2.0 to 1.3.0
268
index.d.ts
@@ -0,9 +1,11 @@ | ||
declare class PreviousNextView { | ||
} | ||
declare const enum IQAutoToolbarManageBehaviour { | ||
BySubviews = 0, | ||
BySubviews = 0, | ||
ByTag = 1, | ||
ByTag = 1, | ||
ByPosition = 2 | ||
ByPosition = 2 | ||
} | ||
@@ -13,23 +15,23 @@ | ||
static alloc(): IQBarButtonItem; // inherited from NSObject | ||
static alloc(): IQBarButtonItem; // inherited from NSObject | ||
static appearance(): IQBarButtonItem; // inherited from UIAppearance | ||
static appearance(): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQBarButtonItem; // inherited from UIAppearance | ||
static new(): IQBarButtonItem; // inherited from NSObject | ||
static new(): IQBarButtonItem; // inherited from NSObject | ||
invocation: NSInvocation; | ||
invocation: NSInvocation; | ||
readonly isSystemItem: boolean; | ||
readonly isSystemItem: boolean; | ||
setTargetAction(target: any, action: string): void; | ||
setTargetAction(target: any, action: string): void; | ||
} | ||
@@ -39,95 +41,95 @@ | ||
static alloc(): IQKeyboardManager; // inherited from NSObject | ||
static alloc(): IQKeyboardManager; // inherited from NSObject | ||
static new(): IQKeyboardManager; // inherited from NSObject | ||
static new(): IQKeyboardManager; // inherited from NSObject | ||
static sharedManager(): IQKeyboardManager; | ||
static sharedManager(): IQKeyboardManager; | ||
canAdjustAdditionalSafeAreaInsets: boolean; | ||
canAdjustAdditionalSafeAreaInsets: boolean; | ||
readonly canGoNext: boolean; | ||
readonly canGoNext: boolean; | ||
readonly canGoPrevious: boolean; | ||
readonly canGoPrevious: boolean; | ||
readonly disabledDistanceHandlingClasses: NSMutableSet<typeof NSObject>; | ||
readonly disabledDistanceHandlingClasses: NSMutableSet<typeof NSObject>; | ||
readonly disabledToolbarClasses: NSMutableSet<typeof NSObject>; | ||
readonly disabledToolbarClasses: NSMutableSet<typeof NSObject>; | ||
readonly disabledTouchResignedClasses: NSMutableSet<typeof NSObject>; | ||
readonly disabledTouchResignedClasses: NSMutableSet<typeof NSObject>; | ||
enable: boolean; | ||
enable: boolean; | ||
enableAutoToolbar: boolean; | ||
enableAutoToolbar: boolean; | ||
enableDebugging: boolean; | ||
enableDebugging: boolean; | ||
readonly enabledDistanceHandlingClasses: NSMutableSet<typeof NSObject>; | ||
readonly enabledDistanceHandlingClasses: NSMutableSet<typeof NSObject>; | ||
readonly enabledToolbarClasses: NSMutableSet<typeof NSObject>; | ||
readonly enabledToolbarClasses: NSMutableSet<typeof NSObject>; | ||
readonly enabledTouchResignedClasses: NSMutableSet<typeof NSObject>; | ||
readonly enabledTouchResignedClasses: NSMutableSet<typeof NSObject>; | ||
keyboardAppearance: UIKeyboardAppearance; | ||
keyboardAppearance: UIKeyboardAppearance; | ||
keyboardDistanceFromTextField: number; | ||
keyboardDistanceFromTextField: number; | ||
readonly keyboardShowing: boolean; | ||
readonly keyboardShowing: boolean; | ||
layoutIfNeededOnUpdate: boolean; | ||
layoutIfNeededOnUpdate: boolean; | ||
readonly movedDistance: number; | ||
readonly movedDistance: number; | ||
overrideKeyboardAppearance: boolean; | ||
overrideKeyboardAppearance: boolean; | ||
placeholderFont: UIFont; | ||
placeholderFont: UIFont; | ||
preventShowingBottomBlankSpace: boolean; | ||
preventShowingBottomBlankSpace: boolean; | ||
previousNextDisplayMode: IQPreviousNextDisplayMode; | ||
previousNextDisplayMode: IQPreviousNextDisplayMode; | ||
readonly resignFirstResponderGesture: UITapGestureRecognizer; | ||
readonly resignFirstResponderGesture: UITapGestureRecognizer; | ||
shouldFixInteractivePopGestureRecognizer: boolean; | ||
shouldFixInteractivePopGestureRecognizer: boolean; | ||
shouldPlayInputClicks: boolean; | ||
shouldPlayInputClicks: boolean; | ||
shouldResignOnTouchOutside: boolean; | ||
shouldResignOnTouchOutside: boolean; | ||
shouldShowTextFieldPlaceholder: boolean; | ||
shouldShowTextFieldPlaceholder: boolean; | ||
shouldShowToolbarPlaceholder: boolean; | ||
shouldShowToolbarPlaceholder: boolean; | ||
shouldToolbarUsesTextFieldTintColor: boolean; | ||
shouldToolbarUsesTextFieldTintColor: boolean; | ||
toolbarBarTintColor: UIColor; | ||
toolbarBarTintColor: UIColor; | ||
toolbarDoneBarButtonItemImage: UIImage; | ||
toolbarDoneBarButtonItemImage: UIImage; | ||
toolbarDoneBarButtonItemText: string; | ||
toolbarDoneBarButtonItemText: string; | ||
toolbarManageBehaviour: IQAutoToolbarManageBehaviour; | ||
toolbarManageBehaviour: IQAutoToolbarManageBehaviour; | ||
readonly toolbarPreviousNextAllowedClasses: NSMutableSet<typeof NSObject>; | ||
readonly toolbarPreviousNextAllowedClasses: NSMutableSet<typeof NSObject>; | ||
toolbarTintColor: UIColor; | ||
toolbarTintColor: UIColor; | ||
readonly touchResignedGestureIgnoreClasses: NSMutableSet<typeof NSObject>; | ||
readonly touchResignedGestureIgnoreClasses: NSMutableSet<typeof NSObject>; | ||
goNext(): boolean; | ||
goNext(): boolean; | ||
goPrevious(): boolean; | ||
goPrevious(): boolean; | ||
registerAllNotifications(): void; | ||
registerAllNotifications(): void; | ||
registerTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; | ||
registerTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; | ||
reloadInputViews(): void; | ||
reloadInputViews(): void; | ||
reloadLayoutIfNeeded(): void; | ||
reloadLayoutIfNeeded(): void; | ||
resignFirstResponder(): boolean; | ||
resignFirstResponder(): boolean; | ||
unregisterAllNotifications(): void; | ||
unregisterAllNotifications(): void; | ||
unregisterTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; | ||
unregisterTextFieldViewClassDidBeginEditingNotificationNameDidEndEditingNotificationName(aClass: typeof NSObject, didBeginEditingNotificationName: string, didEndEditingNotificationName: string): void; | ||
} | ||
@@ -141,21 +143,21 @@ | ||
static alloc(): IQKeyboardReturnKeyHandler; // inherited from NSObject | ||
static alloc(): IQKeyboardReturnKeyHandler; // inherited from NSObject | ||
static new(): IQKeyboardReturnKeyHandler; // inherited from NSObject | ||
static new(): IQKeyboardReturnKeyHandler; // inherited from NSObject | ||
delegate: any; | ||
delegate: any; | ||
lastTextFieldReturnKeyType: UIReturnKeyType; | ||
lastTextFieldReturnKeyType: UIReturnKeyType; | ||
constructor(o: { viewController: UIViewController; }); | ||
constructor(o: { viewController: UIViewController; }); | ||
addResponderFromView(view: UIView): void; | ||
addResponderFromView(view: UIView): void; | ||
addTextFieldView(textFieldView: UIView): void; | ||
addTextFieldView(textFieldView: UIView): void; | ||
initWithViewController(controller: UIViewController): this; | ||
initWithViewController(controller: UIViewController): this; | ||
removeResponderFromView(view: UIView): void; | ||
removeResponderFromView(view: UIView): void; | ||
removeTextFieldView(textFieldView: UIView): void; | ||
removeTextFieldView(textFieldView: UIView): void; | ||
} | ||
@@ -165,7 +167,7 @@ | ||
Default = 0, | ||
Default = 0, | ||
AlwaysHide = 1, | ||
AlwaysHide = 1, | ||
AlwaysShow = 2 | ||
AlwaysShow = 2 | ||
} | ||
@@ -175,17 +177,17 @@ | ||
static alloc(): IQPreviousNextView; // inherited from NSObject | ||
static alloc(): IQPreviousNextView; // inherited from NSObject | ||
static appearance(): IQPreviousNextView; // inherited from UIAppearance | ||
static appearance(): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQPreviousNextView; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQPreviousNextView; // inherited from UIAppearance | ||
static new(): IQPreviousNextView; // inherited from NSObject | ||
static new(): IQPreviousNextView; // inherited from NSObject | ||
} | ||
@@ -195,19 +197,19 @@ | ||
static alloc(): IQTextView; // inherited from NSObject | ||
static alloc(): IQTextView; // inherited from NSObject | ||
static appearance(): IQTextView; // inherited from UIAppearance | ||
static appearance(): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQTextView; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQTextView; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTextView; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQTextView; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQTextView; // inherited from UIAppearance | ||
static new(): IQTextView; // inherited from NSObject | ||
static new(): IQTextView; // inherited from NSObject | ||
placeholder: string; | ||
placeholder: string; | ||
} | ||
@@ -217,25 +219,25 @@ | ||
static alloc(): IQTitleBarButtonItem; // inherited from NSObject | ||
static alloc(): IQTitleBarButtonItem; // inherited from NSObject | ||
static appearance(): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearance(): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQTitleBarButtonItem; // inherited from UIAppearance | ||
static new(): IQTitleBarButtonItem; // inherited from NSObject | ||
static new(): IQTitleBarButtonItem; // inherited from NSObject | ||
selectableTextColor: UIColor; | ||
selectableTextColor: UIColor; | ||
titleFont: UIFont; | ||
titleFont: UIFont; | ||
constructor(o: { title: string; }); | ||
constructor(o: { title: string; }); | ||
initWithTitle(title: string): this; | ||
initWithTitle(title: string): this; | ||
} | ||
@@ -245,61 +247,59 @@ | ||
static alloc(): IQToolbar; // inherited from NSObject | ||
static alloc(): IQToolbar; // inherited from NSObject | ||
static appearance(): IQToolbar; // inherited from UIAppearance | ||
static appearance(): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollection(trait: UITraitCollection): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQToolbar; // inherited from UIAppearance | ||
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject>): IQToolbar; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance | ||
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): IQToolbar; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQToolbar; // inherited from UIAppearance | ||
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject>): IQToolbar; // inherited from UIAppearance | ||
static new(): IQToolbar; // inherited from NSObject | ||
static new(): IQToolbar; // inherited from NSObject | ||
doneBarButton: IQBarButtonItem; | ||
doneBarButton: IQBarButtonItem; | ||
nextBarButton: IQBarButtonItem; | ||
nextBarButton: IQBarButtonItem; | ||
previousBarButton: IQBarButtonItem; | ||
previousBarButton: IQBarButtonItem; | ||
readonly titleBarButton: IQTitleBarButtonItem; | ||
readonly titleBarButton: IQTitleBarButtonItem; | ||
readonly debugDescription: string; // inherited from NSObjectProtocol | ||
readonly debugDescription: string; // inherited from NSObjectProtocol | ||
readonly description: string; // inherited from NSObjectProtocol | ||
readonly description: string; // inherited from NSObjectProtocol | ||
readonly enableInputClicksWhenVisible: boolean; // inherited from UIInputViewAudioFeedback | ||
readonly enableInputClicksWhenVisible: boolean; // inherited from UIInputViewAudioFeedback | ||
readonly hash: number; // inherited from NSObjectProtocol | ||
readonly hash: number; // inherited from NSObjectProtocol | ||
readonly isProxy: boolean; // inherited from NSObjectProtocol | ||
readonly isProxy: boolean; // inherited from NSObjectProtocol | ||
readonly superclass: typeof NSObject; // inherited from NSObjectProtocol | ||
readonly superclass: typeof NSObject; // inherited from NSObjectProtocol | ||
readonly // inherited from NSObjectProtocol | ||
class(): typeof NSObject; | ||
class(): typeof NSObject; | ||
conformsToProtocol(aProtocol: any): boolean; | ||
conformsToProtocol(aProtocol: any /* Protocol */): boolean; | ||
isEqual(object: any): boolean; | ||
isEqual(object: any): boolean; | ||
isKindOfClass(aClass: typeof NSObject): boolean; | ||
isKindOfClass(aClass: typeof NSObject): boolean; | ||
isMemberOfClass(aClass: typeof NSObject): boolean; | ||
isMemberOfClass(aClass: typeof NSObject): boolean; | ||
performSelector(aSelector: string): any; | ||
performSelector(aSelector: string): any; | ||
performSelectorWithObject(aSelector: string, object: any): any; | ||
performSelectorWithObject(aSelector: string, object: any): any; | ||
performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; | ||
performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any; | ||
respondsToSelector(aSelector: string): boolean; | ||
respondsToSelector(aSelector: string): boolean; | ||
retainCount(): number; | ||
retainCount(): number; | ||
self(): this; | ||
self(): this; | ||
} | ||
@@ -306,0 +306,0 @@ |
{ | ||
"name": "nativescript-iqkeyboardmanager", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "NativeScript wrapper of the popular IQKeyboardManager iOS library", | ||
"main": "iqkeyboardmanager", | ||
"typings": "index.d.ts", | ||
"nativescript": { | ||
"platforms": { | ||
"ios": "1.4.0" | ||
"ios": "3.0.0", | ||
"android": "3.0.0" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "npm i && tsc", | ||
"demo.ios": "cd ../demo && tns run ios --emulator --syncAllFiles", | ||
"demo.ios.device": "cd ../demo && tns run ios --syncAllFiles", | ||
"demo.android": "cd ../demo && tns run android --syncAllFiles", | ||
"setup": "npm run build && cd ../demo && npm i", | ||
"setupandinstall": "npm i && cd ../demo && npm i && cd ../src && npm run build && cd ../demo && tns plugin add ../src && cd ../src", | ||
"tslint": "tslint --config '../tslint.json' '*.ts' --exclude '**/node_modules/**'", | ||
"tslint.demo": "tslint --config '../tslint.json' '../demo/app/*.ts' --exclude '**/node_modules/**'", | ||
"ci.tslint": "npm run tslint && npm run tslint.demo", | ||
"prepublishOnly": "npm run build", | ||
"development.setup": "npm run setup && npm link && cd ../demo && npm link nativescript-iqkeyboardmanager && cd ../src" | ||
}, | ||
"repository": { | ||
@@ -19,5 +34,3 @@ "type": "git", | ||
"author": "TJ VanToll <tj.vantoll@gmail.com> (http://tjvantoll.com/)", | ||
"license": { | ||
"type": "MIT" | ||
}, | ||
"license": "MIT", | ||
"contributors": [ | ||
@@ -32,3 +45,10 @@ { | ||
"url": "https://github.com/tjvantoll/nativescript-IQKeyboardManager/issues" | ||
}, | ||
"devDependencies": { | ||
"nativescript-dev-typescript": "^0.6.0", | ||
"tns-core-modules": "~3.4.0", | ||
"tns-platform-declarations": "~3.4.0", | ||
"typescript": "~2.6.0", | ||
"tslint": "^5.0.0" | ||
} | ||
} | ||
} |
@@ -19,4 +19,67 @@ # NativeScript IQKeyboardManager Plugin | ||
Want to tweak the appearance and/or behavior? | ||
### Grouping related textfields (previous / next buttons) | ||
If your UI layout has sibling text fields, then IQKeyboardManager is able to automatically | ||
add previous / next buttons to the accessory bar which the user can use to jump back and forth. | ||
See those < and > buttons in the video above. | ||
In case those fields were not direct siblings, until version 1.3.0 of this plugin, you had no way | ||
to force the previous / next buttons to appear. However, now you can: | ||
#### NativeScript /w XML usage | ||
Note in the example below that the two `<TextField>` controls are not siblings (both have parent `<StackLayout>` containers). Because of this, IQKeyboardManager will not automatically provide an optimized keyboard by default. | ||
However, if you surround the controls with this plugin's `<PreviousNextView>` control, as the example below shows, you will continue to get an optimized keyboard as expected. | ||
```xml | ||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:IQKeyboardManager="nativescript-iqkeyboardmanager"> | ||
<StackLayout> | ||
<IQKeyboardManager:PreviousNextView><!-- add this 'wrapper' to enable those previous / next buttons --> | ||
<StackLayout> | ||
<StackLayout> | ||
<TextField hint="Email"/> | ||
</StackLayout> | ||
<StackLayout> | ||
<TextField hint="Password"/> | ||
</StackLayout> | ||
</StackLayout> | ||
</IQKeyboardManager:PreviousNextView> | ||
</Stacklayout> | ||
</Page> | ||
``` | ||
#### NativeScript /w Angular usage | ||
In the `.modules.ts` file where you want to use this feature (or the `app.module.ts`), | ||
register the `PreviousNextView` element: | ||
```typescript | ||
import { registerElement } from "nativescript-angular"; | ||
registerElement("PreviousNextView", () => require("nativescript-iqkeyboardmanager").PreviousNextView); | ||
``` | ||
Then in the view, use that element like this (again, we went nuts with the `<StackLayout>`s: | ||
```html | ||
<StackLayout> | ||
<PreviousNextView><!-- add this 'wrapper' to enable those previous / next buttons --> | ||
<StackLayout> | ||
<StackLayout> | ||
<TextField hint="Email"></TextField> | ||
</StackLayout> | ||
<StackLayout> | ||
<TextField hint="Password"></TextField> | ||
</StackLayout> | ||
</StackLayout> | ||
</PreviousNextView> | ||
</Stacklayout> | ||
``` | ||
#### NativeScript /w Vue usage | ||
Vue usage is very similar to Angular usage, the only difference is in how the element is registered. Open your app's entry file, and add this: | ||
```javascript | ||
Vue.registerElement("PreviousNextView", () => require("nativescript-iqkeyboardmanager"). PreviousNextView) | ||
``` | ||
### Tweaking the appearance and behavior | ||
Start by adding the following two paths into your app’s `references.d.ts` file. (See this repo’s demo app for a specific example.) | ||
@@ -65,2 +128,2 @@ | ||
Next, locate IQKeyboardManager’s generated typings file in the `demo/typings` folder and override the `IQKeyboardManager.d.ts` file in this repo’s root. | ||
Next, locate IQKeyboardManager’s generated typings file in the `demo/typings` folder and override the `IQKeyboardManager.d.ts` file in this repo’s root. |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
19108
8
182
128
5
1