Skip to main content

Overview

The UIView extensions provide per-view customization of keyboard management behavior through the .iq wrapper pattern. These extensions allow you to override global settings for specific text input views.

The .iq Wrapper Pattern

All extension properties are accessed through the .iq namespace on UIView instances:
This pattern keeps IQKeyboardManager extensions cleanly separated from native UIKit APIs.

Properties

CGFloat
default:"UIView.defaultKeyboardDistance"
Custom distance from keyboard for this specific text input view.If set to UIView.defaultKeyboardDistance, the global keyboardDistance value from IQKeyboardManager.shared.keyboardDistance will be used. Otherwise, this value takes precedence.Note: Value cannot be negative. Negative values may cause unexpected behavior.
IQEnableMode
default:".default"
Enable mode for this specific text input view.Controls whether keyboard management is enabled, disabled, or uses the default global setting for this view.Values:
  • .default - Use global IQKeyboardManager.shared.isEnabled setting
  • .enabled - Force enable keyboard management for this view
  • .disabled - Force disable keyboard management for this view

Available Properties Summary

Usage Examples

Custom Distance for Specific Fields

Disabling Keyboard Management for Custom Keyboards

Force Enable for Specific Fields

See Also