隐藏Objective C中IQKeyboardManager中的下一个上一个按钮(Hide next previous button in IQKeyboardManager in Objectiv

编程入门 行业动态 更新时间:2024-10-27 01:20:56
隐藏Objective C中IQKeyboardManager中的下一个上一个按钮(Hide next previous button in IQKeyboardManager in Objective C)

我正在使用IQKeyboardManager ,我想隐藏键盘上的下一个/上一个按钮...

我提到了这个问题 。

我尝试使用此代码:

[[IQKeyboardManager sharedManager] shouldHidePreviousNext] = YES;

但是库中没有shouldHidePreviousNext属性......我们怎样才能做到这一点? 任何帮助都可以得到赞赏。

I'm using IQKeyboardManager and I want to hide the next/previous button from the keyboard...

I referred to this question.

I tried with this code:

[[IQKeyboardManager sharedManager] shouldHidePreviousNext] = YES;

but the shouldHidePreviousNext property is not available in the library... How can we achieve this? Any help could be appreciated.

最满意答案

shouldHidePreviousNext已弃用,在这个地方使用previousNextDisplayMode

IQPreviousNextDisplayModeDefault :当有多个textField否则隐藏时显示NextPrevious。

IQPreviousNextDisplayModeAlwaysHide :在任何情况下都不要显示NextPrevious按钮。

IQPreviousNextDisplayModeAlwaysShow :始终显示nextPrevious按钮,如果有超过1个textField,则两个按钮都将可见,但将显示为已禁用。

你可以使用的属性访问

@propertynonatomic ,assign) IQPreviousNextDisplayMode previousNextDisplayMode ;

使用

[[IQKeyboardManager sharedManager] previousNextDisplayMode] = IQPreviousNextDisplayModeAlwaysHide;

shouldHidePreviousNext has deprecated, in this place use previousNextDisplayMode

IQPreviousNextDisplayModeDefault: Show NextPrevious when there are more than 1 textField otherwise hide.

IQPreviousNextDisplayModeAlwaysHide: Do not show NextPrevious buttons in any case.

IQPreviousNextDisplayModeAlwaysShow: Always show nextPrevious buttons, if there are more than 1 textField then both buttons will be visible but will be shown as disabled.

you can access with the property of

@property(nonatomic, assign) IQPreviousNextDisplayMode previousNextDisplayMode;

use

[[IQKeyboardManager sharedManager] previousNextDisplayMode] = IQPreviousNextDisplayModeAlwaysHide;

更多推荐

本文发布于:2023-07-20 12:36:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1199625.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   IQKeyboardManager   Objective   button   previous

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!