Commit 187f7b27 by suolong

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive…

Merge branch 'feature/v57版本pk迁移' of http://git.yabolive.net:88/pidan/FuSiLive into feature/v57版本pk迁移
parents b0a199bf eb0c88ef
Showing with 209 additions and 175 deletions
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
//#import <TencentOpenAPI/QQApiInterface.h> //#import <TencentOpenAPI/QQApiInterface.h>
#import <mob_sharesdk/WXApi.h> #import <mob_sharesdk/WXApi.h>
//#import <FBSDKCoreKit/FBSDKProfile.h> //#import <FBSDKCoreKit/FBSDKProfile.h>
#import <Masonry/Masonry.h>
@interface FUSWKWebViewController () @interface FUSWKWebViewController ()
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
- (void)viewDidAppear:(BOOL)animated{ - (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated]; [super viewDidAppear:animated];
self.webView.frame = self.view.bounds; // self.webView.frame = self.view.bounds;
} }
- (void)viewWillAppear:(BOOL)animated{ - (void)viewWillAppear:(BOOL)animated{
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
- (void)viewDidLayoutSubviews { - (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews]; [super viewDidLayoutSubviews];
self.webView.frame = self.view.bounds; // self.webView.frame = self.view.bounds;
} }
- (void)viewDidDisappear:(BOOL)animated { - (void)viewDidDisappear:(BOOL)animated {
...@@ -127,6 +128,9 @@ ...@@ -127,6 +128,9 @@
self.webView.backgroundColor = [UIColor clearColor]; self.webView.backgroundColor = [UIColor clearColor];
self.webView.opaque = NO; self.webView.opaque = NO;
[self.view addSubview:self.webView]; [self.view addSubview:self.webView];
[self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
if (_shouldShowShareBtn) { if (_shouldShowShareBtn) {
// 显示分享按钮 // 显示分享按钮
UIButton *shareBtn = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *shareBtn = [UIButton buttonWithType:UIButtonTypeCustom];
...@@ -238,7 +242,7 @@ ...@@ -238,7 +242,7 @@
#pragma mark - 配置WebView #pragma mark - 配置WebView
- (void)configWebView { - (void)configWebView {
self.webView.frame = self.view.bounds; // self.webView.frame = self.view.bounds;
_webView.shouldIncludeIdentifyInfo = self.shouldIncludeIdentifyInfo; _webView.shouldIncludeIdentifyInfo = self.shouldIncludeIdentifyInfo;
_webView.webUrlString = self.webUrlString; _webView.webUrlString = self.webUrlString;
_webView.clearCache = self.clearCache; _webView.clearCache = self.clearCache;
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_pk_control_pkMode_1v1_bigIcon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_pk_control_pkMode_1v1_bigIcon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -119,6 +119,9 @@ ...@@ -119,6 +119,9 @@
//是否在PK //是否在PK
@property (nonatomic, strong) NSString *isPk; @property (nonatomic, strong) NSString *isPk;
/// pk类型 0:普通\1:选秀
@property (nonatomic, assign) NSInteger pkShow;
@property (nonatomic, copy) NSArray<NSString *> *tag; @property (nonatomic, copy) NSArray<NSString *> *tag;
// 是否已经结束了直播 // 是否已经结束了直播
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
///pk标识动画 ///pk标识动画
@property (nonatomic, strong) FUSPKLiveAnimateImageView *PKAnimationImageView; @property (nonatomic, strong) FUSPKLiveAnimateImageView *PKAnimationImageView;
@property (nonatomic, strong) YYAnimatedImageView *pkShowAnimationImageView;
///底部的阴影View ///底部的阴影View
@property (nonatomic, strong) UIImageView *bottomAlphaBgView; @property (nonatomic, strong) UIImageView *bottomAlphaBgView;
...@@ -110,6 +112,14 @@ ...@@ -110,6 +112,14 @@
make.top.equalTo(self.hotNumBtn.mas_top); make.top.equalTo(self.hotNumBtn.mas_top);
}]; }];
self.pkShowAnimationImageView = [[YYAnimatedImageView alloc] init];
[self.contentView addSubview:self.pkShowAnimationImageView];
[self.pkShowAnimationImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.equalTo(self.PKAnimationImageView.mas_height).multipliedBy(0.9 / 90.0 * 150.0);
make.width.equalTo(self.pkShowAnimationImageView.mas_width).multipliedBy(1.0 / 150.0 * 400.0);
make.center.equalTo(self.PKAnimationImageView);
}];
self.hotNumBtn.hidden = YES; self.hotNumBtn.hidden = YES;
self.locationBtn.hidden = YES; self.locationBtn.hidden = YES;
} }
...@@ -123,6 +133,8 @@ ...@@ -123,6 +133,8 @@
[self.tagView fus_stopAllTagsAnim]; [self.tagView fus_stopAllTagsAnim];
self.PKAnimationImageView.hidden = YES; self.PKAnimationImageView.hidden = YES;
[self.PKAnimationImageView stopAnimating]; [self.PKAnimationImageView stopAnimating];
self.pkShowAnimationImageView.hidden = YES;
} }
- (void)fus_quickLiveRoom { - (void)fus_quickLiveRoom {
...@@ -130,12 +142,16 @@ ...@@ -130,12 +142,16 @@
[self.tagView fus_startAllTagsAnim]; [self.tagView fus_startAllTagsAnim];
//pk动画 //pk动画
if (self.model.pkShow == 1) {
self.pkShowAnimationImageView.hidden = NO;
self.PKAnimationImageView.hidden = YES;
}
else {
if (self.model.isPk.boolValue) { if (self.model.isPk.boolValue) {
self.PKAnimationImageView.hidden = NO; self.PKAnimationImageView.hidden = NO;
[self.PKAnimationImageView startAnimating]; [self.PKAnimationImageView startAnimating];
} else { self.pkShowAnimationImageView.hidden = YES;
self.PKAnimationImageView.hidden = YES; }
[self.PKAnimationImageView stopAnimating];
} }
} }
...@@ -184,12 +200,18 @@ ...@@ -184,12 +200,18 @@
self.tagView.hidden = NO; self.tagView.hidden = NO;
[self.tagView fus_refreshTagImagesWithModel:model]; [self.tagView fus_refreshTagImagesWithModel:model];
// pk动画
self.PKAnimationImageView.hidden = YES;
[self.PKAnimationImageView stopAnimating];
self.pkShowAnimationImageView.hidden = YES;
if (model.pkShow == 1) {
self.pkShowAnimationImageView.hidden = NO;
}
else {
if (model.isPk.boolValue) { if (model.isPk.boolValue) {
self.PKAnimationImageView.hidden = NO; self.PKAnimationImageView.hidden = NO;
[self.PKAnimationImageView startAnimating]; [self.PKAnimationImageView startAnimating];
} else { }
self.PKAnimationImageView.hidden = YES;
[self.PKAnimationImageView stopAnimating];
} }
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
......
...@@ -9,11 +9,15 @@ ...@@ -9,11 +9,15 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FUSPKLiveAnimateImageView : UIImageView @interface FUSPKLiveAnimateImageView : UIView
/// 高亮时开始播放动画 /// 高亮时开始播放动画
@property (nonatomic, assign) BOOL startAnimWhenHighlighted; @property (nonatomic, assign) BOOL startAnimWhenHighlighted;
-(void)startAnimating;
-(void)stopAnimating;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
// //
#import "FUSPKLiveAnimateImageView.h" #import "FUSPKLiveAnimateImageView.h"
#import <Masonry/Masonry.h>
@interface FUSPKLiveAnimateImageView()
@property (nonatomic, strong) UIImageView *imageView;
@end
@implementation FUSPKLiveAnimateImageView @implementation FUSPKLiveAnimateImageView
...@@ -30,32 +37,55 @@ ...@@ -30,32 +37,55 @@
return self; return self;
} }
- (void)setHighlighted:(BOOL)highlighted
{
[super setHighlighted:highlighted];
if (self.startAnimWhenHighlighted) {
[self startAnimating];
}
}
- (void)fus_initial { - (void)fus_initial {
self.startAnimWhenHighlighted = YES; self.startAnimWhenHighlighted = YES;
self.imageView.contentMode = UIViewContentModeScaleAspectFit;
NSMutableArray *imageArr = [NSMutableArray array]; NSMutableArray *imageArr = [NSMutableArray array];
for (int i = 1; i <= 19; i++) { for (int i = 0; i < 40; i++) {
UIImage *image = [FUSShowRoomCenterBunble imageNamed:[NSString stringWithFormat:@"PK_Cover_Animation_%d",i]]; UIImage *image = [FUSShowRoomCenterBunble imageNamed:[NSString stringWithFormat:@"PK_Cover_Animation_%d",i]];
if (image) { if (image) {
[imageArr addObject:image]; [imageArr addObject:image];
} }
} }
for (int i = 0; i < (NSInteger)(12 * 2); i++) { // for (int i = 0; i < (NSInteger)(12 * 2); i++) {
UIImage *image = [FUSShowRoomCenterBunble imageNamed:@"PK_Cover_Animation_19"]; // UIImage *image = [HomeListBundle imageNamed:@"PK_Cover_Animation_19"];
if (image) { // if (image) {
[imageArr addObject:image]; // [imageArr addObject:image];
} // }
// }
self.imageView.animationImages = imageArr;
self.imageView.animationDuration = imageArr.count / 12;
}
- (void)layoutSubviews{
[super layoutSubviews];
self.backgroundColor = [UIColor colorWithHex:@"#000000" alpha:0.24];
self.layer.cornerRadius = self.height / 2.0f;
self.layer.masksToBounds = YES;
}
- (void)startAnimating{
[self.imageView startAnimating];
}
- (void)stopAnimating{
[self.imageView stopAnimating];
}
- (UIImageView *)imageView{
if (!_imageView) {
_imageView = [[UIImageView alloc] init];
[self addSubview:_imageView];
[_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self).inset(-2);
}];
} }
self.animationImages = imageArr; return _imageView;
self.animationDuration = imageArr.count / 12;
} }
//- (void)setStartAnimWhenHighlighted:(BOOL)startAnimWhenHighlighted{
// self.imageView.startAnimWhenHighlighted = startAnimWhenHighlighted;
//}
@end @end
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#import "FUSScreenShotShareView.h" #import "FUSScreenShotShareView.h"
#import "FUSBottomOptionalView.h" #import "FUSBottomOptionalView.h"
#import "FUSLiveGameListView.h"
#import "FUSLiveAnchorSettingAlertView.h" #import "FUSLiveAnchorSettingAlertView.h"
#import "FUSSocketMessageDelegate.h" #import "FUSSocketMessageDelegate.h"
......
...@@ -125,11 +125,13 @@ import RxCocoa ...@@ -125,11 +125,13 @@ import RxCocoa
titleLabel.font = .fus_themeFont(18) titleLabel.font = .fus_themeFont(18)
titleLabel.textColor = .black titleLabel.textColor = .black
titleLabel.text = " " // titleLabel.text = " "
contentView.addSubview(titleLabel) contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.top.equalToSuperview().offset(28.5) make.top.equalToSuperview().offset(28.5)
// 暂时不要标题了
make.height.equalTo(0)
} }
self.collectionView.backgroundColor = .clear self.collectionView.backgroundColor = .clear
...@@ -157,20 +159,24 @@ import RxCocoa ...@@ -157,20 +159,24 @@ import RxCocoa
func fus_reloadUI(){ func fus_reloadUI(){
// if FFSwiftLiveHelper.shared.liveType == FFLiveType.Anchor { // if self.collectionItemList.map({ $0.type }).contains(.broadcastFunction) {
if self.collectionItemList.map({ $0.type }).contains(.broadcastFunction) { // self.titleLabel.text = .fus_versionLocalString("主播工具")
self.titleLabel.text = .fus_versionLocalString("主播工具") // }else {
}else { // self.titleLabel.text = .fus_versionLocalString("房间工具")
self.titleLabel.text = .fus_versionLocalString("房间工具") // }
}
let titleHeight = 28.5 + 18 // let titleHeight = 28.5 + 18
let titleHeight = 28.5
var collectionViewHeight: CGFloat = 0 var collectionViewHeight: CGFloat = 0
// 算出每一行的高度 // 算出每一行的高度
for sectionModel in self.collectionItemList { for sectionModel in self.collectionItemList {
let itemLine = sectionModel.functionList.count/4 + (sectionModel.functionList.count%4 > 0 ? 1 : 0) let itemLine = sectionModel.functionList.count/4 + (sectionModel.functionList.count%4 > 0 ? 1 : 0)
collectionViewHeight = collectionViewHeight + itemHeaderHeight + CGFloat(itemLine)*itemHeight collectionViewHeight = collectionViewHeight + itemHeaderHeight + CGFloat(itemLine)*itemHeight
} }
if self.collectionItemList.count <= 1 {
// 只有一个的时候不要标题
collectionViewHeight = collectionViewHeight - itemHeaderHeight
}
let contentViewHeight = titleHeight + collectionViewHeight + UIView.fus_SafeBottom() let contentViewHeight = titleHeight + collectionViewHeight + UIView.fus_SafeBottom()
let contentViewY = self.alertViewDidShow ? UIView.fus_screenH() - contentViewHeight : UIView.fus_screenH() let contentViewY = self.alertViewDidShow ? UIView.fus_screenH() - contentViewHeight : UIView.fus_screenH()
...@@ -349,10 +355,18 @@ extension FUSLiveChatInputToolAlertView: UICollectionViewDelegate, UICollectionV ...@@ -349,10 +355,18 @@ extension FUSLiveChatInputToolAlertView: UICollectionViewDelegate, UICollectionV
} }
public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
if self.collectionItemList.count <= 1 {
return .zero
}
return CGSizeMake(UIView.fus_screenW(), itemHeaderHeight) return CGSizeMake(UIView.fus_screenW(), itemHeaderHeight)
} }
public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
if self.collectionItemList.count <= 1 {
return UICollectionReusableView()
}
if kind == UICollectionView.elementKindSectionHeader { if kind == UICollectionView.elementKindSectionHeader {
let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: FUSLiveGameListViewHeader.headerId, for: indexPath) as! FUSLiveGameListViewHeader let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: FUSLiveGameListViewHeader.headerId, for: indexPath) as! FUSLiveGameListViewHeader
header.titleLabel.text = self.collectionItemList[indexPath.section].type.fus_getSectionName() header.titleLabel.text = self.collectionItemList[indexPath.section].type.fus_getSectionName()
...@@ -418,7 +432,8 @@ extension FUSLiveBottomToolType{ ...@@ -418,7 +432,8 @@ extension FUSLiveBottomToolType{
case FUSLiveBottomToolTypeGift: case FUSLiveBottomToolTypeGift:
return FUSShowRoomCenterBunble.versionImageNamed("img_liveroom_input_gift") return FUSShowRoomCenterBunble.versionImageNamed("img_liveroom_input_gift")
case FUSLiveBottomToolTypeLiveSetting: case FUSLiveBottomToolTypeLiveSetting:
return FUSShowRoomCenterBunble.versionImageNamed(isSelect ? "live_chat_icon_live_setting_hl" : "live_chat_icon_live_setting") // return FUSShowRoomCenterBunble.versionImageNamed(isSelect ? "live_chat_icon_live_setting_hl" : "live_chat_icon_live_setting")
return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_tool_anchor_setting_pressed" : "live_tool_anchor_setting_normal")
case FUSLiveBottomToolTypeScreenShot: case FUSLiveBottomToolTypeScreenShot:
return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_chat_tool_screenshot_highlight" : "live_chat_tool_screenshot_normal") return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_chat_tool_screenshot_highlight" : "live_chat_tool_screenshot_normal")
case FUSLiveBottomToolTypeMessageBox: case FUSLiveBottomToolTypeMessageBox:
...@@ -456,7 +471,8 @@ extension FUSLiveBottomToolType{ ...@@ -456,7 +471,8 @@ extension FUSLiveBottomToolType{
// case FUSLiveBottomToolTypeOpenRoom: // case FUSLiveBottomToolTypeOpenRoom:
// return FUSShowRoomCenterBunble.versionImageNamed(isSelect ? "live_tool_open_room_pressed" : "live_tool_open_room_normal") // return FUSShowRoomCenterBunble.versionImageNamed(isSelect ? "live_tool_open_room_pressed" : "live_tool_open_room_normal")
case FUSLiveBottomToolTypeRoomSetting: case FUSLiveBottomToolTypeRoomSetting:
return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_tool_anchor_setting_pressed" : "live_tool_anchor_setting_normal") // return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_tool_anchor_setting_pressed" : "live_tool_anchor_setting_normal")
return FUSShowRoomCenterBunble.versionImageNamed(isSelect ? "live_chat_icon_live_setting_hl" : "live_chat_icon_live_setting")
case FUSLiveBottomToolTypeStartPictureInPicture: case FUSLiveBottomToolTypeStartPictureInPicture:
return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_tool_start_pic_in_pic_btn" : "live_tool_start_pic_in_pic_btn") return FUSShowRoomCenterBunble.imageNamed(isSelect ? "live_tool_start_pic_in_pic_btn" : "live_tool_start_pic_in_pic_btn")
// case .novaBuild: // case .novaBuild:
......
...@@ -33,12 +33,12 @@ class FUSLiveGameListViewHeader: UICollectionReusableView { ...@@ -33,12 +33,12 @@ class FUSLiveGameListViewHeader: UICollectionReusableView {
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
let lineImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_game_list_header_line")) // let lineImageView = UIImageView(image: FUSShowRoomCenterBunble.versionImageNamed("live_game_list_header_line"))
self.addSubview(lineImageView) // self.addSubview(lineImageView)
lineImageView.snp.makeConstraints { make in // lineImageView.snp.makeConstraints { make in
make.left.equalTo(titleLabel.snp.right).offset(4) // make.left.equalTo(titleLabel.snp.right).offset(4)
make.right.lessThanOrEqualToSuperview().offset(-26) // make.right.lessThanOrEqualToSuperview().offset(-26)
make.centerY.equalTo(titleLabel.snp.centerY) // make.centerY.equalTo(titleLabel.snp.centerY)
} // }
} }
} }
//
// FUSLiveGameListView.h
// FusiClub
//
// Created by pierce on 2024/6/27.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSLiveGameListView : UIView
+ (void)fus_showLiveGameListView;
@end
NS_ASSUME_NONNULL_END
//
// FUSLiveGameListView.m
// FusiClub
//
// Created by pierce on 2024/6/27.
//
#import "FUSLiveGameListView.h"
#import "FUSLiveGameCollectionViewCell.h"
#import "FUSLiveHelper.h"
#import "FUSLiveConfigsDataCenter.h"
#import <Masonry/Masonry.h>
@interface FUSLiveGameListView ()<UICollectionViewDelegate, UICollectionViewDataSource>
/// 关闭按钮
@property (nonatomic, strong) UIButton *closeBtn;
/// 内容的View
@property (nonatomic, strong) UIView *contentView;
/// 列表
@property (nonatomic, strong) UICollectionView *collectionView;
@end
@implementation FUSLiveGameListView
+ (void)fus_showLiveGameListView {
FUSLiveGameListView *gameView = [[FUSLiveGameListView alloc] initWithFrame:UIView.fus_screenFrame];
[[FUSLiveHelper.shareInstance.currentFunctionView fus_viewWithLayer:FUSLiveFunctionLayerManualPopView] addSubview:gameView];
[gameView fus_showWithAnimation];
}
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
self.closeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[self.closeBtn addTarget:self action:@selector(fus_hideWithAnimation) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.closeBtn];
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
self.contentView = [[UIView alloc] initWithFrame:CGRectMake(0, UIView.fus_screenH, UIView.fus_screenW, 98)];
self.contentView.backgroundColor = UIColor.fus_appBGColor;
[self.contentView addRoundedCorners:UIRectCornerTopLeft | UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
[self addSubview:self.contentView];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
layout.itemSize = CGSizeMake(UIView.fus_screenW / 4.0, 98);
self.collectionView = [[UICollectionView alloc] initWithFrame:self.contentView.bounds collectionViewLayout:layout];
self.collectionView.backgroundColor = [UIColor fus_appBGColor];
self.collectionView.delegate = self;
self.collectionView.dataSource = self;
[self.collectionView registerClass:[FUSLiveGameCollectionViewCell class] forCellWithReuseIdentifier:[FUSLiveGameCollectionViewCell cellIdentifer]];
[self.contentView addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
}];
}
return self;
}
- (void)fus_showWithAnimation {
[UIView animateWithDuration:0.3 animations:^{
self.contentView.y = UIView.fus_screenH - self.contentView.height;
}];
}
- (void)fus_hideWithAnimation {
[UIView animateWithDuration:0.3 animations:^{
self.contentView.y = UIView.fus_screenH;
} completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
#pragma mark - UICollectionViewDelegate, UICollectionViewDataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return FUSLiveConfigsDataCenter.shareInstance.gameList.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
FUSLiveGameCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:[FUSLiveGameCollectionViewCell cellIdentifer] forIndexPath:indexPath];
[cell fus_setupWithModel:FUSLiveConfigsDataCenter.shareInstance.gameList[indexPath.row]];
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
FUSLiveGameModel *gameModel = FUSLiveConfigsDataCenter.shareInstance.gameList[indexPath.row];
FUSHalfWebViewModel *halfWebModel = [FUSHalfWebViewModel fus_modelWithDict:gameModel.popupStyle];
[FUSLiveHelper.shareInstance.currentFunctionView fus_showHalfWebView:halfWebModel];
[self fus_hideWithAnimation];
}
@end
//
// FUSLiveGameListViewCell.swift
// FUSShowRoomModule
//
// Created by aaa on 2026/3/6.
//
import UIKit
class FUSLiveGameListViewCell: FUSSwiftCollectionViewCell {
static let cellIdentifier = "FUSLiveGameListViewCell"
let iconImageView = UIImageView(frame: .init(x: 0, y: 0, width: 40, height: 35))
let titleLabel = UILabel(frame: .zero)
public override func makeUI() {
super.makeUI()
self.contentView.backgroundColor = .clear
self.backgroundColor = .clear
self.iconImageView.contentMode = .scaleAspectFit
self.contentView.addSubview(self.iconImageView)
self.iconImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-14)
make.width.equalTo(54)
make.height.equalTo(54)
}
self.titleLabel.font = .fus_themeFont(13)
self.titleLabel.textColor = .fus_textColorRich()
self.titleLabel.textAlignment = .center
self.contentView.addSubview(self.titleLabel)
self.titleLabel.snp.makeConstraints { make in
make.top.equalTo(self.iconImageView.snp.bottom).offset(10)
make.left.right.equalToSuperview()
// make.height.equalTo(10)
}
}
func fus_setup(model:FUSLiveGameModel) {
self.iconImageView.setWebImageWithSubURLString(model.gameIcon)
self.titleLabel.text = model.gameName
}
func fus_setupPlayModel(model: FUSLivePlayModel) {
self.iconImageView.setWebImageWithSubURLString(model.playIcon)
self.titleLabel.text = model.playName
}
}
...@@ -143,7 +143,7 @@ class FUSPKScoreProgressView: FUSBaseView { ...@@ -143,7 +143,7 @@ class FUSPKScoreProgressView: FUSBaseView {
self.progressLightImageView.snp.makeConstraints { make in self.progressLightImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview().offset(-0.5) make.centerY.equalToSuperview().offset(-0.5)
make.centerX.equalTo(self.rightProgress.snp.left).offset(-1.5) make.centerX.equalTo(self.rightProgress.snp.left).offset(0)
} }
self.giftBombProgressLightBgView.snp.makeConstraints { make in self.giftBombProgressLightBgView.snp.makeConstraints { make in
......
...@@ -57,7 +57,8 @@ class FUSPKControlPKModeCell: UICollectionViewCell { ...@@ -57,7 +57,8 @@ class FUSPKControlPKModeCell: UICollectionViewCell {
// make.centerX.equalToSuperview() // make.centerX.equalToSuperview()
// make.centerY.equalToSuperview().offset(-6) // make.centerY.equalToSuperview().offset(-6)
// make.size.equalTo(CGSizeMake(115, 115)) // make.size.equalTo(CGSizeMake(115, 115))
make.top.equalToSuperview() // make.top.equalToSuperview()
make.centerY.equalToSuperview().offset(-12)
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.left.greaterThanOrEqualTo(centerBgView.snp.left) make.left.greaterThanOrEqualTo(centerBgView.snp.left)
make.right.lessThanOrEqualTo(centerBgView.snp.right) make.right.lessThanOrEqualTo(centerBgView.snp.right)
...@@ -123,8 +124,14 @@ class FUSPKControlPKModeCell: UICollectionViewCell { ...@@ -123,8 +124,14 @@ class FUSPKControlPKModeCell: UICollectionViewCell {
self.iconImageView.image = iconImage self.iconImageView.image = iconImage
} }
else { else {
if model.type.intValue == 1 {
self.iconImageView.image = FUSShowRoomCenterBunble.imageNamed("live_pk_control_pkMode_1v1_bigIcon")
}
else {
self.iconImageView.setWebImageWithSubURLString(model.icon) self.iconImageView.setWebImageWithSubURLString(model.icon)
} }
}
self.nameLabel.text = model.name self.nameLabel.text = model.name
......
...@@ -20,7 +20,7 @@ class FUSPKPunishSelectPunishCell: UICollectionViewCell { ...@@ -20,7 +20,7 @@ class FUSPKPunishSelectPunishCell: UICollectionViewCell {
let lockView = UIView() let lockView = UIView()
let otherFaceImageView = UIImageView() let otherFaceImageView = UIImageView()
let otherNickNameLabel = UILabel() let otherNickNameLabel = UILabel()
let selectImageView = UIImageView(image: .fus_selectedIcon()) let selectImageView = UIImageView(image: .fus_selectedIconFillStyle())
let activateLabel = UILabel() let activateLabel = UILabel()
let descBtn = UIButton(type: .custom) let descBtn = UIButton(type: .custom)
......
...@@ -26,7 +26,7 @@ class FUSPKControlPKModeView: FUSPKControlSubBaseView { ...@@ -26,7 +26,7 @@ class FUSPKControlPKModeView: FUSPKControlSubBaseView {
let pkModeCollectionMargin: CGFloat = 18 let pkModeCollectionMargin: CGFloat = 18
let gamePlayItemWidth: CGFloat = 160 let gamePlayItemWidth: CGFloat = 160
let gamePlayItemMargin: CGFloat = 6 let gamePlayItemMargin: CGFloat = 2
override func makeUI() { override func makeUI() {
super.makeUI() super.makeUI()
......
...@@ -177,7 +177,7 @@ class FUSPKScoreProgressLargeSmallView: FUSBaseView { ...@@ -177,7 +177,7 @@ class FUSPKScoreProgressLargeSmallView: FUSBaseView {
self.progressLightImageView.snp.makeConstraints { make in self.progressLightImageView.snp.makeConstraints { make in
make.centerY.equalToSuperview().offset(1) make.centerY.equalToSuperview().offset(1)
make.centerX.equalTo(self.leftProgress.snp.right).offset(-1.5) make.centerX.equalTo(self.leftProgress.snp.right).offset(0)
} }
self.giftBombProgressLightBgView.snp.makeConstraints { make in self.giftBombProgressLightBgView.snp.makeConstraints { make in
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
}]; }];
UIView *lineView = [[UIView alloc] init]; UIView *lineView = [[UIView alloc] init];
lineView.backgroundColor = [UIColor fus_lineColor]; lineView.backgroundColor = [UIColor whiteColor];
[_contentView addSubview:lineView]; [_contentView addSubview:lineView];
[lineView mas_makeConstraints:^(MASConstraintMaker *make) { [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.offset(62); make.top.offset(62);
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
return self.dataSourceList.count; return self.dataSourceList.count;
} }
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 185; return 90;
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewAutomaticDimension; return UITableViewAutomaticDimension;
......
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