TCShowLiveInputView.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // TCShowLiveInputView.h
  3. // TCShow
  4. //
  5. // Created by AlexiChen on 15/11/16.
  6. // Copyright © 2015年 AlexiChen. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. //#import "KLSwitch.h"
  10. @class TCShowLiveInputView;
  11. @protocol TCShowLiveInputViewDelegate <NSObject>
  12. @required
  13. - (void)sendMsg:(TCShowLiveInputView *)inputView;
  14. @end
  15. @interface TCShowLiveInputView : BGBaseView<UITextFieldDelegate>
  16. {
  17. UITextField *_textField;
  18. UIButton *_confirmButton;
  19. BOOL _canSendMsg; // 是否能够发送消息
  20. NSString *_sendMsgStr; // 上一次发送的消息
  21. NSInteger _sendSameMsgTime; // 发送相同消息的次数
  22. CurrentLiveInfo *_liveInfo;
  23. }
  24. @property (nonatomic, weak) id<TCShowLiveInputViewDelegate> delegate;
  25. @property (nonatomic, strong) UITextField *textField;
  26. @property (nonatomic, assign) NSInteger limitLength; // 限制长度,> 0 时有效
  27. @property (nonatomic, copy) NSString *text;
  28. //@property (nonatomic, strong) KLSwitch *barrageSwitch; // 是否打开弹幕
  29. @property (nonatomic, assign) BOOL isHost; // 是否主播
  30. @property (nonatomic, assign) BOOL isInputViewActive;
  31. @property (nonatomic, strong) UIButton *barrageBtn;
  32. /**
  33. 请求完接口后,刷新直播间相关信息
  34. @param liveItem 视频Item
  35. @param liveInfo get_video2接口获取下来的数据实体
  36. */
  37. - (void)refreshLiveItem:(id<FWShowLiveRoomAble>)liveItem liveInfo:(CurrentLiveInfo *)liveInfo;
  38. - (BOOL)isInputViewActive;
  39. - (void)setPlacehoholder:(NSString *)placeholder;
  40. - (BOOL)resignFirstResponder;
  41. - (BOOL)becomeFirstResponder;
  42. @end