ios - 键盘与 IOS 中的 ListView 项内的文本字段重叠

标签 ios nativescript

在 NativeScript 应用程序中,我使用的是每行包含输入文本字段的 ListView 。

因为我正在使用 <activity android:windowSoftInputMode="adjustResize">在我的 android list 中,它在 android 中运行良好,但在 ios 中,对于较小的设备,键盘与文本字段重叠。

虽然我用的是nativescript-iqkeyboardmanager以及。

是因为 ListView 没有可用空间吗?我怀疑 IQKeyboardManager无法检测 ListView 中单个项目的高度并向上滚动整个 ListView 。 这是 screenshot .

最佳答案

const iqKeyboard = IQKeyboardManager.sharedManager();
iqKeyboard.overrideKeyboardAppearance = true;
iqKeyboard.keyboardAppearance = UIKeyboardAppearance.Dark;
iqKeyboard.keyboardDistanceFromTextField = 40.0

需要为 NativeScript/Typescript 添加引用作为 example

关于ios - 键盘与 IOS 中的 ListView 项内的文本字段重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52656874/

相关文章:

ios - 检测 UITextView 文本方向

ios - 单击注释上的右侧详细信息披露按钮时,MonoTouch 会抛出 SIGSEGV

ios - iOS 中使用 Xamarin 的 "Sign in with Twitter"按钮

android - 有没有办法将 onFocus 事件绑定(bind)到 NativeScript 中的 TextField?

'< Go Back' 按钮的 Nativescript 行为

angular - 如何在订阅中返回 Observable

android - TextField 模糊在 Nativescript vue 中不起作用

ios - 返回 Collection View 单元格时出错

ios - ObjectMapper 数组错误

javascript - 在 NativeScript 中访问元素高度