Latest 0.0.6
Homepage https://github.com/quangtqag/UIPlaceholderTextView
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Adding placeholder property for UITextView without subclass, written in Swift

Note: this libray is inspired from original source of devxoul that written in Obj-C

QQPlaceholderTextView

Usage

  • You can set the value of the placeholder property just like using UITextField.
  • Because it does not subclass from UITextView so you don’t need to edit anything.
  • Additionally, you can also apply style of UITextField into it as figure above

Code

You need to import QQPlaceholderTextView into place that you want to use

import QQPlaceholderTextView

And set properties for it

textView.placeholder = "I'am a placeholder"
textView.isApplyTextFieldStyle = true

Installation

CocoaPods

You can install the latest release version of CocoaPods with the following command:

$ gem install cocoapods

CocoaPods v0.36 or later required

Simply add the following line to your Podfile:

platform :ios, '8.0' 
use_frameworks!

pod 'QQPlaceholderTextView', '~> 0.0.2' 

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate QQPlaceholderTextView into your Xcode project using Carthage, specify it in your Cartfile:

github "quangtqag/QQPlaceholderTextView" ~> 0.0.6

Run carthage update to build the framework and drag the built QQPlaceholderTextView.framework into your Xcode project.

Requirements

  • iOS 8.0+
  • Xcode 7+

License

QQPlaceholderTextView is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "QQPlaceholderTextView",
    "version": "0.0.6",
    "summary": "Adding placeholder property for UITextView without subclass, written in Swift",
    "description": "Adding placeholder property for UITextView without subclass, written in SwiftnIt is convenient to set the value of the placeholder property just like using UITextField.nApplying styles of UITextField, make it more look like UITextField",
    "homepage": "https://github.com/quangtqag/UIPlaceholderTextView",
    "screenshots": "https://raw.githubusercontent.com/quangtqag/QQPlaceholderTextView/master/Screenshots/preview.png",
    "license": "MIT",
    "authors": {
        "Quang Quoc Tran": "[email protected]"
    },
    "social_media_url": "https://twitter.com/QuangQuocTran",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/quangtqag/QQPlaceholderTextView.git",
        "tag": "0.0.6"
    },
    "source_files": "Source/*.swift",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This