TUIRecordView.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Created by Tencent on 2023/06/09.
  2. // Copyright © 2023 Tencent. All rights reserved.
  3. /**
  4. * This document declares the voice message recording component
  5. * Voice view, that is, a view that provides guidance and result prompts when a user records a voice message.
  6. * This file contains the TUIRecordView class.
  7. * This class is responsible for providing operational guidance to the user when the user is recording, such as indicating the recording volume, reminding the
  8. * current recording status, etc.
  9. */
  10. #import <UIKit/UIKit.h>
  11. #import "TUIChatDefine.h"
  12. @interface TUIRecordView : UIView
  13. /**
  14. * Icon view for recording
  15. * This icon contains the corresponding icons under each volume level (a total of 8 volume indications from 1 to 8).
  16. */
  17. @property(nonatomic, strong) UIImageView *recordImage;
  18. /**
  19. * Label for displaying tips
  20. * Prompt the user about the current recording status. Such as "release to send", "swipe up to cancel sending", "talk time is too short", etc.
  21. */
  22. @property(nonatomic, strong) UILabel *title;
  23. @property(nonatomic, strong) UIView *background;
  24. @property(nonatomic, strong) UILabel *timeLabel;
  25. /**
  26. * Sets the volume of the current recording.
  27. * It is convenient for the image in the recording icon view to change according to the volume.
  28. * For example: when power < 25, use the "one grid" icon; when power > 25, calculate the icon format according to a certain formula and replace the current
  29. * icon.
  30. */
  31. - (void)setPower:(NSInteger)power;
  32. - (void)setStatus:(RecordStatus)status;
  33. @end