Skip to content
프로젝트

devxoul/UITextView-Placeholder

GitHub에서 보기

소개

UITextView에 빠져 있는 플레이스홀더 기능

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+1
in 7 days
+2
in 15 days
+3
in 1 month
+2

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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:

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:

    @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.

관련 프로젝트 살펴보기

불러오는 중…