YOUPAINIMInputView.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // YOUPAINIMInputView.h
  3. // NIMKit
  4. //
  5. // Created by chris.
  6. // Copyright (c) 2015年 NetEase. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "NIMInputProtocol.h"
  10. #import "NIMSessionConfig.h"
  11. #import "YOUPAINIMInputToolBar.h"
  12. #import "YOUPAINIMInputAtCache.h"
  13. #import "YOUPAINIMInputVoiceView.h"
  14. @class YOUPAINIMInputMoreContainerView;
  15. @class YOUPAINIMInputEmoticonContainerView;
  16. typedef NS_ENUM(NSInteger, NIMAudioRecordPhase) {
  17. AudioRecordPhaseStart,
  18. AudioRecordPhaseRecording,
  19. AudioRecordPhaseCancelling,
  20. AudioRecordPhaseEnd
  21. };
  22. @protocol NIMInputDelegate <NSObject>
  23. @optional
  24. - (void)youpaifdidChangeInputHeight:(CGFloat)inputHeight;
  25. @end
  26. @interface YOUPAINIMInputView : UIView
  27. @property (nonatomic, strong) NIMSession *session;
  28. @property (nonatomic, assign) NSInteger maxTextLength;
  29. @property (assign, nonatomic, getter=isRecording) BOOL recording;
  30. @property (strong, nonatomic) YOUPAINIMInputToolBar *toolBar;
  31. @property (strong, nonatomic) UIView *moreContainer;
  32. @property (strong, nonatomic) UIView *emoticonContainer;
  33. @property (strong, nonatomic) YOUPAINIMInputVoiceView *voiceViewContainer;
  34. @property (nonatomic, assign) NIMInputStatus status;
  35. @property (nonatomic, strong) YOUPAINIMInputAtCache *atCache;
  36. - (instancetype)initWithFrame:(CGRect)frame
  37. config:(id<NIMSessionConfig>)config;
  38. - (void)reset;
  39. - (void)refreshStatus:(NIMInputStatus)status;
  40. - (void)setInputDelegate:(id<NIMInputDelegate>)delegate;
  41. //外部设置
  42. - (void)setInputActionDelegate:(id<NIMInputActionDelegate>)actionDelegate;
  43. - (void)setInputTextPlaceHolder:(NSString*)placeHolder;
  44. - (void)updateAudioRecordTime:(NSTimeInterval)time;
  45. - (void)youpaifupdateVoicePower:(float)power;
  46. @end