Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Add a placeholder to UITextView.

SAMTextView is tested on iOS 6 and requires ARC. Released under the [MIT license](LICENSE).
SAMTextView is tested on iOS 7-9 and requires ARC. Released under the [MIT license](LICENSE).

## Usage

#### Objective-C
``` objc
// Initialize a text view
SAMTextView *textView = [[SAMTextView alloc] initWithFrame:CGRectMake(20.0f, 20.0f, 280.0f, 280.0f)];
Expand All @@ -14,8 +15,17 @@ SAMTextView *textView = [[SAMTextView alloc] initWithFrame:CGRectMake(20.0f, 20.
textView.placeholder = @"Type something…";
```

For more advanced control of the placeholder, you can set the `attributedPlaceholder` property instead. See the [header](SAMTextView/SAMTextView.h) for full documentation.
#### Swift
``` swift
// Initialize a text view
let textView = SAMTextView(frame:CGRectMake(20.0, 20.0, 280.0, 280.0))

// Add a placeholder
textView.placeholder = "Type something…"
```

For more advanced control of the placeholder, you can set the `attributedPlaceholder` property instead. See the [header](SAMTextView/SAMTextView.swift) for full documentation.

## Installation

Simply add the files in the `SAMTextView.h` and `SAMTextView.m` to your project or add `SAMTextView` to your Podfile if you're using CocoaPods.
Simply add the file `SAMTextView.swift` to your project or add `SAMTextView` to your Podfile if you're using CocoaPods.
39 changes: 0 additions & 39 deletions SAMTextView/SAMTextView.h

This file was deleted.

170 changes: 0 additions & 170 deletions SAMTextView/SAMTextView.m

This file was deleted.

Loading