YOUPAINIMInputToolBar.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // YOUPAINIMInputToolBar.h
  3. // NIMKit
  4. //
  5. // Created by chris.
  6. // Copyright (c) 2015年 NetEase. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSInteger,NIMInputStatus)
  10. {
  11. NIMInputStatusText,
  12. NIMInputStatusAudio,
  13. NIMInputStatusEmoticon,
  14. NIMInputStatusMore
  15. };
  16. @protocol NIMInputToolBarDelegate <NSObject>
  17. @optional
  18. - (BOOL)textViewShouldBeginEditing;
  19. - (void)textViewDidEndEditing;
  20. - (BOOL)youpaifshouldChangeTextInRange:(NSRange)range replacementText:(NSString *)replacementText;
  21. - (void)textViewDidChange;
  22. - (void)youpaiftoolBarWillChangeHeight:(CGFloat)height;
  23. - (void)youpaiftoolBarDidChangeHeight:(CGFloat)height;
  24. @end
  25. @interface YOUPAINIMInputToolBar : UIView
  26. @property (nonatomic,strong) UIButton *recordBtn;
  27. //@property (nonatomic,strong) UIButton *cameraBtn;
  28. @property (nonatomic,strong) UIButton *photoBtn;
  29. @property (nonatomic,strong) UIButton *emoticonBtn;
  30. @property (nonatomic,strong) UIButton *giftBtn;
  31. @property (nonatomic,strong) UIButton *videoBtn;
  32. @property (nonatomic,strong) UIButton *sayHiBtn;
  33. @property (nonatomic,strong) UIButton *voiceBtn;
  34. @property (nonatomic,strong) UIButton *moreMediaBtn;
  35. @property (nonatomic,strong) UIButton *recordButton;
  36. @property (nonatomic,strong) UIImageView *inputTextBkgImage;
  37. @property (nonatomic,strong) UIView *bottomSep;
  38. @property (nonatomic,copy) NSString *contentText;
  39. @property (nonatomic,weak) id<NIMInputToolBarDelegate> delegate;
  40. @property (nonatomic,assign) BOOL showsKeyboard;
  41. @property (nonatomic,assign) NSArray *inputBarItemTypes;
  42. @property (nonatomic,assign) NSInteger maxNumberOfInputLines;
  43. - (void)update:(NIMInputStatus)status;
  44. @end
  45. @interface YOUPAINIMInputToolBar(InputText)
  46. - (NSRange)selectedRange;
  47. - (void)setPlaceHolder:(NSString *)placeHolder;
  48. - (void)insertText:(NSString *)text;
  49. - (void)deleteText:(NSRange)range;
  50. @end