Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hackiftekhar/IQKeyboardManager/llms.txt
Use this file to discover all available pages before exploring further.
Overview
IQKeyboardManager includes built-in debug logging to help you understand what’s happening behind the scenes and troubleshoot issues. This guide covers enabling debug logs, common issues, and how to resolve them.Enable Debug Logging
Enable debug logging in your AppDelegate to see detailed information about keyboard events:AppDelegate.swift
Debug Log Output
When enabled, you’ll see detailed logs in the Xcode console:Console Output
Log Structure
Logs use indentation to show nested operations:Enable Toolbar Debugging
Enable separate debugging for toolbar operations:AppDelegate.swift
Console Output
Conditional Debugging
Enable debugging only in debug builds:AppDelegate.swift
Common Issues and Solutions
Keyboard Not Adjusting
IQKeyboardManager not enabled
IQKeyboardManager not enabled
Symptom: Keyboard covers text fieldsSolution:Debug Check:
Enable logging and look for “Enabled” message at app launch.
View controller is disabled
View controller is disabled
Symptom: Works in some view controllers but not othersSolution:
Check if the view controller is in the disabled list:Debug Check:
Look for logs showing the view controller being skipped.
Text field has enableMode = .disabled
Text field has enableMode = .disabled
Symptom: Specific text field not adjustingSolution:Debug Check:
Add a breakpoint and check the field’s
enableMode property.Custom container view
Custom container view
Symptom: Text fields in custom containers not detectedSolution:
Toolbar Not Appearing
Auto toolbar not enabled
Auto toolbar not enabled
Solution:
View controller in disabled list
View controller in disabled list
Solution:
Custom inputAccessoryView
Custom inputAccessoryView
Symptom: You’ve set a custom
inputAccessoryViewExplanation:
Custom input accessory views override the automatic toolbar.Solution:
Remove custom inputAccessoryView or integrate it with IQKeyboardToolbarManager.Tap-to-Dismiss Not Working
Feature not enabled
Feature not enabled
Solution:
View controller disabled
View controller disabled
Solution:
Gesture conflict
Gesture conflict
Solution:
Performance Issues
Slow keyboard animation
Slow keyboard animation
Cause: Complex view hierarchy or Auto Layout constraintsSolution:
Debug logging in production
Debug logging in production
Cause: Debug logging enabled in release buildsSolution:
Manual Management Tweaks
For cases where automatic behavior doesn’t work, you can manually control IQKeyboardManager:Temporarily Disable
ViewController.swift
Manual Position Adjustment
ViewController.swift
Custom Distance Calculation
ViewController.swift
Known Issues
For a comprehensive list of known issues and workarounds, see:The library documentation includes detailed information about edge cases and platform-specific issues.
Common Warnings
You may see these warnings in the console:Negative Distance Warning
keyboardDistance is >= 0
Refuses to Resign Warning
false from textFieldShouldEndEditing(_:)
Solution: Check your delegate implementation:
Debugging Checklist
When troubleshooting, go through this checklist:Getting Help
If you’re still experiencing issues:- Check the GitHub Issues: IQKeyboardManager Issues
- Review the Wiki: IQKeyboardManager Wiki
- Create a minimal reproducible example
- Include debug logs when reporting issues
- Specify your environment:
- iOS version
- Xcode version
- IQKeyboardManager version
- Swift version
Debug Configuration Example
Here’s a complete debug configuration:AppDelegate.swift
Best Practices
Enable logging early in development
Enable logging early in development
Turn on debug logging when you first integrate IQKeyboardManager to understand its behavior.
Disable in production
Disable in production
Always disable debug logging in production builds using
#if DEBUG conditionals.Keep configuration simple
Keep configuration simple
Start with minimal configuration and only add customization as needed.
Document custom behavior
Document custom behavior
Add comments explaining why you’ve disabled or configured specific settings.
Test thoroughly
Test thoroughly
Test your forms on different devices, orientations, and iOS versions.
Next Steps
Basic Setup
Get started with IQKeyboardManager
Advanced Configuration
Fine-tune keyboard behavior
API Reference
Complete API documentation
GitHub Issues
Report issues or search for solutions