1

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.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223

6 Answers6

5

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;
Community
  • 1
  • 1
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
1

shouldHidePreviousNext is deprecated, Use the below

Try this:

Objective-C

[IQKeyboardManager sharedManager].previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysHide;
Imad Ali
  • 3,261
  • 1
  • 25
  • 33
1

Swift 4 solution for the above answers:

 IQKeyboardManager.shared.previousNextDisplayMode = .alwaysHide
Umair Afzal
  • 4,947
  • 5
  • 25
  • 50
0

This property is deprecated and modifies with the new one.IQKeyboardManager.sharedManager().previousNextDisplayMode = .alwaysHide Hope you find the solution.

Kushal Maniyar
  • 846
  • 1
  • 8
  • 26
0

shouldHidePreviousNext deprecated, use previousNextDisplayMode

Objective-C

[IQKeyboardManager sharedManager].previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysHide;
Muhammad Raza
  • 952
  • 7
  • 24
0

If you working on a swift project just write this in your code.

IQKeyboardManager.shared.previousNextDisplayMode = .alwaysHide
Avijit Mondal
  • 59
  • 1
  • 9