Skip to main content
IQKeyboardManager

Zero-Code Keyboard Management for iOS

IQKeyboardManager is a drop-in universal library that automatically prevents the iOS keyboard from covering UITextField and UITextView. No code required, no manual setup needed—just enable it and it works.

Quickstart

Get up and running with one line of code

Installation

Install via CocoaPods, SPM, or Carthage

Configuration

Customize keyboard distance and behavior

API Reference

Explore the complete API documentation

Key Features

Automatic Keyboard Avoidance

Automatically adjusts view position when keyboard appears, preventing text fields from being covered

One Line Setup

Just enable IQKeyboardManager.shared.isEnabled = true and you’re done

Modular Architecture

Optional subspecs for toolbar, appearance, return key handling, and more

Universal Compatibility

Works with UIScrollView, UITableView, UICollectionView, and all orientations

Installation

pod 'IQKeyboardManagerSwift'

Quick Example

AppDelegate.swift
import IQKeyboardManagerSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        // Enable keyboard management
        IQKeyboardManager.shared.isEnabled = true
        
        return true
    }
}
That’s it! The keyboard will now automatically adjust to avoid covering your text fields.

Why IQKeyboardManager?

Automatically handles scroll views without any manual content inset adjustments or offset calculations.
Works with standard UIKit components—no need to subclass UITextField or UITextView.
Used by thousands of iOS apps with over 16,000 GitHub stars and active maintenance since 2013.
Configure keyboard distance, enable/disable per view controller, customize toolbar appearance, and more.

Optional Features

Enable additional functionality through modular subspecs:
  • Toolbar Manager: Add Previous/Next/Done buttons above the keyboard
  • Appearance: Customize keyboard appearance (light/dark)
  • Return Key Handling: Automatically move between text fields
  • Resign on Touch: Dismiss keyboard when tapping outside
  • IQTextView: UITextView with placeholder support

Get Started

Introduction

Learn about core concepts

Guides

Step-by-step tutorials

Migration

Upgrade from older versions

Build docs developers (and LLMs) love