YH_BarrageViewController.h
1.16 KB
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
//
// YH_Barrage.h
// YHBarrage
//
// Created by Arthur on 16/6/6.
// Copyright © 2016年 YOHO!. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HPGrowingTextView.h"
typedef NS_ENUM(NSUInteger, YHBarrageType) {
YHBarrageTypeSend, // 可发送评论
YHBarrageTypeReadonly, // 只读
};
@class YH_BarrageViewController;
@protocol YH_BarrageViewControllerDelegate <NSObject>
@optional
- (void)yhBarrageViewController:(YH_BarrageViewController *)barrageVC didInsertItem:(NSDictionary *)itemDic;
@end
@interface YH_BarrageViewController : UIViewController
@property (weak, nonatomic) id<YH_BarrageViewControllerDelegate>delegate;
@property (strong, nonatomic) HPGrowingTextView *inputTextField;
@property (copy, nonatomic) void (^sendMsgBlock) (NSString *msg);
@property (copy, nonatomic) void (^loginToTCPServerBlock) (void);
@property (copy, nonatomic) void (^keyBoardShowBlock) (BOOL isShow, NSInteger height);
/**
* 初始化弹幕
*
* @param barrageType 弹幕类型
*
* @return 实例化弹幕view
*/
- (instancetype)initWithType:(YHBarrageType)barrageType;
- (void)show;
- (void)insertItem:(NSDictionary *)itemdic;
- (void)reset;
@end