VideoTextFiled.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // VideoTextFiled.h
  3. // DeviceManageIOSApp
  4. //
  5. // Created by rushanting on 2017/5/22.
  6. // Copyright © 2017年 tencent. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class VideoTextFiled;
  10. /**
  11. 字幕输入view,进行文字输入,拖动,放大,旋转等
  12. */
  13. @interface VideoTextBubble
  14. @property(nonatomic , strong) UIImage *image;
  15. @property(nonatomic , assign) CGRect textNormalizationFrame;
  16. @end
  17. @protocol VideoTextFieldDelegate <NSObject>
  18. - (void)onBubbleTap;
  19. - (void)onTextInputBegin;
  20. - (void)onTextInputDone:(NSString*)text;
  21. - (void)onRemoveTextField:(VideoTextFiled*)textField;
  22. @end
  23. @interface VideoTextFiled : UIView
  24. @property (nonatomic, weak) id<VideoTextFieldDelegate> delegate;
  25. @property (nonatomic, copy, readonly) NSString* text;
  26. @property (nonatomic, readonly) UIImage* textImage; //生成字幕image
  27. - (void)setTextBubbleImage:(UIImage *)image textNormalizationFrame:(CGRect)frame;
  28. - (CGRect)textFrameOnView:(UIView*)view;
  29. //关闭键盘
  30. - (void)resignFirstResponser;
  31. @end