Overview
As of version 8.0, IQTextView is now an independent package, separated from the main IQKeyboardManager library. It provides a drop-in replacement for UITextView with built-in placeholder support, similar to UITextField.IQTextView was previously part of IQKeyboardManager but has been extracted into its own package for better modularity.
GitHub Repository
hackiftekhar/IQTextViewKey Features
- Placeholder Support - Native placeholder text like UITextField
- Customizable Appearance - Control placeholder color, font, and alignment
- Drop-in Replacement - Use exactly like UITextView
- Auto-resizing - Works with Auto Layout and manual frames
- UITextViewDelegate Compatible - Fully compatible with standard delegates
- IBDesignable - Configure placeholder in Interface Builder
Installation
CocoaPods
Swift Package Manager
Carthage
Basic Usage
Programmatic Setup
Interface Builder
- Add a
UITextViewto your storyboard or XIB - Set the class to
IQTextViewin Identity Inspector - Configure the placeholder in Attributes Inspector
Customization
Placeholder Appearance
Placeholder Label Access
For advanced customization, access the internal placeholder label:Integration with IQKeyboardManager
IQTextView works seamlessly with IQKeyboardManager:Properties
Core Properties
Inherited from UITextView
All standard UITextView properties are available:Examples
Multi-line Form Field
Comment Section
Dynamic Height Text View
Attributed Placeholder
Migration from v7
See the Migration Guide for detailed migration instructions from IQKeyboardManager v7 to v8.
Key Changes
- Separate Package - IQTextView is now an independent library
- Import Statement - Import
IQTextViewinstead ofIQKeyboardManagerSwift - No API Changes - The IQTextView API remains the same
Before (v7)
After (v8)
Best Practices
Use Appropriate Placeholder Length
Use Appropriate Placeholder Length
Keep placeholders concise and descriptive:
Match Placeholder Style to Content
Match Placeholder Style to Content
Ensure placeholder styling matches your text styling:
Accessibility Considerations
Accessibility Considerations
Placeholders alone may not be sufficient for accessibility:
Troubleshooting
Placeholder Not Showing
If the placeholder isn’t visible:Placeholder Color Too Light
Related Resources
IQKeyboardToolbarManager
Add toolbar with Previous/Next/Done buttons
IQKeyboardReturnManager
Handle return key navigation