修改聊天闪退

This commit is contained in:
启星
2025-12-06 16:55:26 +08:00
parent 9f8a36544b
commit 16c8869961
12 changed files with 288 additions and 15 deletions

View File

@@ -420,6 +420,7 @@
}
self.nameLabel.text = userModel.nickname;
self.idLabel.text = [NSString stringWithFormat:@"ID:%@",userModel.user_code];
self.bodyPriceMoneyLabel.text = userModel.market_value;
UILabel *followLabel = [self viewWithTag:10];
UILabel *fansLabel = [self viewWithTag:11];
UILabel *lookLabel = [self viewWithTag:12];

View File

@@ -10,6 +10,7 @@
#import "UIButton+QX.h"
#import "QXCOSUploadManager.h"
#import "QXMineNetwork.h"
#import "QXHapticManager.h"
@interface QXAudioRecorderView() <AVAudioRecorderDelegate, AVAudioPlayerDelegate,UIGestureRecognizerDelegate>
// UI Components
@@ -63,6 +64,8 @@
}
- (void)setupUI {
BOOL isSupported = [QXHapticManager isHapticFeedbackSupported];
NSLog(@"触觉反馈支持: %@", isSupported ? @"是" : @"否");
self.backgroundColor = [UIColor whiteColor];
[self addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
@@ -248,14 +251,18 @@
- (void)handleLongPress:(UILongPressGestureRecognizer *)gesture {
CGPoint touchPoint = [gesture locationInView:self];
UIImpactFeedbackGenerator *generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium];
[generator prepare];
[generator impactOccurred];
switch (gesture.state) {
case UIGestureRecognizerStateBegan:
case UIGestureRecognizerStateBegan:{
[self stopPlayback];
// [[QXHapticManager shared] impactMedium];
NSLog(@"开始录制 - 第%ld段", (long)self.recordingSessionCount + 1);
self.isCancelled = NO;
[self startRecording];
break;
} break;
case UIGestureRecognizerStateChanged:
//