forked from soffes/SAMTextView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSAMTextView.h
More file actions
39 lines (30 loc) · 964 Bytes
/
SAMTextView.h
File metadata and controls
39 lines (30 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// SAMTextView.h
// SAMTextView
//
// Created by Sam Soffes on 8/18/10.
// Copyright 2010-2014 Sam Soffes. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
UITextView subclass that adds placeholder support like UITextField has.
*/
@interface SAMTextView : UITextView
/**
The string that is displayed when there is no other text in the text view. This property reads and writes the
attributed variant.
The default value is `nil`.
*/
@property (nonatomic, strong) NSString *placeholder;
/**
The attributed string that is displayed when there is no other text in the text view.
The default value is `nil`.
*/
@property (nonatomic, strong) NSAttributedString *attributedPlaceholder;
/**
Returns the drawing rectangle for the text views’s placeholder text.
@param bounds The bounding rectangle of the receiver.
@return The computed drawing rectangle for the placeholder text.
*/
- (CGRect)placeholderRectForBounds:(CGRect)bounds;
@end