From 983b68bbbacb35443b4a37f152bf28e411ab3ef3 Mon Sep 17 00:00:00 2001 From: mh <729263080@qq.com> Date: Fri, 24 Oct 2025 15:46:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=BF=E6=8C=89=E8=AF=AD=E8=A8=80=E8=BE=93?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chat/Session/Input/IMVoiceHoldView.swift | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Visual_Novel_iOS/Src/Modules/Chat/Session/Input/IMVoiceHoldView.swift b/Visual_Novel_iOS/Src/Modules/Chat/Session/Input/IMVoiceHoldView.swift index 1b8bd4d..6a13787 100644 --- a/Visual_Novel_iOS/Src/Modules/Chat/Session/Input/IMVoiceHoldView.swift +++ b/Visual_Novel_iOS/Src/Modules/Chat/Session/Input/IMVoiceHoldView.swift @@ -15,6 +15,8 @@ class IMVoiceHoldView: UIView { var wave : LottieAnimationView! var swipeStackView: UIStackView! + var swipeLab: UILabel! + var swipeImgView: UIImageView! var tipLabel: UILabel! @@ -109,12 +111,29 @@ class IMVoiceHoldView: UIView { return voiceAnimation }() + swipeLab = { + let lab = UILabel() + lab.text = "Swipe Up to Cancel" + lab.textColor = UIColor.white + lab.font = UIFont.systemFont(ofSize: 12) + return lab + }() + + swipeImgView = { + let imgView = UIImageView(image: UIImage(named: "role_chat_up_cancel")) + return imgView + }() + swipeStackView = { - let stackView = UIStackView(arrangedSubviews: []) + let stackView = UIStackView(arrangedSubviews: [swipeImgView, swipeLab]) stackView.spacing = 5.0 stackView.distribution = .fill stackView.alignment = .fill - + insertSubview(stackView, belowSubview: overlayBg) + stackView.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.bottom.equalTo(voiceIconDecorationView.snp.top).offset(-15) + } return stackView }() @@ -125,7 +144,7 @@ class IMVoiceHoldView: UIView { addSubview(v) v.snp.makeConstraints { make in make.centerX.equalToSuperview() - make.top.equalTo(voiceWaveContainer.snp.bottom).offset(5) + make.top.equalTo(voiceWaveContainer.snp.bottom).offset(0) } return v }()