Projetos
Ver no GitHub
devxoul/UITextView-Placeholder
Sobre
Um placeholder que faltava para UITextView.
Desenvolvimento web e de aplicativosCrescimento medido de estrelas
- em 24 h
- +1
- em 7 dias
- +2
- em 15 dias
- +3
- em 1 mês
- +2
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalUITextView+Placeholder
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:
dependencies: [
.package(url: "https://github.com/devxoul/UITextView-Placeholder.git", from: "1.5.0")
]
Or add it through Xcode:
- File → Add Package Dependencies...
- Enter
https://github.com/devxoul/UITextView-Placeholder.git - Select the version and add to your target
Usage
Import 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. 🎉
Development
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
License
UITextView+Placeholder is under MIT license. See the LICENSE file for more information.
Explore projetos relacionados
Carregando…