Skip to main content

Overview

Version 8.0 represents a major architectural shift where IQKeyboardManager has been split into smaller, focused libraries. This modular approach gives you more control over which features you include in your app.
Breaking Change: The toolbar feature (enableAutoToolbar) is now disabled by default and moved to a separate library.

Keyboard Toolbar Changes

The most significant change in v8 is that IQKeyboardManager.shared.enableAutoToolbar now defaults to false. The toolbar functionality has been moved to the IQKeyboardToolbarManager library.

Solution 1: Re-enable in IQKeyboardManager

If you want to keep using the toolbar with minimal changes:
// AppDelegate.swift
import IQKeyboardManagerSwift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    IQKeyboardManager.shared.enable = true
    IQKeyboardManager.shared.enableAutoToolbar = true
    return true
}

Solution 2: Use IQKeyboardToolbarManager Directly

For better modularity and control, use the new dedicated library:
// AppDelegate.swift
import IQKeyboardManagerSwift
import IQKeyboardToolbarManager

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    IQKeyboardManager.shared.enable = true
    IQKeyboardToolbarManager.shared.isEnabled = true
    return true
}

Features Moved to Independent Libraries

Many features have been extracted into their own libraries for better modularity:
Repository: IQKeyboardToolbarManagerHandles all toolbar-related functionality including Previous/Next/Done buttons.Installation:
# CocoaPods
pod 'IQKeyboardToolbarManager'
// Swift Package Manager
.package(url: "https://github.com/hackiftekhar/IQKeyboardToolbarManager.git", from: "1.0.0")
Repository: IQKeyboardNotificationProvides keyboard notification handling and state tracking.Migration:
// Old (v7)
let listener = IQKeyboardListener()

// New (v8)
import IQKeyboardNotification
let listener = IQKeyboardNotification() 
Repository: IQTextInputViewNotificationHandles text field and text view editing notifications.Migration:
// Old (v7)
let listener = IQTextFieldViewListener()

// New (v8)
import IQTextInputViewNotification
let listener = IQTextInputViewNotification() 
Repository: IQKeyboardReturnManagerManages return key behavior for chaining text fields.Migration:
// Old (v7)
let handler = IQReturnKeyHandler(controller: self)

// New (v8)
import IQKeyboardReturnManager
let manager = IQKeyboardReturnManager(controller: self) 
Repository: IQKeyboardToolbarProvides the toolbar UI component.Migration:
// Old (v7)
let toolbar = IQToolbar()

// New (v8)
import IQKeyboardToolbar
let toolbar = IQKeyboardToolbar() 
Repository: IQTextViewEnhanced UITextView with placeholder support.Migration: No code changes required, just add the separate library.

API Changes: IQKeyboardToolbarManager

If you’re using toolbar features, here are the key API migrations:

Properties Moved

// These properties were in IQKeyboardManager.shared
var enableAutoToolbar: Bool
var toolbarConfiguration: IQToolbarConfiguration
var playInputClicks: Bool
var disabledToolbarClasses: [UIViewController.Type]
var enabledToolbarClasses: [UIViewController.Type]
var deepResponderAllowedContainerClasses: [UIView.Type]
var canGoPrevious: Bool
var canGoNext: Bool
func goPrevious() -> Bool
func goNext() -> Bool
func reloadInputViews()

UITextField/UITextView Extensions

// Old (v7) - Direct property
textField.ignoreSwitchingByNextPrevious = true

// New (v8) - Via iq wrapper
import IQKeyboardToolbarManager
textField.iq.ignoreSwitchingByNextPrevious = true

API Changes: IQKeyboardToolbar

Classes and configuration types have been renamed:
IQToolbar
IQToolbarConfiguration
IQToolbarPlaceholderConfiguration
IQBarButtonItemConfiguration
IQTitleBarButtonItem
IQBarButtonItem
IQInvocation

Toolbar Extension Methods

// Old (v7)
textField.toolbar
textField.hidePlaceholder = true
textField.placeholder = "Enter text"
textField.drawingPlaceholder
textField.addToolbar(target: self, ...)
textField.addDone(...)
textField.addRightButton(...)

// New (v8) - Via iq wrapper
import IQKeyboardToolbar
textField.iq.toolbar
textField.iq.hidePlaceholder = true
textField.iq.placeholder = "Enter text"
textField.iq.drawingPlaceholder
textField.iq.addToolbar(target: self, ...) 
textField.iq.addDone(...) 
textField.iq.addRightButton(...) 

Class Name Changes

IQPreviousNextView → IQDeepResponderContainerView

If you’re using IQPreviousNextView in Interface Builder, you must update both the class name and module.
1

Open Storyboard/XIB

Open your Interface Builder file
2

Select the View

Select the view that’s currently IQPreviousNextView
3

Update Class Name

In Identity Inspector, change class to IQDeepResponderContainerView
4

Update Module

Change module to IQKeyboardToolbarManager

CocoaPods Subspecs

For easier migration, IQKeyboardManager v8 provides subspecs that automatically include the extracted libraries:
# Podfile

# Option 1: Include toolbar manager automatically
pod 'IQKeyboardManagerSwift/IQKeyboardToolbarManager'

# Option 2: Include return manager automatically
pod 'IQKeyboardManagerSwift/IQKeyboardReturnManager'

# Option 3: Include IQTextView automatically
pod 'IQKeyboardManagerSwift/IQTextView'

# Option 4: Include appearance features
pod 'IQKeyboardManagerSwift/Appearance'

# Option 5: Include resign on touch outside features
pod 'IQKeyboardManagerSwift/Resign'

# Or combine multiple subspecs
pod 'IQKeyboardManagerSwift/IQKeyboardToolbarManager'
pod 'IQKeyboardManagerSwift/Resign'

Appearance Subspec

Keyboard appearance overriding has been moved to a subspec:
// Only available with Appearance subspec
IQKeyboardManager.shared.overrideAppearance = true
IQKeyboardManager.shared.appearance = .dark

Resign Subspec

Resign on touch outside functionality moved to a subspec:
// Only available with Resign subspec
IQKeyboardManager.shared.resignOnTouchOutside = true
IQKeyboardManager.shared.disabledTouchResignedClasses = [CustomViewController.self]
IQKeyboardManager.shared.enabledTouchResignedClasses = [AnotherViewController.self]
IQKeyboardManager.shared.touchResignedGestureIgnoreClasses = [CustomView.self]

// UITextField/UITextView extension
textField.iq.resignOnTouchOutsideMode = .enabled

Migration Steps

1

Update Dependencies

Update your Podfile or Package.swift to version 8.0+
# CocoaPods - use subspecs for easier migration
pod 'IQKeyboardManagerSwift/IQKeyboardToolbarManager'
pod 'IQKeyboardManagerSwift/Resign'
// Swift Package Manager
.package(url: "https://github.com/hackiftekhar/IQKeyboardManager.git", from: "8.0.0"),
.package(url: "https://github.com/hackiftekhar/IQKeyboardToolbarManager.git", from: "1.0.0")
2

Install Dependencies

# CocoaPods
pod install

# Swift Package Manager
# File > Packages > Update to Latest Package Versions
3

Enable Toolbar (if needed)

Add to your AppDelegate:
import IQKeyboardToolbarManager

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    IQKeyboardManager.shared.enable = true
    IQKeyboardToolbarManager.shared.isEnabled = true
    return true
}
4

Update Interface Builder Files

Search for IQPreviousNextView in your storyboards/XIBs and update to:
  • Class: IQDeepResponderContainerView
  • Module: IQKeyboardToolbarManager
5

Update Toolbar API Usage

If using toolbar extensions, add .iq wrapper:
// Before
textField.toolbar
textField.placeholder = "Name"

// After
import IQKeyboardToolbar
textField.iq.toolbar
textField.iq.placeholder = "Name"
6

Update Class References

Replace renamed classes:
  • IQKeyboardListenerIQKeyboardNotification (different library)
  • IQTextFieldViewListenerIQTextInputViewNotification (different library)
  • IQReturnKeyHandlerIQKeyboardReturnManager (different library)
  • IQToolbarIQKeyboardToolbar (different library)
  • IQToolbarConfigurationIQKeyboardToolbarConfiguration
7

Build and Test

  • Build your project and fix any compilation errors
  • Test keyboard behavior thoroughly
  • Verify toolbar Previous/Next/Done buttons work
  • Test resign on touch outside if you use it

Benefits of v8 Architecture

Smaller Binary Size

Only include features you actually use, reducing app size

Better Modularity

Each feature is independently maintained and versioned

Faster Compilation

Smaller modules compile faster during development

Clearer Dependencies

Explicit dependencies make code more maintainable

Troubleshooting

Solution: Enable toolbar in AppDelegate:
IQKeyboardManager.shared.enableAutoToolbar = true
// OR
import IQKeyboardToolbarManager
IQKeyboardToolbarManager.shared.isEnabled = true
Solution: Add the dependency to your package manager:
# CocoaPods
pod 'IQKeyboardManagerSwift/IQKeyboardToolbarManager'
// Swift Package Manager
.package(url: "https://github.com/hackiftekhar/IQKeyboardToolbarManager.git", from: "1.0.0")
Solution: Change to IQDeepResponderContainerView with module IQKeyboardToolbarManager
Solution: Import the toolbar library and use .iq wrapper:
import IQKeyboardToolbar
textField.iq.toolbar

Need Help?

If you encounter issues during migration:
  1. Check the GitHub Issues
  2. Review the individual library documentation
  3. Create a new issue with your specific problem
Incremental Migration: If the migration seems overwhelming, consider using the CocoaPods subspecs which automatically include the extracted libraries as dependencies.

Build docs developers (and LLMs) love