Skip to main content

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/IQTextView

Key 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

  1. Add a UITextView to your storyboard or XIB
  2. Set the class to IQTextView in Identity Inspector
  3. 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

  1. Separate Package - IQTextView is now an independent library
  2. Import Statement - Import IQTextView instead of IQKeyboardManagerSwift
  3. No API Changes - The IQTextView API remains the same

Before (v7)

After (v8)

Best Practices

Keep placeholders concise and descriptive:
Ensure placeholder styling matches your text styling:
Placeholders alone may not be sufficient for accessibility:

Troubleshooting

Placeholder Not Showing

If the placeholder isn’t visible:

Placeholder Color Too Light

IQKeyboardToolbarManager

Add toolbar with Previous/Next/Done buttons

IQKeyboardReturnManager

Handle return key navigation

See Also