forked from daltoniam/DCCommentView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDCCommentView.h
59 lines (47 loc) · 1.55 KB
/
DCCommentView.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// DCCommentView.h
//
// Created by Dalton Cherry on 3/10/14.
//
////////////////////////////////////////////////////////////////////////////////////////////////////
#import <UIKit/UIKit.h>
@protocol DCCommentViewDelegate <NSObject>
/**
the send button was tapped.
@param the text that was entered in the comment view.
*/
-(void)didSendComment:(NSString*)text;
@optional
/**
the comment view presented.
*/
-(void)didShowCommentView;
/**
the comment view was dismissed/pulled down
*/
-(void)didDismissCommentView;
@end
@interface DCCommentView : UIView
/**
the comment view delegate.
*/
@property(nonatomic,weak)id<DCCommentViewDelegate>delegate;
/**
limit the amount of characters that can be sent. Default is 0, which is unlimited.
*/
@property(nonatomic,assign)int charLimit;
/**
add an image for your accessory button (e.g. the camera icon in the messages app).
default is nil and no image will be displayed.
*/
@property(nonatomic,strong)UIImage *accessoryImage;
/**
binds the comment view to the scrollView (this is with the comment view at the bottom of the view
and selectable to bring up the keyboard). The scrollView must have a superview for this work properly.
@param scrollView is the a scrollView or scrollView subclass (like a UITableView).
@param the view to add the commentview as a subview too.
@return returns a newly initialized comment view.
*/
-(void)bindToScrollView:(UIScrollView*)scrollView superview:(UIView*)superview;
@end