Commit 7af8be63 by pierce

fixed bugs

parent c3d07420
Showing with 71 additions and 114 deletions
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
if (_outputType == AudioOutputTypeSpeaker) { if (_outputType == AudioOutputTypeSpeaker) {
//切换为扬声器播放 //切换为扬声器播放
// [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:nil]; [[AVAudioSession sharedInstance] overrideOutputAudioPort:AVAudioSessionPortOverrideSpeaker error:nil];
} else if (_outputType == AudioOutputTypeTele) { } else if (_outputType == AudioOutputTypeTele) {
//切换为听筒播放 //切换为听筒播放
......
...@@ -5,12 +5,11 @@ ...@@ -5,12 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "voice_sign_record_again_btn@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "voice_sign_record_again_btn@3x.png", "filename" : "img_v3_02cn_2cadadfc-6369-47fe-ba80-0e0fb1b0058g.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "voice_sign_record_again_btn_press@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "voice_sign_record_again_btn_press@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,11 @@ ...@@ -5,12 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "voice_sign_record_btn@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "voice_sign_record_btn@3x.png", "filename" : "img_v3_02cn_6b977c42-1c51-4dd8-9642-b0d9584feddg.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "voice_sign_record_btn_press@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "voice_sign_record_btn_press@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "voice_sign_record_card_bg_img@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "voice_sign_record_card_bg_img@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,11 @@ ...@@ -5,12 +5,11 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "voice_sign_record_save_btn@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "voice_sign_record_save_btn@3x.png", "filename" : "img_v3_02cn_e02c1306-9eeb-457c-bd27-5ebeede50b4g.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "voice_sign_record_save_btn_press@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "voice_sign_record_save_btn_press@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -13,10 +13,12 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -13,10 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
@interface FUSDewAwardAnimationView : UIView @interface FUSDewAwardAnimationView : UIView
/// 加露水 /// 奖励领取动画
/// @param amount /// - Parameters:
/// @param color /// - type: 0:露水、1:宝石、2:萤火
- (void)addDewAwardWithAmount:(NSString *)amount textColor:(UIColor *)color; /// - amount: 数量
/// - color: 字体颜色
- (void)addAwardAnimWithType:(NSInteger)type amount:(NSString *)amount textColor:(UIColor *)color;
/// 扣露水 /// 扣露水
......
...@@ -17,12 +17,34 @@ ...@@ -17,12 +17,34 @@
@implementation FUSDewAwardAnimationView @implementation FUSDewAwardAnimationView
- (void)addDewAwardWithAmount:(NSString *)amount textColor:(UIColor *)color{ /// 奖励领取动画
/// - Parameters:
/// - type: 0:露水、1:宝石、2:萤火
/// - amount: 数量
/// - color: 字体颜色
- (void)addAwardAnimWithType:(NSInteger)type amount:(NSString *)amount textColor:(UIColor *)color {
[self removeAllSubviews]; [self removeAllSubviews];
//加载动画 //加载动画
CompatibleAnimationView *largeLotAnimView = [[CompatibleAnimationView alloc] initWithCompatibleAnimation:[CompatibleAnimation named:@"rightToBottom"]];
NSString *animName = @"rightToBottom";
switch (type) {
case 1:
animName = @"add_diamond";
break;
case 2:
animName = @"add_fire";
break;
default:
break;
}
//加载动画
CompatibleAnimationView *largeLotAnimView = [[CompatibleAnimationView alloc] initWithCompatibleAnimation:[CompatibleAnimation named:animName]];
[self addSubview:largeLotAnimView]; [self addSubview:largeLotAnimView];
[largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES; [largeLotAnimView.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES;
......
...@@ -161,21 +161,20 @@ class FUSLiveChatInputTaskListView: UIView, UITableViewDelegate, UITableViewData ...@@ -161,21 +161,20 @@ class FUSLiveChatInputTaskListView: UIView, UITableViewDelegate, UITableViewData
// currency:奖励类型(3:宝石、4:萤火、5:露水) // currency:奖励类型(3:宝石、4:萤火、5:露水)
if listModel.currency == 3 if listModel.currency == 3
|| listModel.classify == 4 { || listModel.classify == 4 {
let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds) let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds)
dewView.addDewAward(withAmount:"\(listModel.award)" , textColor: UIColor.fus_diamondBlue()) dewView.addAwardAnim(withType: 1, amount: "\(listModel.award)", textColor: UIColor.fus_diamondBlue())
UIApplication.shared.keyWindow?.addSubview(dewView) UIApplication.shared.keyWindow?.addSubview(dewView)
} else if listModel.currency == 4 } else if listModel.currency == 4
|| listModel.classify == 6 { || listModel.classify == 6 {
let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds) let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds)
dewView.addDewAward(withAmount:"\(listModel.award)" , textColor: UIColor.fus_fireGreen()) dewView.addAwardAnim(withType: 2, amount: "\(listModel.award)", textColor: UIColor.fus_fireGreen())
UIApplication.shared.keyWindow?.addSubview(dewView) UIApplication.shared.keyWindow?.addSubview(dewView)
} else if listModel.currency == 5 } else if listModel.currency == 5
|| listModel.classify == 5 { || listModel.classify == 5 {
let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds) let dewView:FUSDewAwardAnimationView = FUSDewAwardAnimationView.init(frame: UIApplication.shared.keyWindow!.bounds)
dewView.addDewAward(withAmount:"\(listModel.award)" , textColor: UIColor.fus_dewBlue()) dewView.addAwardAnim(withType: 0, amount: "\(listModel.award)", textColor: UIColor.fus_dewBlue())
UIApplication.shared.keyWindow?.addSubview(dewView) UIApplication.shared.keyWindow?.addSubview(dewView)
} else{ } else{
FUSGotBackpackItemAnimView.fus_show(with: .type2, icon: listModel.icon, name: listModel.getTips, goodsType: FUSGotBackpackItemGoodsType(rawValue: UInt(listModel.classify)) ?? .goodsTypeNone, isMotorHasWear: false) FUSGotBackpackItemAnimView.fus_show(with: .type2, icon: listModel.icon, name: listModel.getTips, goodsType: FUSGotBackpackItemGoodsType(rawValue: UInt(listModel.classify)) ?? .goodsTypeNone, isMotorHasWear: false)
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
[self setOfficialMessageIsRead]; [self setOfficialMessageIsRead];
// 注册通知 // 注册通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loadOfficialListFromDatabase) name:OFFICIAL_MESSAGE_REFRESH object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadOfficialListFromDatabase) name:OFFICIAL_MESSAGE_REFRESH object:nil];
} }
- (void)viewWillDisappear:(BOOL)animated { - (void)viewWillDisappear:(BOOL)animated {
...@@ -209,6 +209,16 @@ ...@@ -209,6 +209,16 @@
[self.navigationController popViewControllerAnimated:YES]; [self.navigationController popViewControllerAnimated:YES];
} }
- (void)reloadOfficialListFromDatabase {
self.isLoadingDatas = NO;
self.page = 0;
[self.allOfficialDataArr removeAllObjects];
[self.officialDataArr removeAllObjects];
if (self.officialTableView.contentOffset.y >= (self.officialTableView.contentSize.height - self.officialTableView.height - 100)) {
[self loadOfficialListFromDatabase];
}
}
- (void)loadOfficialListFromDatabase - (void)loadOfficialListFromDatabase
{ {
if (self.isLoadingDatas) { if (self.isLoadingDatas) {
...@@ -221,8 +231,8 @@ ...@@ -221,8 +231,8 @@
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
[self fus_loadMoreDatas:^(NSMutableArray<FUSOfficialMessageModel *> *msgModelArray) { [self fus_loadMoreDatas:^(NSMutableArray<FUSOfficialMessageModel *> *msgModelArray) {
[weakSelf.officialTableView.mj_header endRefreshing];
if (!msgModelArray.count) { if (!msgModelArray.count) {
[weakSelf.officialTableView.mj_header endRefreshing];
weakSelf.isLoadingDatas = NO; weakSelf.isLoadingDatas = NO;
return; return;
} }
...@@ -244,6 +254,7 @@ ...@@ -244,6 +254,7 @@
[weakSelf.officialTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:msgModelArray.count inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; [weakSelf.officialTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:msgModelArray.count inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
} }
weakSelf.isLoadingDatas = NO; weakSelf.isLoadingDatas = NO;
[weakSelf.officialTableView.mj_header endRefreshing];
}); });
}]; }];
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define CellWithReuseIdentifier @"UICollectionViewCell" #define CellWithReuseIdentifier @"UICollectionViewCell"
@interface FUSReportViewController () <FUSTextViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UITableViewDelegate, UITableViewDataSource> @interface FUSReportViewController () <FUSTextViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UITableViewDelegate, UITableViewDataSource, UIGestureRecognizerDelegate>
@property (weak, nonatomic) IBOutlet UIView *textViewBgView; @property (weak, nonatomic) IBOutlet UIView *textViewBgView;
@property (weak, nonatomic) IBOutlet FUSTextView *textView; @property (weak, nonatomic) IBOutlet FUSTextView *textView;
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
- (void)initView - (void)initView
{ {
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_bgtapGesture)]; UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_bgtapGesture)];
tapGesture.delegate = self;
[self.bgScrollView addGestureRecognizer:tapGesture]; [self.bgScrollView addGestureRecognizer:tapGesture];
// 初始化导航栏 // 初始化导航栏
self.title = [NSString stringWithFormat:@"%@%@",[NSString fus_localString:@"举报"], self.name?self.name:@""]; self.title = [NSString stringWithFormat:@"%@%@",[NSString fus_localString:@"举报"], self.name?self.name:@""];
...@@ -268,7 +269,7 @@ ...@@ -268,7 +269,7 @@
}else{ }else{
imageView.image = [UIImage imageNamed:@"zone_report_add_img"]; imageView.image = [UIImage imageNamed:@"zone_report_add_img"];
} }
[cell addSubview:imageView]; [cell.contentView addSubview:imageView];
return cell; return cell;
} }
...@@ -312,6 +313,14 @@ ...@@ -312,6 +313,14 @@
} }
} }
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view.superview isKindOfClass:[UICollectionViewCell class]]) {
return NO;
}
return YES;
}
#pragma mark -- FUSTextViewDelegate相关方法 #pragma mark -- FUSTextViewDelegate相关方法
- (void)textViewDidEndEditing:(FUSTextView *)textView{ - (void)textViewDidEndEditing:(FUSTextView *)textView{
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// 文案:语音签名 // 文案:语音签名
@property (strong, nonatomic) IBOutlet UILabel *signTextLabel; @property (strong, nonatomic) IBOutlet UILabel *signTextLabel;
@property (strong, nonatomic) IBOutlet UIView *cardBgView;
// 文案:录制一段自己的声音,可以是自我介紹,交友意向、唱歌等,最多60秒 // 文案:录制一段自己的声音,可以是自我介紹,交友意向、唱歌等,最多60秒
@property (strong, nonatomic) IBOutlet UILabel *signTipLabel; @property (strong, nonatomic) IBOutlet UILabel *signTipLabel;
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
@property (strong, nonatomic) IBOutlet UILabel *signInfoLabel; @property (strong, nonatomic) IBOutlet UILabel *signInfoLabel;
// 缓一缓按钮 // 缓一缓按钮
@property (strong, nonatomic) IBOutlet UIButton *changeBtn; @property (strong, nonatomic) IBOutlet FUSStyleButton *changeBtn;
// 文案:长按录制 // 文案:长按录制
@property (strong, nonatomic) IBOutlet UILabel *recordTipLabel; @property (strong, nonatomic) IBOutlet UILabel *recordTipLabel;
...@@ -105,6 +106,9 @@ ...@@ -105,6 +106,9 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.cardBgView.layer.cornerRadius = 16;
self.cardBgView.layer.masksToBounds = YES;
[self fus_enableNavigationBackWithPopFunction:popViewController withAnimated:YES]; [self fus_enableNavigationBackWithPopFunction:popViewController withAnimated:YES];
[self fus_setupUIs]; [self fus_setupUIs];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(finishRecording) name:FUS_RECEIVE_VCHAT_INVITE_NOTIFICATION object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(finishRecording) name:FUS_RECEIVE_VCHAT_INVITE_NOTIFICATION object:nil];
...@@ -132,10 +136,11 @@ ...@@ -132,10 +136,11 @@
self.egLabel.text = [NSString fus_localString:@"例如:"]; self.egLabel.text = [NSString fus_localString:@"例如:"];
self.changeBtn.style = FUSButtonStyleBlue;
[self.changeBtn setTitle:[NSString fus_localString:@"换一个"] forState:UIControlStateNormal]; [self.changeBtn setTitle:[NSString fus_localString:@"换一个"] forState:UIControlStateNormal];
self.changeBtn.layer.cornerRadius = self.changeBtn.height / 2.0f; self.changeBtn.layer.cornerRadius = self.changeBtn.height / 2.0f;
self.changeBtn.layer.masksToBounds = YES; self.changeBtn.layer.masksToBounds = YES;
self.recordTipLabel.text = [NSString fus_localString:@"长按录制"]; self.recordTipLabel.text = [NSString fus_localString:@"长按录制"];
self.playTipBtn.text = [NSString fus_localString:@"点击播放"]; self.playTipBtn.text = [NSString fus_localString:@"点击播放"];
self.recordAgainTipLabel.text = [NSString fus_localString:@"点击录制"]; self.recordAgainTipLabel.text = [NSString fus_localString:@"点击录制"];
......
...@@ -421,20 +421,20 @@ static NSString *const reuseIdentifyCell = @"cell"; ...@@ -421,20 +421,20 @@ static NSString *const reuseIdentifyCell = @"cell";
|| listModel.classify == 4) { || listModel.classify == 4) {
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame]; FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_diamondBlue]]; [dewAnimView addAwardAnimWithType:1 amount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_diamondBlue]];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView]; [UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else if (listModel.currency == 4 } else if (listModel.currency == 4
|| listModel.classify == 6) { || listModel.classify == 6) {
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame]; FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_fireGreen]]; [dewAnimView addAwardAnimWithType:2 amount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_fireGreen]];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView]; [UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else if (listModel.currency == 5 } else if (listModel.currency == 5
|| listModel.classify == 5) { || listModel.classify == 5) {
FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame]; FUSDewAwardAnimationView *dewAnimView = [[FUSDewAwardAnimationView alloc] initWithFrame:UIView.fus_screenFrame];
[dewAnimView addDewAwardWithAmount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_dewBlue]]; [dewAnimView addAwardAnimWithType:0 amount:[NSString stringWithFormat:@"%ld",listModel.award] textColor:[UIColor fus_dewBlue]];
[UIApplication.sharedApplication.keyWindow addSubview:dewAnimView]; [UIApplication.sharedApplication.keyWindow addSubview:dewAnimView];
} else { } else {
[FUSGotBackpackItemAnimView fus_showWithType:FUSGotBackpackItemAnimType2 icon:listModel.icon name:listModel.getTips goodsType:listModel.classify isMotorHasWear:NO]; [FUSGotBackpackItemAnimView fus_showWithType:FUSGotBackpackItemAnimType2 icon:listModel.icon name:listModel.getTips goodsType:listModel.classify isMotorHasWear:NO];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment