iosobjective-ciqkeyboardmanager

Hide next previous button in IQKeyboardManager in Objective C


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.


Solution

  • 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;