I am using nativescript-IQKeyboardManager plugin in my NativeScript Angular app. I want to access the IQKeyboardManger object so that I can acess full IQKeyboardManager APIs to tweak appearance and behavior.
Bu the issue is, I am not able to import or use the IQKeyboardManager object in my project.
I have followed their documentation by adding a references.d.ts file. And also installing npm install --save-dev tns-platform-declarations
Next, when I try to initialize an instance of IQKeybardManger with the following code. It does not let me initialize.
const iqKeyboard = IQKeyboardManager.sharedManager();
I have also tried importing IQKeyboardManger by directly importing in my module file using following line of code.
import {IQKeyboardManager} from "nativescript-iqkeyboardmanager";
This import gives the following error.
nativescript-iqkeyboardmanager/index.d.ts' is not a module.
Next, I have also tried by registering the element mentioned in their documentation. Which does not work as well. documentation
import { registerElement } from "nativescript-angular";
registerElement("TextViewWithHint", () => require("nativescript-iqkeyboardmanager").TextViewWithHint);
Any kind help would be appreciated. Please let me know how to get this to work and what I am doing wrong.
Thanks in advance!