Skip to main content

Overview

Version 6.0 brings refined API naming, new customization options, and improved view hierarchy handling. The changes are relatively minimal compared to later versions, making this one of the smoother migrations.
This migration primarily involves updating a few method names and optionally adopting new features.

Breaking Changes

IQKeyboardManager Shared Instance

The class method for accessing the shared instance has been simplified:
Both sharedManager() and shared may work in v6 due to backwards compatibility, but shared is the preferred API going forward.

UIView Extension Method Rename

The method to get a view’s containing view controller has been renamed for clarity:

New Features in v6

Version 6.0 introduces several new customization options:

Placeholder Color Customization

You can now customize the color of toolbar placeholders:

Additional Safe Area Insets

Experimental Feature: This feature was marked as experimental in v6 and was removed in v7.

UIView Customization Properties

Ignore Next/Previous Switching

Control whether specific text fields participate in the Previous/Next navigation:

Resign on Touch Outside Mode

Fine-grained control over dismiss-on-tap behavior per text field:

Parent Container View Controller

New helper method to get the parent container view controller:

Migration Steps

1

Update Dependency

Update your Podfile or Package.swift to version 6.0+
2

Install Dependencies

3

Update Shared Instance Access

Replace sharedManager() with shared:
Use find-and-replace to update all instances:
  • Find: IQKeyboardManager.sharedManager()
  • Replace: IQKeyboardManager.shared
4

Update View Controller Method

Replace viewController() with viewContainingController():
5

Build and Test

  • Build your project
  • Test keyboard behavior
  • Verify no deprecation warnings appear
6

Adopt New Features (Optional)

Consider using new v6 features:

Complete Migration Example

Per-Field Customization Example

One of the powerful new features in v6 is per-field customization:

Benefits of v6

Cleaner API

Simplified shared instance access with shared property

Better Naming

More descriptive method names like viewContainingController()

Enhanced Customization

New placeholder color options for better theming

Granular Control

Per-field customization options for complex forms

Troubleshooting

Solution: Replace with shared:
Solution: Use viewContainingController() instead:
Check: Ensure you have shouldShowToolbarPlaceholder enabled:

Deprecation Warnings

If you see deprecation warnings in v6, they’re likely for features that will be removed in v7:
Features marked as deprecated in v6:
  • canAdjustAdditionalSafeAreaInsets (removed in v7)
  • preventShowingBottomBlankSpace (removed in v7)
  • shouldFixInteractivePopGestureRecognizer (removed in v7)
If you’re using these features, consider alternatives before upgrading to v7.

Compatibility Notes

iOS Version Support

Version 6.0 dropped support for older iOS versions. Ensure your deployment target meets the minimum requirement:

Swift Version

Version 6.0 requires Swift 5.0 or later. Ensure your project uses a compatible Swift version.

Next Steps

After successfully migrating to v6:
1

Explore New Features

Try out the new customization options like placeholderColor and placeholderButtonColor
2

Refine Per-Field Behavior

Use ignoreSwitchingByNextPrevious and shouldResignOnTouchOutsideMode for better UX
3

Plan for v7

If you eventually plan to upgrade to v7, review the v6 to v7 migration guide to understand upcoming changes

Need Help?

If you encounter issues:
  1. Check GitHub Issues
  2. Review the v6 release notes
  3. Ask in Stack Overflow with the iqkeyboardmanager tag
Simple Migration: The v5 to v6 migration is one of the simplest in IQKeyboardManager’s history. Most apps can complete it in under 30 minutes.