Giter Site home page Giter Site logo

ganiza / kmplaceholdertextview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozhouqi/kmplaceholdertextview

0.0 2.0 0.0 251 KB

A UITextView subclass that adds support for multiline placeholder written in Swift.

License: MIT License

Swift 90.50% Ruby 9.50%

kmplaceholdertextview's Introduction

KMPlaceholderTextView

A UITextView subclass that adds support for multiline placeholder written in Swift.

PlaceholderTextView

Usage

You can set the value of the placeholder property just like using UITextField.

Interface Builder

Storyboard

  1. Drag a UITextView object onto the canvas.
  2. In the Identity inspector, set the Custom Class name to KMPlaceholderTextView.
  3. In the Attributes inspector, you can change the value of the placeholder property directly.

Code

let placeholderTextView = KMPlaceholderTextView(frame: view.bounds)
placeholderTextView.placeholder = "What's on your mind?"
view.addSubview(placeholderTextView)

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 'KMPlaceholderTextView', '~> 0.1.2' 

Then, run the following command:

$ pod install

Requirements

  • iOS 7.0+
  • Xcode 6.3

License

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

kmplaceholdertextview's People

Contributors

mozhouqi avatar

Watchers

James Cloos avatar Ganiza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.