UGCKitVideoTextFiled.h 1.0 KB

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