A missing placeholder for UITextView.
Note: CocoaPods support has been removed. Please use Swift Package Manager for installation.
Add the following to your Package.swift file:
dependencies: [
.package(url: "https://github.com/devxoul/UITextView-Placeholder.git", from: "1.5.0")
]
Or add it through Xcode:
https://github.com/devxoul/UITextView-Placeholder.gitImport the module and set placeholder on your UITextView.
Objective-C:
@import UITextView_Placeholder;
UITextView *textView = [[UITextView alloc] init];
textView.placeholder = @"How are you?";
textView.placeholderColor = [UIColor lightGrayColor]; // optional
textView.attributedPlaceholder = ... // NSAttributedString (optional)
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. 🎉
This project uses Tuist for project generation.
# 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
UITextView+Placeholder is under MIT license. See the LICENSE file for more information.
130 followers · starred Jun 2025
12 followers · starred May 2018
A missing placeholder for UITextView.
Note: CocoaPods support has been removed. Please use Swift Package Manager for installation.
Add the following to your Package.swift file:
dependencies: [
.package(url: "https://github.com/devxoul/UITextView-Placeholder.git", from: "1.5.0")
]
Or add it through Xcode:
https://github.com/devxoul/UITextView-Placeholder.gitImport the module and set placeholder on your UITextView.
Objective-C:
@import UITextView_Placeholder;
UITextView *textView = [[UITextView alloc] init];
textView.placeholder = @"How are you?";
textView.placeholderColor = [UIColor lightGrayColor]; // optional
textView.attributedPlaceholder = ... // NSAttributedString (optional)
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. 🎉
This project uses Tuist for project generation.
# 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
UITextView+Placeholder is under MIT license. See the LICENSE file for more information.
130 followers · starred Jun 2025
12 followers · starred May 2018