Commit d1b4e5d7 by pierce

Merge branch 'feature/UI修改版本' of http://git.yabolive.net:88/pidan/FuSiLive into feature/UI修改版本

parents 6554957a 441f4a0d
Showing with 517 additions and 239 deletions
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
} }
+ (UIColor *)fus_searchColor { + (UIColor *)fus_searchColor {
return [UIColor colorWithHex:@"#24242E"]; // return [UIColor colorWithHex:@"#24242E"];
return [UIColor colorWithHex:@"#F3F3F3"];
} }
+ (UIColor *)fus_inpuContentColor{ + (UIColor *)fus_inpuContentColor{
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "表情-normal@2x.png", "filename" : "表情@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "表情-normal@3x.png", "filename" : "表情@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal",
"filename" : "语音@2x.png", "filename" : "语音@2x.png",
"idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal",
"filename" : "语音@3x.png", "filename" : "语音@3x.png",
"idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "chat_detail_func_album@2x.png", "filename" : "照片@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "chat_detail_func_album@3x.png", "filename" : "照片@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "chat_detail_func_camera@2x.png", "filename" : "拍摄-52@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "chat_detail_func_camera@3x.png", "filename" : "拍摄-52@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "送礼物-normal@2x.png", "filename" : "送礼物@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "送礼物-normal@3x.png", "filename" : "送礼物@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "chat_detail_video_chat_btn@2x.png", "filename" : "聊天底部-视讯-52@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "chat_detail_video_chat_btn@3x.png", "filename" : "聊天底部-视讯-52@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "chat_detail_voice_chat_btn@2x.png", "filename" : "聊天底部-声讯-52@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "chat_detail_voice_chat_btn@3x.png", "filename" : "聊天底部-声讯-52@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_message_dateRecord_audio_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_message_dateRecord_audio_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_message_dateRecord_callIn_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_message_dateRecord_callIn_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_message_dateRecord_callOut_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_message_dateRecord_callOut_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_message_dateRecord_hangUp_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_message_dateRecord_hangUp_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_message_dateRecord_video_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_message_dateRecord_video_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -72,6 +72,9 @@ typedef NS_ENUM(NSInteger,FUSBaoFangRecommendType) { ...@@ -72,6 +72,9 @@ typedef NS_ENUM(NSInteger,FUSBaoFangRecommendType) {
//热度 //热度
@property (nonatomic, copy) NSString *hot; @property (nonatomic, copy) NSString *hot;
/// fusi 热度
@property (nonatomic, copy) NSString *hotSum;
//是否在线 //是否在线
@property (nonatomic, copy) NSString *haveMC; @property (nonatomic, copy) NSString *haveMC;
......
...@@ -7,14 +7,17 @@ ...@@ -7,14 +7,17 @@
// //
#import "FUSHomePageViewController.h" #import "FUSHomePageViewController.h"
#import "FUSHomePageViewModel.h"
#import "FUSFloatTabbarView.h" #import "FUSFloatTabbarView.h"
#import "FUSHomeView.h"
#import "FUSMessageView.h"
#import "FUSMyView.h"
#import "FUSDefine.h" #import "FUSDefine.h"
// 导入通知框架
#import <UserNotifications/UserNotifications.h>
@interface FUSHomePageViewController ()<UIScrollViewDelegate, FUSFloatTabbarViewDelegate> @interface FUSHomePageViewController ()<UIScrollViewDelegate, FUSFloatTabbarViewDelegate, FUSHomeViewBaseDelegate>
@property (nonatomic, strong) FUSHomePageViewModel *viewModel; @property (nonatomic, strong) NSArray<FUSHomePageBaseView *> *contentViewList;
@property (nonatomic, strong) UIScrollView *scrollView; @property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) FUSFloatTabbarView *tabbarView; @property (nonatomic, strong) FUSFloatTabbarView *tabbarView;
...@@ -33,6 +36,9 @@ ...@@ -33,6 +36,9 @@
self.hiddenNavigationBar = YES; self.hiddenNavigationBar = YES;
self.firstLoad = YES; self.firstLoad = YES;
[[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionBadge|UNAuthorizationOptionSound|UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError * _Nullable error) {
}];
[self fus_setupProperties]; [self fus_setupProperties];
[self fus_createHomeScrollView]; [self fus_createHomeScrollView];
[self fus_createTabbarView]; [self fus_createTabbarView];
...@@ -40,13 +46,13 @@ ...@@ -40,13 +46,13 @@
} }
-(void)fus_setupProperties{ -(void)fus_setupProperties{
self.viewModel = [[FUSHomePageViewModel alloc] init]; self.contentViewList = [[NSMutableArray alloc] initWithArray:@[[[FUSMyView alloc] init], [[FUSHomeView alloc] init], [[FUSMessageView alloc] init]]];
} }
-(void)fus_createHomeScrollView{ -(void)fus_createHomeScrollView{
_scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)]; _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)];
_scrollView.contentSize = CGSizeMake(UIView.fus_screenW * self.viewModel.contentViewList.count, UIView.fus_screenH); _scrollView.contentSize = CGSizeMake(UIView.fus_screenW * self.contentViewList.count, UIView.fus_screenH);
_scrollView.pagingEnabled = YES; _scrollView.pagingEnabled = YES;
_scrollView.bounces = NO; _scrollView.bounces = NO;
_scrollView.scrollEnabled = YES; _scrollView.scrollEnabled = YES;
...@@ -59,10 +65,11 @@ ...@@ -59,10 +65,11 @@
} }
[self.view addSubview:_scrollView]; [self.view addSubview:_scrollView];
for (int i = 0; i < self.viewModel.contentViewList.count; i++) { for (int i = 0; i < self.contentViewList.count; i++) {
FUSHomePageBaseView *tempView = self.viewModel.contentViewList[i]; FUSHomePageBaseView *tempView = self.contentViewList[i];
tempView.frame = CGRectMake(i * UIView.fus_screenW, 0, UIView.fus_screenW, UIView.fus_screenH); tempView.frame = CGRectMake(i * UIView.fus_screenW, 0, UIView.fus_screenW, UIView.fus_screenH);
tempView.parentController = self; tempView.parentController = self;
tempView.fus_baseDelegate = self;
[self.scrollView addSubview:tempView]; [self.scrollView addSubview:tempView];
} }
...@@ -71,12 +78,10 @@ ...@@ -71,12 +78,10 @@
} }
-(void)fus_createTabbarView{ -(void)fus_createTabbarView{
CGFloat tabbarH = UIView.fus_tabbarHeight; CGFloat tabbarH = [FUSFloatTabbarView fus_tabbarHeight];
self.tabbarView = [[FUSFloatTabbarView alloc] init]; self.tabbarView = [[FUSFloatTabbarView alloc] init];
self.tabbarView.frame = CGRectMake(0, UIView.fus_screenH - tabbarH, UIView.fus_screenW, tabbarH); self.tabbarView.frame = CGRectMake(0, UIView.fus_screenH - tabbarH, UIView.fus_screenW, tabbarH);
[self.tabbarView fus_setNormalItemImageNames:self.viewModel.barItemImageNameWhiteList];
[self.tabbarView fus_setSelectedItemImageNames:self.viewModel.barItemSelectedImageNameList];
self.tabbarView.delegate = self; self.tabbarView.delegate = self;
[self.view addSubview:self.tabbarView]; [self.view addSubview:self.tabbarView];
...@@ -86,33 +91,31 @@ ...@@ -86,33 +91,31 @@
-(void)viewWillAppear:(BOOL)animated{ -(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated]; [super viewWillAppear:animated];
if (!self.firstLoad) { if (!self.firstLoad) {
[[self.viewModel fus_currentContentView] fus_viewWillShow]; [self.contentViewList[self.tabbarView.currentIndex] fus_viewWillShow];
} }
self.firstLoad = NO; self.firstLoad = NO;
} }
#pragma mark --- FUSHomeViewBaseDelegate
- (void)fus_homeView:(UIView *)view didUpdateCollectionCntentMaxHeightWithFloor:(CGFloat)maxHeight{
self.tabbarView.shouldBarCenterTransparency = maxHeight > (UIView.fus_screenH - [FUSFloatTabbarView fus_barHeight]);
}
#pragma mark --- FUSFloatTabbarViewDelegate #pragma mark --- FUSFloatTabbarViewDelegate
- (void)fus_floatTabbarView:(FUSFloatTabbarView *)tabbarView didClick:(NSInteger)index lastClick:(NSInteger)lastIndex{ - (void)fus_floatTabbarView:(FUSFloatTabbarView *)tabbarView didClick:(NSInteger)index lastClick:(NSInteger)lastIndex{
self.scrollViewDidDrag = NO; self.scrollViewDidDrag = NO;
if (index == lastIndex) { if (index == lastIndex) {
// 刷新指定页面 // 刷新指定页面
[self.viewModel fus_turnToPageView:index needReload:YES]; [self.contentViewList[index] fus_tabbarDidClicked:YES];
}else { }else {
// 跳到其他页面 // 跳到其他页面
CGRect scFrame = self.scrollView.frame; CGRect scFrame = self.scrollView.frame;
scFrame.origin.x = self.scrollView.width * index; scFrame.origin.x = self.scrollView.width * index;
[self.scrollView scrollRectToVisible:scFrame animated:NO]; [self.scrollView scrollRectToVisible:scFrame animated:NO];
[self.viewModel fus_turnToPageView:index needReload:NO]; [self.contentViewList[index] fus_viewWillShow];
[[self.viewModel fus_currentContentView] fus_viewWillShow];
if (index == 1) {
[tabbarView fus_setNormalItemImageNames:self.viewModel.barItemImageNameWhiteList];
}else {
[tabbarView fus_setNormalItemImageNames:self.viewModel.barItemImageNameList];
}
} }
} }
...@@ -121,17 +124,10 @@ ...@@ -121,17 +124,10 @@
if ( scrollView == self.scrollView ) { if ( scrollView == self.scrollView ) {
NSInteger index = (NSInteger)(scrollView.contentOffset.x/scrollView.width + 0.5); NSInteger index = (NSInteger)(scrollView.contentOffset.x/scrollView.width + 0.5);
if (index >= 0 && index < self.viewModel.contentViewList.count) { if (index >= 0 && index < self.contentViewList.count) {
[self.tabbarView fus_setSelect:index autoCall:NO]; [self.tabbarView fus_setSelect:index autoCall:NO];
} }
[self.contentViewList[index] fus_viewWillShow];
[self.viewModel fus_turnToPageView:index needReload:NO];
[[self.viewModel fus_currentContentView] fus_viewWillShow];
if (index == 1) {
[self.tabbarView fus_setNormalItemImageNames:self.viewModel.barItemImageNameWhiteList];
}else {
[self.tabbarView fus_setNormalItemImageNames:self.viewModel.barItemImageNameList];
}
} }
} }
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
......
...@@ -12,11 +12,18 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -12,11 +12,18 @@ NS_ASSUME_NONNULL_BEGIN
@protocol FUSHomeViewBaseDelegate <NSObject> @protocol FUSHomeViewBaseDelegate <NSObject>
@optional
/// 提醒显示navi,tabbar /// 提醒显示navi,tabbar
-(void)fus_scrollview:(UIScrollView *)view shouldHideNavigationBar:(BOOL)hidden; -(void)fus_scrollview:(UIScrollView *)view shouldHideNavigationBar:(BOOL)hidden;
/// 提醒隐藏navi,tabbr /// 提醒隐藏navi,tabbr
-(void)fus_scrollview:(UIScrollView *)view shouldShowNavigationBar:(BOOL)hidden; -(void)fus_scrollview:(UIScrollView *)view shouldShowNavigationBar:(BOOL)hidden;
/// 返回collection或者tableview的内容最大高度,向下取整,用于决定外面的tabbar透明还是非透明,过高就透明
/// - Parameters:
/// - view: 哪一个view
/// - maxHeight: 最大高度
-(void)fus_homeView:(UIView *)view didUpdateCollectionCntentMaxHeightWithFloor:(CGFloat)maxHeight;
@end @end
@interface FUSHomePageBaseView : UIView @interface FUSHomePageBaseView : UIView
......
...@@ -11,17 +11,8 @@ ...@@ -11,17 +11,8 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol FUSHomeViewDelegate <NSObject>
@optional
/// 返回collectionview的内容最大高度
-(void)fus_homeViewCollectionViewContentMaxHeight:(CGFloat)maxHeight;
@end
@interface FUSHomeView : FUSHomePageBaseView @interface FUSHomeView : FUSHomePageBaseView
@property (nonatomic, weak) id<FUSHomeViewDelegate> fus_homeDelegate;
@end @end
......
...@@ -136,12 +136,13 @@ ...@@ -136,12 +136,13 @@
#pragma mark --- scrollview delegate #pragma mark --- scrollview delegate
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
if (self.fus_homeDelegate && [self.fus_homeDelegate respondsToSelector:@selector(fus_homeViewCollectionViewContentMaxHeight:)]) { if (self.fus_baseDelegate && [self.fus_baseDelegate respondsToSelector:@selector(fus_homeView:didUpdateCollectionCntentMaxHeightWithFloor:)]) {
CGFloat contentH = 0; CGFloat contentH = 0;
NSInteger line = self.viewModel.dataList.count / self.columnsCount; NSInteger line = self.viewModel.dataList.count / self.columnsCount;
NSInteger last = self.viewModel.dataList.count % self.columnsCount; NSInteger last = self.viewModel.dataList.count % self.columnsCount;
contentH = [self fus_itemWidth] * line + (last > 1 ? 1 : 0) * [self fus_itemWidth]; contentH = [self fus_itemWidth] * line;
[self.fus_homeDelegate fus_homeViewCollectionViewContentMaxHeight:self.titleContainerView.height + contentH]; // contentH = contentH + (last > 1 ? 1 : 0) * [self fus_itemWidth];
[self.fus_baseDelegate fus_homeView:self didUpdateCollectionCntentMaxHeightWithFloor:contentH];
} }
return self.viewModel.dataList.count; return self.viewModel.dataList.count;
} }
......
...@@ -55,6 +55,19 @@ ...@@ -55,6 +55,19 @@
return self; return self;
} }
- (void)fus_viewWillShow{
[super fus_viewWillShow];
// FUSWeakSelf(weakself);
// [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionBadge|UNAuthorizationOptionSound|UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError * _Nullable error) {
// if (!weakself.isUserCloseNotificationRemind) {
// dispatch_sync(dispatch_get_main_queue(), ^{
// weakself.notificationRemindView.hidden = !granted;
// });
// }
// }];
}
-(void)fus_createUI{ -(void)fus_createUI{
self.naviView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, UIView.fus_screenW, UIView.fus_NavgationBarHeight)]; self.naviView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_StatusBarHeight, UIView.fus_screenW, UIView.fus_NavgationBarHeight)];
...@@ -228,10 +241,11 @@ ...@@ -228,10 +241,11 @@
#pragma mark --- method #pragma mark --- method
-(void)fus_reloadnotificationRemindTips{ -(void)fus_reloadnotificationRemindTips{
FUSWeakSelf(weakself);
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { [[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
if (!_isUserCloseNotificationRemind) { if (!weakself.isUserCloseNotificationRemind) {
dispatch_sync(dispatch_get_main_queue(), ^{ dispatch_sync(dispatch_get_main_queue(), ^{
_notificationRemindView.hidden = (settings.authorizationStatus == UNAuthorizationStatusAuthorized); weakself.notificationRemindView.hidden = (settings.authorizationStatus == UNAuthorizationStatusAuthorized);
}); });
} }
}]; }];
......
//
// FUSHomePageViewModel.h
// FuSiLive
//
// Created by aaa on 2024/6/4.
// Copyright © 2024 压寨团队. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FUSHomeView.h"
#import "FUSMyView.h"
#import "FUSMessageView.h"
#import "FUSFloatTabbarView.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSHomePageViewModel : NSObject
#pragma mark --- properties
@property (nonatomic, assign, readonly) NSInteger currentIndex;
#pragma mark --- data
@property (nonatomic, strong) NSArray *barItemImageNameList;
@property (nonatomic, strong) NSArray *barItemImageNameWhiteList;
@property (nonatomic, strong) NSArray *barItemSelectedImageNameList;
@property (nonatomic, strong) NSArray<FUSHomePageBaseView *> *contentViewList;
#pragma mark --- method
/// 跳转到某一页
/// - Parameters:
/// - index: 索引
/// - reload: 是否需要刷新
-(void)fus_turnToPageView:(NSInteger)index needReload:(BOOL)reload;
/// 获取当前显示的页面
-(FUSHomePageBaseView *)fus_currentContentView;
@end
NS_ASSUME_NONNULL_END
//
// FUSHomePageViewModel.m
// FuSiLive
//
// Created by aaa on 2024/6/4.
// Copyright © 2024 压寨团队. All rights reserved.
//
#import "FUSHomePageViewModel.h"
#import "FUSDefine.h"
@implementation FUSHomePageViewModel
- (instancetype)init
{
self = [super init];
if (self) {
[self fus_setup];
}
return self;
}
-(void)fus_setup{
_currentIndex = 1;
self.barItemImageNameList = @[@"fus_tabbar_item_my_unselect", @"fus_tabbar_item_home_unselect", @"fus_tabbar_item_message_unselect"];
self.barItemImageNameWhiteList = @[@"fus_tabbar_item_my_white", @"fus_tabbar_item_home_unselect", @"fus_tabbar_item_message_white"];
self.barItemSelectedImageNameList = @[@"fus_tabbar_item_my_select", @"fus_tabbar_item_home_select", @"fus_tabbar_item_message_select"];
self.contentViewList = [[NSMutableArray alloc] initWithArray:@[[[FUSMyView alloc] init], [[FUSHomeView alloc] init], [[FUSMessageView alloc] init]]];
}
#pragma mark --- method
- (void)fus_turnToPageView:(NSInteger)index needReload:(BOOL)reload{
_currentIndex = index;
if (reload) {
// 刷新逻辑
if (self.contentViewList.count <= index) {
return;
}
FUSHomePageBaseView *tempView = self.contentViewList[index];
[tempView fus_tabbarDidClicked:YES];
}
}
- (FUSHomePageBaseView *)fus_currentContentView{
if (self.currentIndex >= self.contentViewList.count) {
return nil;
}
return self.contentViewList[self.currentIndex];
}
@end
...@@ -118,12 +118,12 @@ ...@@ -118,12 +118,12 @@
self.locationBtn.hidden = NO; self.locationBtn.hidden = NO;
[self.locationBtn setTitle:model.addr forState:UIControlStateNormal]; [self.locationBtn setTitle:model.addr forState:UIControlStateNormal];
} }
if ([NSString isNull:model.hot]) { if ([NSString isNull:model.hotSum]) {
self.hotNumBtn.hidden = YES; self.hotNumBtn.hidden = YES;
}else { }else {
self.hotNumBtn.hidden = NO; self.hotNumBtn.hidden = NO;
[self.hotNumBtn setTitle:model.hot forState:UIControlStateNormal]; [self.hotNumBtn setTitle:model.hotSum forState:UIControlStateNormal];
CGSize hotSize = [model.hot sizeWithFont:self.hotNumBtn.titleLabel.font maxWidth:MAXFLOAT]; CGSize hotSize = [model.hotSum sizeWithFont:self.hotNumBtn.titleLabel.font maxWidth:MAXFLOAT];
[self.hotNumBtn mas_updateConstraints:^(MASConstraintMaker *make) { [self.hotNumBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.offset(hotSize.width + 14 + 4 + 10); make.width.offset(hotSize.width + 14 + 4 + 10);
}]; }];
......
...@@ -24,15 +24,17 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -24,15 +24,17 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign, readonly) NSInteger currentIndex; @property (nonatomic, assign, readonly) NSInteger currentIndex;
/// 当滑动到中间的时候是否需要透明
@property (nonatomic, assign) BOOL shouldBarCenterTransparency;
/// 设置选择的index /// 设置选择的index
-(void)fus_setSelect:(NSInteger)index autoCall:(BOOL)autoCall; -(void)fus_setSelect:(NSInteger)index autoCall:(BOOL)autoCall;
/// 设置滑动的进度【0,2】 /// 设置滑动的进度【0,2】
-(void)fus_setScrollProgress:(CGFloat)progress; -(void)fus_setScrollProgress:(CGFloat)progress;
-(void)fus_setNormalItemImageNames:(NSArray *)itemImageNamesList; /// 返回高度
+(CGFloat)fus_barHeight;
-(void)fus_setSelectedItemImageNames:(NSArray *)itemImageNamesList;
@end @end
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
@property (nonatomic, strong) UIImageView *bgImageView; @property (nonatomic, strong) UIImageView *bgImageView;
@property (nonatomic, strong) NSArray *barItemImageNameList;
@property (nonatomic, strong) NSArray *barItemImageNameWhiteList;
@property (nonatomic, strong) NSArray *barItemSelectedImageNameList;
@property (nonatomic, strong) FUSTopRightBadgeButton *homeBtn; @property (nonatomic, strong) FUSTopRightBadgeButton *homeBtn;
@property (nonatomic, strong) FUSTopRightBadgeButton *myBtn; @property (nonatomic, strong) FUSTopRightBadgeButton *myBtn;
@property (nonatomic, strong) FUSTopRightBadgeButton *messageBtn; @property (nonatomic, strong) FUSTopRightBadgeButton *messageBtn;
...@@ -28,11 +32,21 @@ ...@@ -28,11 +32,21 @@
{ {
self = [super init]; self = [super init];
if (self) { if (self) {
[self fus_setupPropeties];
[self fus_createUI]; [self fus_createUI];
} }
return self; return self;
} }
-(void)fus_setupPropeties{
_currentIndex = 1;
self.shouldBarCenterTransparency = NO;
self.barItemImageNameList = @[@"fus_tabbar_item_my_unselect", @"fus_tabbar_item_home_unselect", @"fus_tabbar_item_message_unselect"];
self.barItemImageNameWhiteList = @[@"fus_tabbar_item_my_white", @"fus_tabbar_item_home_unselect", @"fus_tabbar_item_message_white"];
self.barItemSelectedImageNameList = @[@"fus_tabbar_item_my_select", @"fus_tabbar_item_home_select", @"fus_tabbar_item_message_select"];
}
-(void)fus_createUI{ -(void)fus_createUI{
self.backgroundColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor];
...@@ -92,7 +106,6 @@ ...@@ -92,7 +106,6 @@
self.homeBtn.selected = YES; self.homeBtn.selected = YES;
self.bgImageView.alpha = 0; self.bgImageView.alpha = 0;
_currentIndex = 1;
self.btnList = [[NSMutableArray alloc] initWithArray:@[self.myBtn, self.homeBtn, self.messageBtn]]; self.btnList = [[NSMutableArray alloc] initWithArray:@[self.myBtn, self.homeBtn, self.messageBtn]];
...@@ -100,6 +113,30 @@ ...@@ -100,6 +113,30 @@
[self.messageBtn fus_setBadgeValue:99]; [self.messageBtn fus_setBadgeValue:99];
} }
-(void)fus_reloadBarUI{
NSArray *normalBtnImgNamesList = self.barItemImageNameList;
if (self.shouldBarCenterTransparency && _currentIndex == 1) {
normalBtnImgNamesList = self.barItemImageNameWhiteList;
self.bgImageView.alpha = 0;
}else {
self.bgImageView.alpha = 1;
}
for (int i = 0; i < self.btnList.count; i++) {
UIButton *tempBtn = self.btnList[i];
[tempBtn setImage:[UIImage imageNamed:normalBtnImgNamesList[i]] forState:UIControlStateNormal];
[tempBtn setImage:[UIImage imageNamed:self.barItemSelectedImageNameList[i]] forState:UIControlStateSelected];
if (i == _currentIndex) {
tempBtn.selected = YES;
}else {
tempBtn.selected = NO;
}
}
}
#pragma mark --- method #pragma mark --- method
-(void)fus_setSelect:(NSInteger)index autoCall:(BOOL)autoCall{ -(void)fus_setSelect:(NSInteger)index autoCall:(BOOL)autoCall{
...@@ -118,42 +155,28 @@ ...@@ -118,42 +155,28 @@
} }
} }
self.bgImageView.alpha = !(index == 1); // self.bgImageView.alpha = !(index == 1);
[self fus_reloadBarUI];
} }
- (void)fus_setScrollProgress:(CGFloat)progress{ - (void)fus_setScrollProgress:(CGFloat)progress{
//不使用渐变
if (progress > 2 || progress < 0) { // if (progress > 2 || progress < 0) {
return; // return;
} // }
//
if (progress < 1) { // if (progress < 1) {
self.bgImageView.alpha = fabs(1 - progress); // self.bgImageView.alpha = fabs(1 - progress);
}else if (progress > 1) { // }else if (progress > 1) {
self.bgImageView.alpha = fabs(progress - 1); // self.bgImageView.alpha = fabs(progress - 1);
}else { // }else {
self.bgImageView.alpha = 0; // self.bgImageView.alpha = 0;
} // }
}
- (void)fus_setNormalItemImageNames:(NSArray *)itemImageNamesList{
if (itemImageNamesList.count != self.btnList.count) {
return;
}
for (int i = 0; i < itemImageNamesList.count; i++) {
UIButton *tempBtn = self.btnList[i];
[tempBtn setImage:[UIImage imageNamed:itemImageNamesList[i]] forState:UIControlStateNormal];
}
} }
- (void)fus_setSelectedItemImageNames:(NSArray *)itemImageNamesList{ + (CGFloat)fus_barHeight{
if (itemImageNamesList.count != self.btnList.count) { return UIView.fus_tabbarHeight;
return;
}
for (int i = 0; i < itemImageNamesList.count; i++) {
UIButton *tempBtn = self.btnList[i];
[tempBtn setImage:[UIImage imageNamed:itemImageNamesList[i]] forState:UIControlStateSelected];
}
} }
#pragma mark --- button did clickde #pragma mark --- button did clickde
...@@ -162,4 +185,10 @@ ...@@ -162,4 +185,10 @@
[self fus_setSelect:btn.tag autoCall:YES]; [self fus_setSelect:btn.tag autoCall:YES];
} }
#pragma mark --- setter
- (void)setShouldBarCenterTransparency:(BOOL)shouldBarCenterTransparency{
_shouldBarCenterTransparency = shouldBarCenterTransparency;
[self fus_reloadBarUI];
}
@end @end
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#import "UIViewController+FUSExpand.h" #import "UIViewController+FUSExpand.h"
#import "FUSLiveHelper.h" #import "FUSLiveHelper.h"
#import "FUSZhaiXinDBOperate.h" #import "FUSZhaiXinDBOperate.h"
#import "FUSChatIntimacyView.h" #import "FUSChatIntimacyV2View.h"
#import "FUSReportViewController.h" #import "FUSReportViewController.h"
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
@property (nonatomic, strong) NSArray *englishArr; @property (nonatomic, strong) NSArray *englishArr;
// 亲密度进度条 // 亲密度进度条
@property (nonatomic, strong) FUSChatIntimacyView *intimacyView; @property (nonatomic, strong) FUSChatIntimacyV2View *intimacyView;
// 发送消息的提示语 // 发送消息的提示语
@property (nonatomic, strong) FUSTipSendChatPaidOrGainView *tipSendChatPaidOrGainView; @property (nonatomic, strong) FUSTipSendChatPaidOrGainView *tipSendChatPaidOrGainView;
...@@ -213,12 +213,12 @@ ...@@ -213,12 +213,12 @@
#pragma mark - Lazy Load #pragma mark - Lazy Load
- (FUSChatIntimacyView *)intimacyView { - (FUSChatIntimacyV2View *)intimacyView {
if (FUSConfig.sharedInstanced.devConfigs.appStatus) { if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
return nil; return nil;
} }
if (!_intimacyView) { if (!_intimacyView) {
_intimacyView = [[FUSChatIntimacyView alloc] initWithFrame:CGRectMake(0, -28, 106, 28)]; _intimacyView = [[FUSChatIntimacyV2View alloc] initWithFrame:CGRectMake(0, -38, 135, 38)];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_hideIntimacyView)]; UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_hideIntimacyView)];
[_intimacyView addGestureRecognizer:tapGesture]; [_intimacyView addGestureRecognizer:tapGesture];
_intimacyView.centerX = UIView.fus_screenW / 2.0f; _intimacyView.centerX = UIView.fus_screenW / 2.0f;
...@@ -527,7 +527,7 @@ ...@@ -527,7 +527,7 @@
{ {
_navTitleBtn = [FUSButton buttonWithType:UIButtonTypeCustom]; _navTitleBtn = [FUSButton buttonWithType:UIButtonTypeCustom];
[_navTitleBtn setTitle:_talkName forState:UIControlStateNormal]; [_navTitleBtn setTitle:_talkName forState:UIControlStateNormal];
[_navTitleBtn setTitleColor:[UIColor colorWithHex:@"#E3E3E3"] forState:UIControlStateNormal]; [_navTitleBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
_navTitleBtn.titleLabel.font = [UIFont fus_themeFont:18]; _navTitleBtn.titleLabel.font = [UIFont fus_themeFont:18];
[_navTitleBtn addTarget:self action:@selector(fus_onClickNavTitleView) forControlEvents:UIControlEventTouchUpInside]; [_navTitleBtn addTarget:self action:@selector(fus_onClickNavTitleView) forControlEvents:UIControlEventTouchUpInside];
[_navTitleBtn sizeToFit]; [_navTitleBtn sizeToFit];
...@@ -537,7 +537,7 @@ ...@@ -537,7 +537,7 @@
FUSButton *backButton = [FUSButton buttonWithType:UIButtonTypeCustom]; FUSButton *backButton = [FUSButton buttonWithType:UIButtonTypeCustom];
backButton.frame = CGRectMake(0, 0, 44, 44); backButton.frame = CGRectMake(0, 0, 44, 44);
UIImage *backImage = [UIImage imageNamed:[FUSRTL RTLImageName:@"common_navigation_back_white"]]; UIImage *backImage = [UIImage fus_backImage];
[backButton setImage:backImage forState:UIControlStateNormal]; [backButton setImage:backImage forState:UIControlStateNormal];
backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[backButton addTarget:self action:@selector(fus_onClickNavBackBtn) forControlEvents:UIControlEventTouchUpInside]; [backButton addTarget:self action:@selector(fus_onClickNavBackBtn) forControlEvents:UIControlEventTouchUpInside];
......
//
// FUSChatIntimacyV2View.h
// FuSiLive
//
// Created by aaa on 2024/6/26.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSChatIntimacyV2View : UIView
// 亲密度
@property (nonatomic, assign) NSInteger intimacy;
// 成为亲密好友的亲密度
@property (nonatomic, assign) NSInteger maxIntimacy;
/// 设置亲密度和最大亲密度
/// @param intimacy 亲密度
/// @param maxIntimacy 最大亲密度
- (void)fus_setIntimacyNum:(NSInteger)intimacy maxIntimacy:(NSInteger)maxIntimacy;
/// 更新亲密度
/// @param intimacy 更新之后,亲密度会变成高亮状态
- (void)fus_updateIntimacy:(NSInteger)intimacy;
@end
NS_ASSUME_NONNULL_END
//
// FUSChatIntimacyV2View.m
// FuSiLive
//
// Created by aaa on 2024/6/26.
//
#import "FUSChatIntimacyV2View.h"
@interface FUSChatIntimacyV2View()
@property (nonatomic, strong) UIView *contentView;
/// 亲密度数值
@property (nonatomic, strong) UILabel *intimacyNumLabel;
/// 亲密度,文案
@property (nonatomic, strong) UILabel *intimacyLabel;
/// 进度条背景
@property (nonatomic, strong) UIView *progressBgView;
/// 进度条
@property (nonatomic, strong) UIView *progressTintView;
@end
@implementation FUSChatIntimacyV2View
- (instancetype)init
{
self = [super init];
if (self) {
[self fus_createUI];
}
return self;
}
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self fus_createUI];
}
return self;
}
- (void)layoutSubviews{
[super layoutSubviews];
self.contentView.layer.cornerRadius = self.height / 2.0f;
}
-(void)fus_createUI{
self.contentView = [[UIView alloc] init];
self.contentView.backgroundColor = [UIColor colorWithHex:@"#F3F3F2"];
self.contentView.layer.masksToBounds = YES;
[self addSubview:self.contentView];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
self.intimacyNumLabel = [[UILabel alloc] init];
[self.contentView addSubview:self.intimacyNumLabel];
[self.intimacyNumLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.equalTo(self.contentView.mas_centerY).offset(0);
make.centerX.offset(0);
}];
UIView *intimacyProgressBgView = [[UIView alloc] init];
[self.contentView addSubview:intimacyProgressBgView];
[intimacyProgressBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.contentView.mas_centerY).offset(0);
make.centerX.offset(0);
}];
self.intimacyLabel = [[UILabel alloc] init];
self.intimacyLabel.font = [UIFont fus_themeMediumFont:10];
self.intimacyLabel.textColor = [UIColor fus_themeColor];
self.intimacyLabel.text = [NSString fus_versionLocalString:@"親密度"];
[intimacyProgressBgView addSubview:self.intimacyLabel];
[self.intimacyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.offset(0);
}];
self.progressBgView = [[UIView alloc] init];
self.progressBgView.backgroundColor = [UIColor colorWithHex:@"#666666"];
self.progressBgView.layer.cornerRadius = 2;
self.progressBgView.layer.masksToBounds = YES;
[intimacyProgressBgView addSubview:self.progressBgView];
[self.progressBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(0);
make.centerY.offset(0);
make.left.equalTo(self.intimacyLabel.mas_right).offset(4);
make.size.mas_equalTo(CGSizeMake(36, 4));
}];
self.progressTintView = [[UIView alloc] init];
self.progressTintView.backgroundColor = [UIColor fus_themeColor];
self.progressTintView.layer.cornerRadius = 2;
self.progressTintView.layer.masksToBounds = YES;
[self.progressBgView addSubview:self.progressTintView];
[self.progressTintView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.bottom.offset(0);
make.width.equalTo(self.progressBgView.mas_width).multipliedBy(0.2);
}];
}
#pragma mark --- method
- (void)fus_setIntimacyNum:(NSInteger)intimacy maxIntimacy:(NSInteger)maxIntimacy{
_intimacy = intimacy;
if (maxIntimacy > 0) {
_maxIntimacy = maxIntimacy;
}
[self fus_resetIntimacyUIWithIsUpdate:NO];
}
/// 更新亲密度
/// @param intimacy 更新之后,亲密度会变成高亮状态
- (void)fus_updateIntimacy:(NSInteger)intimacy {
_intimacy = intimacy;
[self fus_resetIntimacyUIWithIsUpdate:YES];
}
/// 刷新亲密度相关的UI
/// @param isUpdated 是否更新亲密度
- (void)fus_resetIntimacyUIWithIsUpdate:(BOOL)isUpdated{
NSString *intimacyStr = @(_intimacy).description;
NSString *maxIntimacyStr = @(_maxIntimacy).description;
CGFloat progress = (CGFloat)_intimacy / (CGFloat)_maxIntimacy;
if (progress > 1) {
progress = 1;
}
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@/%@",intimacyStr,maxIntimacyStr]];
[attr addAttribute:NSFontAttributeName value:[UIFont fus_themeFont:10] range:NSMakeRange(0, attr.string.length)];
[attr addAttribute:NSForegroundColorAttributeName value:[UIColor fus_textColorRich] range:NSMakeRange(0, attr.string.length)];
// 如果发送改变,则把数字的颜色变成高亮
if (progress > 0) {
[attr addAttribute:NSForegroundColorAttributeName value:[UIColor fus_themeColor] range:NSMakeRange(0, intimacyStr.length)];
}
self.intimacyNumLabel.attributedText = attr;
// [self.intimacyNumLabel sizeToFit];
if (progress < 0) {
progress = 0;
}else if (progress > 1){
progress = 1;
}
[self.progressTintView mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.equalTo(self.progressBgView.mas_width).multipliedBy(progress);
}];
}
@end
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
#pragma mark - UI Quick Getters #pragma mark - UI Quick Getters
- (UIImageView *)bgImageView { - (UIImageView *)bgImageView {
if (!_bgImageView) { if (!_bgImageView) {
// _bgImageView = [[UIImageView alloc] initWithImage:[[UIImage imageNamed:@"chat_im_intimacy_bg"] imageByTintColor:[UIColor fus_inpuContentColor]]];
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"chat_im_intimacy_bg"]]; _bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"chat_im_intimacy_bg"]];
_bgImageView.contentMode = UIViewContentModeScaleToFill; _bgImageView.contentMode = UIViewContentModeScaleToFill;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<subviews> <subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" delaysContentTouches="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UEj-kq-Vtv" customClass="FUSIMInputTextView"> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" delaysContentTouches="NO" bouncesZoom="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UEj-kq-Vtv" customClass="FUSIMInputTextView">
<rect key="frame" x="5" y="1" width="260" height="46"/> <rect key="frame" x="5" y="1" width="260" height="46"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" returnKeyType="send"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences" returnKeyType="send"/>
</textView> </textView>
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
<image name="chat_im_Input_emoji_normal" width="21.5" height="21.5"/> <image name="chat_im_Input_emoji_normal" width="21.5" height="21.5"/>
<image name="chat_im_Input_emoji_selected" width="21.5" height="21.5"/> <image name="chat_im_Input_emoji_selected" width="21.5" height="21.5"/>
<image name="chat_im_Input_voiceBtn_HL" width="30" height="30"/> <image name="chat_im_Input_voiceBtn_HL" width="30" height="30"/>
<image name="chat_im_Input_voiceBtn_normal" width="26" height="26"/> <image name="chat_im_Input_voiceBtn_normal" width="17.5" height="20.5"/>
<image name="chat_im_live_inputbar_gift" width="26" height="26"/> <image name="chat_im_live_inputbar_gift" width="26" height="26"/>
</resources> </resources>
</document> </document>
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
_receiveRefuseBtn.hidden = YES; _receiveRefuseBtn.hidden = YES;
_receiveReceiveBtn.hidden = YES; _receiveReceiveBtn.hidden = YES;
_receiveVideoChatLabel.hidden = YES; _receiveVideoChatLabel.hidden = YES;
_verifiedImageView.hidden = !_videoChatModel.hasVerified; // _verifiedImageView.hidden = !_videoChatModel.hasVerified;
_verifiedImageView.hidden = YES;
[self fus_setupSendPrice]; [self fus_setupSendPrice];
switch (self.videoChatModel.chatType) { switch (self.videoChatModel.chatType) {
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
//fusi color //fusi color
self.titleLabel.textColor = [UIColor fus_textColorRich]; self.titleLabel.textColor = [UIColor fus_textColorRich];
_areaBgView.backgroundColor = [UIColor blackColor]; _areaBgView.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
_teleBgView.backgroundColor = [UIColor fus_textInputBackgroundGrayColor]; _teleBgView.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
} }
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
#import "FUSSingleLiveRecordViewController.h" #import "FUSSingleLiveRecordViewController.h"
#import "FUSIMChatService.h" #import "FUSIMChatService.h"
#import "FUSSingleLiveRecordModel.h" #import "FUSSingleLiveRecordModel.h"
#import "FUSSingleLiveRecordTableViewCell.h" #import "FUSSingleLiveRecordV2TableViewCell.h"
#import <MJRefresh/MJRefresh.h> #import <MJRefresh/MJRefresh.h>
#import "FUSMyZoneViewController.h" #import "FUSMyZoneViewController.h"
#import "FUSZhaiXinHttpHelper.h" #import "FUSZhaiXinHttpHelper.h"
#import "FUSSingleLiveGradePopView.h" #import "FUSSingleLiveGradePopView.h"
#define CELL_IDENTIFIER @"FUSSingleLiveRecordTableViewCell" #define CELL_IDENTIFIER @"FUSSingleLiveRecordV2TableViewCell"
@interface FUSSingleLiveRecordViewController ()<UITableViewDelegate,UITableViewDataSource> @interface FUSSingleLiveRecordViewController ()<UITableViewDelegate,UITableViewDataSource>
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
_recordTableView.delegate = self; _recordTableView.delegate = self;
_recordTableView.dataSource = self; _recordTableView.dataSource = self;
_recordTableView.backgroundColor = UIColor.fus_appBGColor; _recordTableView.backgroundColor = UIColor.fus_appBGColor;
[_recordTableView registerNib:[UINib nibWithNibName:CELL_IDENTIFIER bundle:nil] forCellReuseIdentifier:CELL_IDENTIFIER]; // [_recordTableView registerNib:[UINib nibWithNibName:CELL_IDENTIFIER bundle:nil] forCellReuseIdentifier:CELL_IDENTIFIER];
[_recordTableView registerClass:[FUSSingleLiveRecordV2TableViewCell class] forCellReuseIdentifier:CELL_IDENTIFIER];
// 设置分割线隐藏 // 设置分割线隐藏
_recordTableView.separatorStyle = UITableViewCellSeparatorStyleNone; _recordTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
// 调整内边距 // 调整内边距
...@@ -106,9 +107,9 @@ ...@@ -106,9 +107,9 @@
FUSButton *backButton = [FUSButton buttonWithType:UIButtonTypeCustom]; FUSButton *backButton = [FUSButton buttonWithType:UIButtonTypeCustom];
backButton.frame = CGRectMake(0, 0, 44, 44); backButton.frame = CGRectMake(0, 0, 44, 44);
UIImage *backImage = [UIImage imageNamed:[FUSRTL RTLImageName:@"common_navigation_back_white"]]; UIImage *backImage = [UIImage fus_backImage];
[backButton setImage:backImage forState:UIControlStateNormal]; [backButton setImage:backImage forState:UIControlStateNormal];
backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; // backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
[backButton addTarget:self action:@selector(onClickNavBackBtn) forControlEvents:UIControlEventTouchUpInside]; [backButton addTarget:self action:@selector(onClickNavBackBtn) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
...@@ -198,12 +199,13 @@ ...@@ -198,12 +199,13 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
return 90; // return 90;
return 102;
} }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
FUSSingleLiveRecordTableViewCell *recordCell = [tableView dequeueReusableCellWithIdentifier:CELL_IDENTIFIER]; FUSSingleLiveRecordV2TableViewCell *recordCell = [tableView dequeueReusableCellWithIdentifier:CELL_IDENTIFIER];
FUSSingleLiveRecordModel *recordModel = _singleLiveArr[indexPath.row]; FUSSingleLiveRecordModel *recordModel = _singleLiveArr[indexPath.row];
recordCell.recordModel = recordModel; recordCell.recordModel = recordModel;
......
//
// FUSSingleLiveRecordV2TableViewCell.h
// FuSiLive
//
// Created by aaa on 2024/6/26.
//
#import <UIKit/UIKit.h>
#import "FUSSingleLiveRecordModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSSingleLiveRecordV2TableViewCell : UITableViewCell
@property (nonatomic,strong) FUSSingleLiveRecordModel *recordModel;
@property (nonatomic,copy) void(^commentBtnClickBlock)(NSString *orderId);
@end
NS_ASSUME_NONNULL_END
...@@ -754,28 +754,30 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega ...@@ -754,28 +754,30 @@ class FUSZoneUserInfoEditViewController: FUSBaseViewController, UITextViewDelega
self.faceImageView.setWebImageWithSubURLString(self.authFace, placeholder: UIImage(named: "icon_head_default")) self.faceImageView.setWebImageWithSubURLString(self.authFace, placeholder: UIImage(named: "icon_head_default"))
} }
if authState == 2 { // if authState == 2 {
self.verifyBtn.isHidden = false // self.verifyBtn.isHidden = false
self.verifyBtn.setImage(UIImage.init(named: "baofang_vchat_verified_img"), for: UIControl.State.normal) // self.verifyBtn.setImage(UIImage.init(named: "baofang_vchat_verified_img"), for: UIControl.State.normal)
self.verifyBtn.setTitle(nil, for: UIControl.State.normal) // self.verifyBtn.setTitle(nil, for: UIControl.State.normal)
self.verifyBtn.layer.borderWidth = 0 // self.verifyBtn.layer.borderWidth = 0
self.verifyBtn.layer.cornerRadius = 0 // self.verifyBtn.layer.cornerRadius = 0
self.verifyBtn.layer.masksToBounds = false // self.verifyBtn.layer.masksToBounds = false
self.verifyBtnWidthConstraint.constant = 38 // self.verifyBtnWidthConstraint.constant = 38
} else if authState == 1 { // } else if authState == 1 {
self.verifyBtn.isHidden = false // self.verifyBtn.isHidden = false
self.verifyBtn.setImage(nil, for: UIControl.State.normal) // self.verifyBtn.setImage(nil, for: UIControl.State.normal)
let title:NSString = FUSLocalizationHelper.localString("认证中") as NSString // let title:NSString = FUSLocalizationHelper.localString("认证中") as NSString
let size = title.size(with: self.verifyBtn.titleLabel?.font, maxWidth: 1000) // let size = title.size(with: self.verifyBtn.titleLabel?.font, maxWidth: 1000)
self.verifyBtnWidthConstraint.constant = size.width + 10 // self.verifyBtnWidthConstraint.constant = size.width + 10
self.verifyBtn.setTitle(title as String, for: UIControl.State.normal) // self.verifyBtn.setTitle(title as String, for: UIControl.State.normal)
self.verifyBtn.layer.borderWidth = 0.5 // self.verifyBtn.layer.borderWidth = 0.5
self.verifyBtn.layer.borderColor = UIColor.init(hex: "#FFA3B9")?.cgColor // self.verifyBtn.layer.borderColor = UIColor.init(hex: "#FFA3B9")?.cgColor
self.verifyBtn.layer.cornerRadius = self.verifyBtn.height / 2.0 // self.verifyBtn.layer.cornerRadius = self.verifyBtn.height / 2.0
self.verifyBtn.layer.masksToBounds = true // self.verifyBtn.layer.masksToBounds = true
} else { // } else {
// self.verifyBtn.isHidden = true
// }
//fusi没有
self.verifyBtn.isHidden = true self.verifyBtn.isHidden = true
}
}, failure: { }, failure: {
(msg:String?) in (msg:String?) in
FUSDialogView.fus_showDialog(msg) FUSDialogView.fus_showDialog(msg)
......
...@@ -127,11 +127,12 @@ ...@@ -127,11 +127,12 @@
} }
} }
if (![NSDictionary isNull:zoneModel.chatWith] && [zoneModel.chatWith[@"videoAuthState"] integerValue] == 2) { // if (![NSDictionary isNull:zoneModel.chatWith] && [zoneModel.chatWith[@"videoAuthState"] integerValue] == 2) {
self.verifiedImageView.hidden = NO; // self.verifiedImageView.hidden = NO;
} else { // } else {
// self.verifiedImageView.hidden = YES;
// }
self.verifiedImageView.hidden = YES; self.verifiedImageView.hidden = YES;
}
} }
- (void)cleanCell { - (void)cleanCell {
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="fus_startSplash_logo_image_v1.png" translatesAutoresizingMaskIntoConstraints="NO" id="gnB-ZF-qMi"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="fus_startSplash_logo_image.png" translatesAutoresizingMaskIntoConstraints="NO" id="gnB-ZF-qMi">
<rect key="frame" x="10" y="219" width="373" height="278"/> <rect key="frame" x="10" y="219" width="373" height="278"/>
<constraints> <constraints>
<constraint firstAttribute="width" secondItem="gnB-ZF-qMi" secondAttribute="height" multiplier="393:293" id="lQc-ZD-oa2"/> <constraint firstAttribute="width" secondItem="gnB-ZF-qMi" secondAttribute="height" multiplier="393:293" id="lQc-ZD-oa2"/>
...@@ -47,6 +47,6 @@ ...@@ -47,6 +47,6 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="fus_startSplash_logo_image_v1.png" width="1263" height="941"/> <image name="fus_startSplash_logo_image.png" width="1263" height="941"/>
</resources> </resources>
</document> </document>
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