GitPedia

UITextView Placeholder

A missing placeholder for UITextView

From devxoul·Updated June 21, 2026·View on GitHub·

> **Note**: CocoaPods support has been removed. Please use Swift Package Manager for installation. The project is written primarily in Objective-C, distributed under the MIT License license, first published in 2014. It has gained significant community traction with 1,544 stars and 273 forks on GitHub. Key topics include: objective-c, placeholder, uitextview.

Latest release: 1.5.0
January 19, 2026View Changelog →

UITextView+Placeholder

CI
Swift Package Manager

A missing placeholder for UITextView.

Note: CocoaPods support has been removed. Please use Swift Package Manager for installation.

Installation

Swift Package Manager

Add the following to your Package.swift file:

swift
dependencies: [ .package(url: "https://github.com/devxoul/UITextView-Placeholder.git", from: "1.5.0") ]

Or add it through Xcode:

  1. File → Add Package Dependencies...
  2. Enter https://github.com/devxoul/UITextView-Placeholder.git
  3. Select the version and add to your target

Usage

Import the module and set placeholder on your UITextView.

  • Objective-C:

    objc
    @import UITextView_Placeholder; UITextView *textView = [[UITextView alloc] init]; textView.placeholder = @"How are you?"; textView.placeholderColor = [UIColor lightGrayColor]; // optional textView.attributedPlaceholder = ... // NSAttributedString (optional)
  • Swift:

    swift
    import UITextView_Placeholder let textView = UITextView() textView.placeholder = "How are you?" textView.placeholderColor = UIColor.lightGray // optional textView.attributedPlaceholder = ... // NSAttributedString (optional)

Congratulations! You're done. 🎉

Development

This project uses Tuist for project generation.

bash
# Install Tuist (if not already installed) curl -Ls https://install.tuist.io | bash # Generate Xcode project tuist generate # Build tuist build Demo # Run tests tuist test # Run the demo app tuist run Demo

License

UITextView+Placeholder is under MIT license. See the LICENSE file for more information.

Contributors

Showing top 10 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from devxoul/UITextView-Placeholder via the GitHub API.Last fetched: 6/22/2026