gpt4 book ai didi

ios - 防止 IQKeyboardManager 删除我的导航栏

转载 作者:行者123 更新时间:2023-11-28 22:01:03 28 4
gpt4 key购买 nike

这是对 iPhone Keyboard Covers UITextField 的跟进,其中谈到防止键盘覆盖文本字段。对我有用的答案是关于使用 IQKeyboardManager 的答案。 .我的问题是它取消了我的导航栏。文件说

If you don't want to hide the default UINavigationBar of UINavigationController when keyboardManager slides up the view, then just change the UIView class to UIScrollView from the storyboard or xib.

但我不确定它说的是哪个 UIView。由于提到这个的 SO 线程有数百个赞成票,我想象有人不得不处理这个问题。有人可以分享他们是如何做到这一点的吗? (我也是 iOS 新手,所以请不要深奥的谈话)。

最佳答案

为了不隐藏 UINavigationControllerUINavigationBar,您需要从 UIView 设置 self.view 类> 到 UIScrollView。文档就是这么说的。

我已经更新了文档 here带有屏幕截图,这对按照步骤操作非常有帮助。

关于ios - 防止 IQKeyboardManager 删除我的导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25090435/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com