首次提交
This commit is contained in:
78
SweetParty/主类/狸猫新增/Sud小游戏/RCMicRoomViewController+Game.h
Executable file
78
SweetParty/主类/狸猫新增/Sud小游戏/RCMicRoomViewController+Game.h
Executable file
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// Created by kaniel on 2022/5/26.
|
||||
// Copyright (c) 2022 Sud.Tech (https://sud.tech). All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCMicRoomViewController.h"
|
||||
/// Model
|
||||
#import "SudMGPWrapper.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// TODO: 登录接入方服务器url
|
||||
#define GAME_LOGIN_URL @"api/Agora/get_code"
|
||||
|
||||
// TODO: 必须填写由SudMGP提供的appId 及 appKey
|
||||
#define SUDMGP_APP_ID @"1907343783408873474"
|
||||
#define SUDMGP_APP_KEY @"ZpyHv1Pw4iZyQQjdbqA36Qu7EEmv29Ok"
|
||||
|
||||
// TODO: 是否是测试环境,生产环境必须设置为NO
|
||||
#if DEBUG
|
||||
#define GAME_TEST_ENV NO
|
||||
#else
|
||||
#define GAME_TEST_ENV NO
|
||||
#endif
|
||||
|
||||
/// 加载SudMGP SDK加载必须的业务参数
|
||||
@interface SudMGPLoadConfigModel : NSObject
|
||||
/// 游戏ID
|
||||
@property (nonatomic, assign)int64_t gameId;
|
||||
/// 房间ID
|
||||
@property (nonatomic, strong)NSString * roomId;
|
||||
/// 当前用户ID
|
||||
@property (nonatomic, strong)NSString * userId;
|
||||
/// 语言 支持简体"zh-CN " 繁体"zh-TW" 英语"en-US" 马来"ms-MY"
|
||||
@property (nonatomic, strong)NSString * language;
|
||||
/// 加载展示视图
|
||||
@property (nonatomic, strong)UIView * gameView;
|
||||
@end
|
||||
|
||||
#pragma mark =======RCMicRoomViewController (Game)=======
|
||||
|
||||
/// 游戏房内处理游戏相关交互逻辑分类
|
||||
@interface RCMicRoomViewController(Game) <SudFSMMGListener>
|
||||
|
||||
/// SudFSMMGDecorator game -> app 辅助接收解析SudMGP SDK抛出的游戏回调事件、获取相关游戏状态模块
|
||||
@property (nonatomic, strong) SudFSMMGDecorator *sudFSMMGDecorator;
|
||||
|
||||
/// SudFSTAPPDecorator app -> game 辅助APP操作游戏相关指令模块
|
||||
@property (nonatomic, strong) SudFSTAPPDecorator *sudFSTAPPDecorator;
|
||||
|
||||
/// 一:创建SudMGPWrapper
|
||||
- (void)createSudMGPWrapper;
|
||||
|
||||
/// 二:游戏登录
|
||||
/// 接入方客户端 调用 接入方服务端 getCode: 获取 短期令牌code
|
||||
/// 参考文档时序图:sud-mgp-doc(https://github.com/SudTechnology/sud-mgp-doc)
|
||||
/// 执行步骤:
|
||||
/// 1. 请求业务服务接口获取游戏初始化SDK需要的code码<getCode>
|
||||
/// 2. 初始化SudMGP SDK<SudMGP initSDK>
|
||||
/// 3. 加载SudMGP SDK<SudMGP loadMG>
|
||||
- (void)loginGame:(SudMGPLoadConfigModel *)configModel;
|
||||
|
||||
/// 三:退出游戏 销毁SudMGP SDK
|
||||
- (void)logoutGame;
|
||||
|
||||
/// 接入方客户端调用接入方服务端获取短期令牌code(getCode)
|
||||
/// { 接入方服务端仓库:https://github.com/SudTechnology/hello-sud-java }
|
||||
/// @param success 成功回调
|
||||
/// @param fail 错误回调
|
||||
- (void)getCode:(NSString *)userId success:(void (^)(NSString *code, NSError *error, int retCode))success fail:(void(^)(NSError *error))fail;
|
||||
|
||||
- (void)handleGameKeywordHitting:(NSString *)content;
|
||||
|
||||
- (void)onSetDefaultCaptain;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
465
SweetParty/主类/狸猫新增/Sud小游戏/RCMicRoomViewController+Game.m
Executable file
465
SweetParty/主类/狸猫新增/Sud小游戏/RCMicRoomViewController+Game.m
Executable file
@@ -0,0 +1,465 @@
|
||||
//
|
||||
// Created by kaniel on 2022/5/26.
|
||||
// Copyright (c) 2022 Sud.Tech (https://sud.tech). All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCMicRoomViewController+Game.h"
|
||||
#import <objc/runtime.h>
|
||||
#import <SudMGP/ISudCfg.h>
|
||||
|
||||
@implementation SudMGPLoadConfigModel
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark =======RCMicRoomViewController (Game)=======
|
||||
|
||||
@implementation RCMicRoomViewController (Game)
|
||||
|
||||
#pragma mark =======初始化 登录 加载 游戏=======
|
||||
|
||||
/// 一:创建SudMGPWrapper
|
||||
- (void)createSudMGPWrapper {
|
||||
//因为企业签,关闭后台下载
|
||||
[[SudMGP getCfg] setBackgroundMode:NO];
|
||||
|
||||
// 构建SudMGPWrapper实例
|
||||
self.sudFSTAPPDecorator = [[SudFSTAPPDecorator alloc] init];
|
||||
self.sudFSMMGDecorator = [[SudFSMMGDecorator alloc] init];
|
||||
// 设置游戏回调监听
|
||||
[self.sudFSMMGDecorator setEventListener:self];
|
||||
}
|
||||
|
||||
/// 二:游戏登录
|
||||
/// 接入方客户端 调用 接入方服务端 getCode: 获取 短期令牌code
|
||||
/// 参考文档时序图:sud-mgp-doc(https://github.com/SudTechnology/sud-mgp-doc)
|
||||
/// 执行步骤:
|
||||
/// 1. 请求业务服务接口获取游戏初始化SDK需要的code码<getCode>
|
||||
/// 2. 初始化SudMGP SDK<SudMGP initSDK>
|
||||
/// 3. 加载SudMGP SDK<SudMGP loadMG>
|
||||
- (void)loginGame:(SudMGPLoadConfigModel *)configModel {
|
||||
NSString *appID = SUDMGP_APP_ID;
|
||||
NSString *appKey = SUDMGP_APP_KEY;
|
||||
if (appID.length == 0 || appKey.length == 0) {
|
||||
NSLog(@"Game appID or appKey is empty");
|
||||
return;
|
||||
}
|
||||
__weak typeof(self) weakSelf = self;
|
||||
// 1. 请求业务服务接口获取游戏初始化SDK需要的code码<reqGameLoginWithSuccess>
|
||||
[self getCode:configModel.userId success:^(NSString *code, NSError *error, int retCode) {
|
||||
[weakSelf initSudMGPSDK:configModel code:code];
|
||||
} fail:^(NSError *error) {
|
||||
NSLog(@"getCode err:%@", error.debugDescription);
|
||||
}];
|
||||
}
|
||||
|
||||
/// 三:退出游戏 销毁SudMGP SDK
|
||||
- (void)logoutGame {
|
||||
// 销毁游戏
|
||||
[self.sudFSMMGDecorator clearAllStates];
|
||||
[self.sudFSTAPPDecorator destroyMG];
|
||||
}
|
||||
|
||||
/// 业务服务接口获取游戏授权code码
|
||||
/// @param success 成功回调
|
||||
/// @param fail 错误回调
|
||||
- (void)getCode:(NSString *)userId success:(void (^)(NSString *code, NSError *error, int retCode))success fail:(void(^)(NSError *error))fail {
|
||||
|
||||
if (userId.length == 0) {
|
||||
if (fail) {
|
||||
fail([NSError errorWithDomain:nil code:-1 userInfo:@{NSDebugDescriptionErrorKey: @"参数错误"}]);
|
||||
}
|
||||
NSLog(@"用户ID不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
NSDictionary *dicParam = @{@"uid": userId, @"login_token":GVUSER.token};
|
||||
[self postHttpRequestWithURL:[NSString stringWithFormat:@"%@%@", VERSION_HTTPS_SERVER, GAME_LOGIN_URL] param:dicParam success:^(NSDictionary *rootDict) {
|
||||
if ([rootDict safeIntForKey:@"code"] == 200) {
|
||||
NSDictionary *dic = [rootDict objectForKey:@"data"];
|
||||
/// 这里的code用于登录游戏sdk服务器
|
||||
NSString *code = [dic objectForKey:@"code"];
|
||||
int retCode = (int) [[dic objectForKey:@"ret_code"] longValue];
|
||||
success(code, nil, retCode);
|
||||
}else {
|
||||
[MBManager showBriefAlert:[rootDict safeStringForKey:@"msg"]];
|
||||
}
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
NSLog(@"login game server error:%@", error.debugDescription);
|
||||
if (fail) {
|
||||
fail(error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
/// 初始化游戏SudMDP SDK
|
||||
- (void)initSudMGPSDK:(SudMGPLoadConfigModel *)configModel code:(NSString *)code {
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
// 确保初始化前不存在已加载的游戏 保证SudMGP initSDK前,销毁SudMGP
|
||||
[self logoutGame];
|
||||
if (configModel.gameId <= 0) {
|
||||
NSLog(@"游戏ID为空,无法加载游戏:%@, currentRoomID:%@", @(configModel.gameId), configModel.roomId);
|
||||
return;
|
||||
}
|
||||
// 2. 初始化SudMGP SDK<SudMGP initSDK>
|
||||
[SudMGP initSDK:SUDMGP_APP_ID
|
||||
appKey:SUDMGP_APP_KEY
|
||||
isTestEnv:GAME_TEST_ENV
|
||||
listener:^(int retCode, const NSString *retMsg) {
|
||||
|
||||
if (retCode != 0) {
|
||||
/// 初始化失败, 可根据业务重试
|
||||
NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@(%@)", retMsg, @(retCode));
|
||||
return;
|
||||
}
|
||||
NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化游戏SDK成功");
|
||||
// 加载游戏SDK
|
||||
[weakSelf loadGame:configModel code:code];
|
||||
}];
|
||||
}
|
||||
|
||||
/// 加载游戏MG
|
||||
/// @param configModel 配置model
|
||||
- (void)loadGame:(SudMGPLoadConfigModel *)configModel code:(NSString *)code {
|
||||
|
||||
NSLog(@"loadMG:userId:%@, gameRoomId:%@, gameId:%@", configModel.userId, configModel.roomId, @(configModel.gameId));
|
||||
if (configModel.userId.length == 0 ||
|
||||
configModel.roomId.length == 0 ||
|
||||
code.length == 0 ||
|
||||
configModel.language.length == 0 ||
|
||||
configModel.gameId <= 0) {
|
||||
|
||||
NSLog(@"loadGame: 游戏加载参数存在异常空值,请检查参数loadMG传入参数");
|
||||
return;
|
||||
}
|
||||
// 必须配置当前登录用户
|
||||
[self.sudFSMMGDecorator setCurrentUserId:configModel.userId];
|
||||
// 3. 加载SudMGP SDK<SudMGP loadMG>,注:客户端必须持有iSudFSTAPP实例
|
||||
id <ISudFSTAPP> iSudFSTAPP = [SudMGP loadMG:configModel.userId
|
||||
roomId:configModel.roomId
|
||||
code:code
|
||||
mgId:configModel.gameId
|
||||
language:configModel.language
|
||||
fsmMG:self.sudFSMMGDecorator
|
||||
rootView:configModel.gameView];
|
||||
[self.sudFSTAPPDecorator setISudFSTAPP:iSudFSTAPP];
|
||||
}
|
||||
|
||||
#pragma mark =======SudFSMMGListener 游戏SDK回调=======
|
||||
|
||||
#pragma mark 启动游戏开发者针对游戏相关自定义配置
|
||||
|
||||
/// 获取游戏Config 【需要实现】
|
||||
- (void)onGetGameCfg:(nonnull id <ISudFSMStateHandle>)handle dataJson:(nonnull NSString *)dataJson {
|
||||
|
||||
// TODO: 需要开发者根据自己需求配置游戏相关功能展示
|
||||
|
||||
// 默认游戏配置
|
||||
GameCfgModel *m = [GameCfgModel defaultCfgModel];
|
||||
[handle success:m.toJSON];
|
||||
}
|
||||
|
||||
/// 获取游戏View信息 【需要实现】
|
||||
- (void)onGetGameViewInfo:(nonnull id <ISudFSMStateHandle>)handle dataJson:(nonnull NSString *)dataJson {
|
||||
|
||||
// TODO: 需要开发者根据自己需求配置游戏界面
|
||||
|
||||
// 屏幕缩放比例,游戏内部采用px,需要开发者获取本设备比值 x 屏幕点数来获得真实px值设置相关字段中
|
||||
CGFloat scale = [[UIScreen mainScreen] nativeScale];
|
||||
// 屏幕尺寸
|
||||
CGSize screenSize = [UIScreen mainScreen].bounds.size;
|
||||
// 屏幕安全区
|
||||
UIEdgeInsets safeArea = [self safeAreaInsets];
|
||||
// 状态栏高度
|
||||
CGFloat statusBarHeight = safeArea.top == 0 ? 20 : safeArea.top;
|
||||
|
||||
GameViewInfoModel *m = [[GameViewInfoModel alloc] init];
|
||||
// 游戏展示区域
|
||||
m.view_size.width = screenSize.width * scale;
|
||||
m.view_size.height = screenSize.height * scale;
|
||||
// 游戏内容布局安全区域,根据自身业务调整顶部间距
|
||||
// 顶部间距
|
||||
m.view_game_rect.top = (statusBarHeight + 80) * scale + 250;
|
||||
// 左边
|
||||
m.view_game_rect.left = 0;
|
||||
// 右边
|
||||
m.view_game_rect.right = 0;
|
||||
// 底部安全区域
|
||||
m.view_game_rect.bottom = (safeArea.bottom + 100) * scale + 200;
|
||||
|
||||
m.ret_code = 0;
|
||||
m.ret_msg = @"success";
|
||||
[handle success:m.toJSON];
|
||||
}
|
||||
|
||||
#pragma mark 游戏生命周期回调
|
||||
|
||||
/// 游戏开始
|
||||
- (void)onGameStarted {
|
||||
/// 此时表明游戏加载成功
|
||||
NSLog(@"游戏加载完毕");
|
||||
}
|
||||
|
||||
/// 游戏销毁
|
||||
- (void)onGameDestroyed {
|
||||
NSLog(@"游戏已销毁");
|
||||
}
|
||||
|
||||
/// 短期令牌code过期 【需要实现】
|
||||
- (void)onExpireCode:(nonnull id <ISudFSMStateHandle>)handle dataJson:(nonnull NSString *)dataJson {
|
||||
|
||||
// TODO: 需要开发者根据该游戏code码失效,刷新code码
|
||||
|
||||
// 请求业务服务器刷新令牌 Code更新
|
||||
[self getCode:self.sudFSMMGDecorator.currentUserId success:^(NSString *code, NSError *error, int retCode) {
|
||||
// 调用游戏接口更新令牌
|
||||
[self.sudFSTAPPDecorator updateCode:code];
|
||||
// 回调成功结果
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
} fail:^(NSError *error) {
|
||||
NSLog(@"getCode err:%@", error.debugDescription);
|
||||
// 回调失败结果
|
||||
[handle failure:[self.sudFSMMGDecorator handleMGFailure]];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark 游戏相关事件状态回调通知
|
||||
|
||||
/// 游戏: 准备按钮点击状态 MG_COMMON_SELF_CLICK_READY_BTN
|
||||
- (void)onGameMGCommonSelfClickReadyBtn:(nonnull id <ISudFSMStateHandle>)handle model:(MGCommonSelfClickReadyBtn *)model {
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 游戏: 结算界面再来一局按钮点击状态 MG_COMMON_SELF_CLICK_GAME_SETTLE_AGAIN_BTN
|
||||
- (void)onGameMGCommonSelfClickGameSettleAgainBtn:(nonnull id <ISudFSMStateHandle>)handle model:(MGCommonSelfClickGameSettleAgainBtn *)model {
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 游戏: 开始游戏按钮点击状态 MG_COMMON_SELF_CLICK_START_BTN
|
||||
- (void)onGameMGCommonSelfClickStartBtn:(nonnull id <ISudFSMStateHandle>)handle model:(MGCommonSelfClickStartBtn *)model {
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 通用状态-游戏
|
||||
/// 游戏: 公屏消息状态 MG_COMMON_PUBLIC_MESSAGE
|
||||
- (void)onGameMGCommonPublicMessage:(id <ISudFSMStateHandle>)handle model:(MGCommonPublicMessageModel *)model {
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
|
||||
[self onSendGameMsg:model];
|
||||
}
|
||||
|
||||
- (void)onSendGameMsg:(MGCommonPublicMessageModel *)model {
|
||||
if ([self onGetIsCaptain] == NO) {
|
||||
return;
|
||||
}
|
||||
NSMutableString *mStr = [[NSMutableString alloc] init];
|
||||
for (GamePublicMsg *m in model.msg) {
|
||||
if (m.text.zh_CN && m.text.zh_CN.length > 0) {
|
||||
[mStr appendString:m.text.zh_CN];
|
||||
}
|
||||
if (m.user.name && m.user.name.length > 0) {
|
||||
[mStr appendString:m.user.name];
|
||||
}
|
||||
}
|
||||
if (mStr.length > 0) {
|
||||
[self onUpdateGameMsg:[mStr copy]];
|
||||
NSLog(@"打印游戏信息-%@", mStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// 游戏: 关键词状态 MG_COMMON_KEY_WORD_TO_HIT
|
||||
- (void)onGameMGCommonKeyWordToHit:(id <ISudFSMStateHandle>)handle model:(MGCommonKeyWrodToHitModel *)model {
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 改变拉流推流状态
|
||||
/// 游戏: 游戏状态 MG_COMMON_GAME_STATE
|
||||
- (void)onGameMGCommonGameState:(id <ISudFSMStateHandle>)handle model:(MGCommonGameState *)model {
|
||||
if (model.gameState != 2) {
|
||||
self.gameBanMic = self.gameBanSpeaker = NO;
|
||||
}
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 游戏: ASR状态(开启和关闭语音识别状态 MG_COMMON_GAME_ASR
|
||||
- (void)onGameMGCommonGameASR:(id <ISudFSMStateHandle>)handle model:(MGCommonGameASRModel *)model {
|
||||
/// 语音采集 || 停止采集
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 玩家状态变化
|
||||
/// 玩家: 加入状态 MG_COMMON_PLAYER_IN
|
||||
- (void)onPlayerMGCommonPlayerIn:(id <ISudFSMStateHandle>)handle userId:(NSString *)userId model:(MGCommonPlayerInModel *)model {
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
|
||||
[self onSetDefaultCaptain];
|
||||
}
|
||||
|
||||
/// 玩家: 准备状态 MG_COMMON_PLAYER_READY
|
||||
- (void)onPlayerMGCommonPlayerReady:(id <ISudFSMStateHandle>)handle userId:(NSString *)userId model:(MGCommonPlayerReadyModel *)model {
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 玩家: 队长状态 MG_COMMON_PLAYER_CAPTAIN
|
||||
- (void)onPlayerMGCommonPlayerCaptain:(id <ISudFSMStateHandle>)handle userId:(NSString *)userId model:(MGCommonPlayerCaptainModel *)model {
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 玩家: 游戏状态 MG_COMMON_PLAYER_PLAYING
|
||||
- (void)onPlayerMGCommonPlayerPlaying:(id <ISudFSMStateHandle>)handle userId:(NSString *)userId model:(MGCommonPlayerPlayingModel *)model {
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 你画我猜: 作画中状态 MG_DG_PAINTING
|
||||
- (void)onPlayerMGDGPainting:(nonnull id <ISudFSMStateHandle>)handle userId:(nonnull NSString *)userId model:(MGDGPaintingModel *)model {
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
|
||||
}
|
||||
|
||||
/// 改变拉流推流状态
|
||||
/// 游戏: 麦克风状态 MG_COMMON_GAME_SELF_MICROPHONE
|
||||
- (void)onGameMGCommonGameSelfMicrophone:(nonnull id <ISudFSMStateHandle>)handle model:(MGCommonGameSelfMicrophone *)model {
|
||||
if (self.sudFSMMGDecorator.gameStateType == 2) {
|
||||
//开启、关闭RTC推流
|
||||
self.gameBanMic = !model.isOn;
|
||||
[self onChangeGameMic:model.isOn];
|
||||
[MBManager showBriefAlert:model.isOn?@"您可以发言了":@"您暂时不能发言"];
|
||||
}
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
/// 改变拉流推流状态
|
||||
/// 游戏: 耳机(听筒,扬声器)状态 MG_COMMON_GAME_SELF_HEADEPHONE
|
||||
- (void)onGameMGCommonGameSelfHeadphone:(nonnull id <ISudFSMStateHandle>)handle model:(MGCommonGameSelfHeadphone *)model {
|
||||
if (self.sudFSMMGDecorator.gameStateType == 2) {
|
||||
//开启、关闭RTC拉流
|
||||
self.gameBanSpeaker = !model.isOn;
|
||||
[self onChangeGameMic:model.isOn];
|
||||
[MBManager showBriefAlert:model.isOn?@"声音已打开":@"声音已关闭"];
|
||||
}
|
||||
|
||||
[handle success:[self.sudFSMMGDecorator handleMGSuccess]];
|
||||
}
|
||||
|
||||
#pragma mark ======= private =======
|
||||
|
||||
- (void)setSudFSMMGDecorator:(SudFSMMGDecorator *)sudFSMMGDecorator {
|
||||
objc_setAssociatedObject(self, @selector(sudFSMMGDecorator), sudFSMMGDecorator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
|
||||
}
|
||||
|
||||
- (SudFSMMGDecorator *)sudFSMMGDecorator {
|
||||
return objc_getAssociatedObject(self, _cmd);
|
||||
}
|
||||
|
||||
- (void)setSudFSTAPPDecorator:(SudFSTAPPDecorator *)sudFSTAPPDecorator {
|
||||
objc_setAssociatedObject(self, @selector(sudFSTAPPDecorator), sudFSTAPPDecorator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
}
|
||||
|
||||
- (SudFSTAPPDecorator *)sudFSTAPPDecorator {
|
||||
return objc_getAssociatedObject(self, _cmd);
|
||||
}
|
||||
|
||||
/// 基础接口请求
|
||||
- (void)postHttpRequestWithURL:(NSString *)api
|
||||
param:(NSDictionary *)param
|
||||
success:(void (^)(NSDictionary *_Nonnull))success
|
||||
failure:(void (^)(id _Nonnull))failure {
|
||||
//请求地址
|
||||
NSURL *url = [NSURL URLWithString:api];
|
||||
//设置请求地址
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
|
||||
//设置请求方式
|
||||
request.HTTPMethod = @"POST";
|
||||
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||
|
||||
//设置请求参数
|
||||
if (param) {
|
||||
NSData *bodyData = [NSJSONSerialization dataWithJSONObject:param options:NSJSONReadingMutableContainers error:nil];
|
||||
request.HTTPBody = bodyData;
|
||||
}
|
||||
//设置请求session
|
||||
NSURLSession *session = [NSURLSession sharedSession];
|
||||
//设置网络请求的返回接收器
|
||||
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (error) {
|
||||
if (failure) {
|
||||
failure(error);
|
||||
}
|
||||
return;
|
||||
}
|
||||
NSError *error;
|
||||
NSMutableDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
|
||||
if (error) {
|
||||
if (failure) {
|
||||
failure(error);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (success) {
|
||||
success(responseObject);
|
||||
}
|
||||
});
|
||||
}];
|
||||
//开始请求
|
||||
[dataTask resume];
|
||||
}
|
||||
|
||||
/// 设备安全区
|
||||
-(UIEdgeInsets)safeAreaInsets {
|
||||
if (@available(iOS 11.0, *)) {
|
||||
return [[[UIApplication sharedApplication] keyWindow] safeAreaInsets];
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
return UIEdgeInsetsZero;
|
||||
}
|
||||
|
||||
#pragma mark ======= 执行业务与游戏状态交互方法 =======
|
||||
|
||||
/// 你画我猜命中、数字炸弹
|
||||
- (void)handleGameKeywordHitting:(NSString *)content {
|
||||
if (self.sudFSMMGDecorator.isHitBomb) {
|
||||
if ([self isPureInt:content]) {
|
||||
/// 关键词命中
|
||||
[self.sudFSTAPPDecorator notifyAppComonDrawTextHit:false keyWord:@"" text:content];
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (self.sudFSMMGDecorator.keyWordHiting == YES && [content isEqualToString:self.sudFSMMGDecorator.drawKeyWord]) {
|
||||
/// 关键词命中
|
||||
[self.sudFSTAPPDecorator notifyAppComonDrawTextHit:true keyWord:self.sudFSMMGDecorator.drawKeyWord text:self.sudFSMMGDecorator.drawKeyWord];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)isPureInt:(NSString *)string {
|
||||
NSScanner *scan = [NSScanner scannerWithString:string];
|
||||
int val;
|
||||
return [scan scanInt:&val] && [scan isAtEnd];
|
||||
}
|
||||
|
||||
//是否是队长
|
||||
- (BOOL)onGetIsCaptain {
|
||||
return [self.sudFSMMGDecorator isPlayerIsCaptain:BJUserManager.userInfo.uid];
|
||||
}
|
||||
|
||||
//是房主的话默认设置为队长
|
||||
- (void)onSetDefaultCaptain {
|
||||
if ([self onGetIsRoomOwner]) {
|
||||
[self.sudFSTAPPDecorator notifyAppComonSetCaptainStateWithUserId:BJUserManager.userInfo.uid];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
23
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.h
Executable file
23
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.h
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// YYRoomGamePickCell.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "YYRoomGamePickModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYRoomGamePickCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *imgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
|
||||
|
||||
@property (nonatomic, strong) YYRoomGamePickModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
25
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.m
Executable file
25
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.m
Executable file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// YYRoomGamePickCell.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YYRoomGamePickCell.h"
|
||||
|
||||
@implementation YYRoomGamePickCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(YYRoomGamePickModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.imgV.image = ImageNamed(model.gameRoomPic);
|
||||
self.nameLab.text = model.gameName;
|
||||
}
|
||||
|
||||
@end
|
||||
50
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.xib
Executable file
50
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickCell.xib
Executable file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="YYRoomGamePickCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="123"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="123"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="game_lrs" translatesAutoresizingMaskIntoConstraints="NO" id="Jk6-bi-SyD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="75" height="75"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="N3N-va-Jge">
|
||||
<rect key="frame" x="0.0" y="87" width="75" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="Jk6-bi-SyD" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="0wi-vE-X29"/>
|
||||
<constraint firstItem="N3N-va-Jge" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="4vB-xi-kKG"/>
|
||||
<constraint firstItem="N3N-va-Jge" firstAttribute="top" secondItem="Jk6-bi-SyD" secondAttribute="bottom" constant="12" id="GkA-5h-hCm"/>
|
||||
<constraint firstAttribute="width" secondItem="Jk6-bi-SyD" secondAttribute="height" id="afa-Ss-Vdq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Jk6-bi-SyD" secondAttribute="trailing" id="fuA-EE-Wgd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="N3N-va-Jge" secondAttribute="trailing" id="p6D-8I-x51"/>
|
||||
<constraint firstItem="Jk6-bi-SyD" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="sgD-nf-nMO"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="184" height="208"/>
|
||||
<connections>
|
||||
<outlet property="imgV" destination="Jk6-bi-SyD" id="ohT-Ka-Gkb"/>
|
||||
<outlet property="nameLab" destination="N3N-va-Jge" id="f7x-mp-mcM"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="228.2608695652174" y="152.34375"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="game_lrs" width="55" height="55"/>
|
||||
</resources>
|
||||
</document>
|
||||
21
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickModel.h
Executable file
21
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickModel.h
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// YYRoomGamePickModel.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYRoomGamePickModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *gameName;
|
||||
@property (nonatomic, copy) NSString *gameId;
|
||||
@property (nonatomic, copy) NSString *gameRoomPic;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickModel.m
Executable file
13
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickModel.m
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// YYRoomGamePickModel.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YYRoomGamePickModel.h"
|
||||
|
||||
@implementation YYRoomGamePickModel
|
||||
|
||||
@end
|
||||
22
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.h
Executable file
22
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.h
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// YYRoomGamePickView.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYRoomGamePickView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic, copy) void(^onPickGameBlock)(NSString *gameId);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
84
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.m
Executable file
84
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.m
Executable file
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// YYRoomGamePickView.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/2/21.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YYRoomGamePickView.h"
|
||||
#import "YYRoomGamePickCell.h"
|
||||
|
||||
@interface YYRoomGamePickView () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) NSArray *dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYRoomGamePickView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self createUI];
|
||||
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf onBack:nil];
|
||||
}];
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(55, 95);
|
||||
layout.minimumInteritemSpacing = 30;
|
||||
layout.minimumLineSpacing = 10;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 26, 0, 26);
|
||||
|
||||
_collectionView.collectionViewLayout = layout;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"YYRoomGamePickCell" bundle:nil] forCellWithReuseIdentifier:@"YYRoomGamePickCell"];
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"sud_game" ofType:@"json"];
|
||||
NSString *jsonStr = [NSString stringWithContentsOfFile:jsonPath encoding:NSUTF8StringEncoding error:nil];
|
||||
NSArray *arrGame = [YYRoomGamePickModel mj_objectArrayWithKeyValuesArray:jsonStr];
|
||||
self.dataArray = arrGame;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)onBack:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark -------- collectionView代理方法 ------
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
YYRoomGamePickCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"YYRoomGamePickCell" forIndexPath:indexPath];
|
||||
YYRoomGamePickModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
YYRoomGamePickModel *model = self.dataArray[indexPath.row];
|
||||
if (self.onPickGameBlock) {
|
||||
self.onPickGameBlock(model.gameId);
|
||||
}
|
||||
[self onBack:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
86
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.xib
Executable file
86
SweetParty/主类/狸猫新增/Sud小游戏/YYRoomGamePickView.xib
Executable file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYRoomGamePickView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Jnq-dO-GdS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.5" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qEW-cv-slD">
|
||||
<rect key="frame" x="0.0" y="584" width="414" height="312"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择游戏" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YgF-gf-Vmx">
|
||||
<rect key="frame" x="174" y="18" width="66" height="20"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZcP-Re-O1Z">
|
||||
<rect key="frame" x="10" y="13" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="YJK-cW-Urs"/>
|
||||
<constraint firstAttribute="height" constant="30" id="nRk-Ql-mIJ"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="back_jiantou"/>
|
||||
<connections>
|
||||
<action selector="onBack:" destination="iN0-l3-epB" eventType="touchUpInside" id="ebn-HM-Eg9"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="t8e-O7-fT8">
|
||||
<rect key="frame" x="0.0" y="56" width="414" height="256"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="9bT-JE-Dp9">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.10196078431372549" green="0.10588235294117647" blue="0.1764705882352941" alpha="0.80235985995960879" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="t8e-O7-fT8" firstAttribute="leading" secondItem="qEW-cv-slD" secondAttribute="leading" id="0C7-cs-8Az"/>
|
||||
<constraint firstAttribute="trailing" secondItem="t8e-O7-fT8" secondAttribute="trailing" id="5A7-2b-ild"/>
|
||||
<constraint firstItem="t8e-O7-fT8" firstAttribute="top" secondItem="qEW-cv-slD" secondAttribute="top" constant="56" id="Fdy-GU-Pwr"/>
|
||||
<constraint firstItem="ZcP-Re-O1Z" firstAttribute="leading" secondItem="qEW-cv-slD" secondAttribute="leading" constant="10" id="VTN-r9-4JN"/>
|
||||
<constraint firstItem="ZcP-Re-O1Z" firstAttribute="centerY" secondItem="YgF-gf-Vmx" secondAttribute="centerY" id="WZ4-NC-ZqD"/>
|
||||
<constraint firstAttribute="height" constant="312" id="j1d-l9-6IQ"/>
|
||||
<constraint firstItem="YgF-gf-Vmx" firstAttribute="centerX" secondItem="qEW-cv-slD" secondAttribute="centerX" id="p2F-c1-Vwt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="t8e-O7-fT8" secondAttribute="bottom" id="xHm-S3-3WT"/>
|
||||
<constraint firstItem="YgF-gf-Vmx" firstAttribute="top" secondItem="qEW-cv-slD" secondAttribute="top" constant="18" id="xaH-qh-KIF"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="qEW-cv-slD" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="4AQ-0Z-aWo"/>
|
||||
<constraint firstItem="Jnq-dO-GdS" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="7na-BB-rx4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Jnq-dO-GdS" secondAttribute="bottom" id="7wL-ar-BgG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qEW-cv-slD" secondAttribute="trailing" id="QKE-QI-VL9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Jnq-dO-GdS" secondAttribute="trailing" id="ZPF-zo-Nb3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="qEW-cv-slD" secondAttribute="bottom" id="ePR-kQ-4LT"/>
|
||||
<constraint firstItem="Jnq-dO-GdS" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="w1q-p8-0k1"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="collectionView" destination="t8e-O7-fT8" id="BRH-sp-D2Y"/>
|
||||
<outlet property="touchImgV" destination="Jnq-dO-GdS" id="fGG-FL-oaB"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="100"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="back_jiantou" width="15" height="12.5"/>
|
||||
</resources>
|
||||
</document>
|
||||
17
SweetParty/主类/狸猫新增/Sud小游戏/sud_game.json
Executable file
17
SweetParty/主类/狸猫新增/Sud小游戏/sud_game.json
Executable file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"gameName": "碰碰我最强",
|
||||
"gameId": 1461227817776713818,
|
||||
"gameRoomPic": "game_ppwzq"
|
||||
},
|
||||
{
|
||||
"gameName": "狼人杀",
|
||||
"gameId": 1472142747708284929,
|
||||
"gameRoomPic": "game_lrs"
|
||||
},
|
||||
{
|
||||
"gameName": "桌球",
|
||||
"gameId": 1739914495960793090,
|
||||
"gameRoomPic": "game_zq"
|
||||
},
|
||||
]
|
||||
26
SweetParty/主类/狸猫新增/周星榜/LMCurrentWeekGiftRankListModel.h
Normal file
26
SweetParty/主类/狸猫新增/周星榜/LMCurrentWeekGiftRankListModel.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// LMCurrentWeekGiftRankListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMCurrentWeekGiftRankListModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *uid;
|
||||
@property (nonatomic, strong) NSString *head_pic;
|
||||
@property (nonatomic, strong) NSString *nick_name;
|
||||
@property (nonatomic, strong) NSString *total_gift_num;
|
||||
@property (nonatomic, strong) NSString *give_uid;
|
||||
@property (nonatomic, strong) NSString *give_head_pic;
|
||||
@property (nonatomic, strong) NSString *give_nick_name;
|
||||
@property (nonatomic, strong) NSString *give_total_gift_num;
|
||||
@property (nonatomic, strong) NSString *gift_name;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/狸猫新增/周星榜/LMCurrentWeekGiftRankListModel.m
Normal file
13
SweetParty/主类/狸猫新增/周星榜/LMCurrentWeekGiftRankListModel.m
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// LMCurrentWeekGiftRankListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMCurrentWeekGiftRankListModel.h"
|
||||
|
||||
@implementation LMCurrentWeekGiftRankListModel
|
||||
|
||||
|
||||
@end
|
||||
24
SweetParty/主类/狸猫新增/周星榜/LMLastWeekRankListModel.h
Normal file
24
SweetParty/主类/狸猫新增/周星榜/LMLastWeekRankListModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMLastWeekRankListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMLastWeekRankListModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *nick_name;
|
||||
@property (nonatomic, strong) NSString *receive_uid;
|
||||
@property (nonatomic, strong) NSString *total_gift_num;
|
||||
@property (nonatomic, strong) NSString *head_pic;
|
||||
@property (nonatomic, strong) NSString *gift_name;
|
||||
@property (nonatomic, strong) NSString *gid;
|
||||
@property (nonatomic, strong) NSString *base_image;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/周星榜/LMLastWeekRankListModel.m
Normal file
12
SweetParty/主类/狸猫新增/周星榜/LMLastWeekRankListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMLastWeekRankListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMLastWeekRankListModel.h"
|
||||
|
||||
@implementation LMLastWeekRankListModel
|
||||
|
||||
@end
|
||||
22
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.h
Normal file
22
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// LMWeekCurrentCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMWeekStarGitfListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMWeekCurrentCollectionViewCellID = @"LMWeekCurrentCollectionViewCellID";
|
||||
@interface LMWeekCurrentCollectionViewCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftBgImage;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftBaseImage;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLabel;
|
||||
|
||||
@property (nonatomic, strong) LMWeekStarGitfListModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
30
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.m
Normal file
30
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.m
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// LMWeekCurrentCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMWeekCurrentCollectionViewCell.h"
|
||||
|
||||
@implementation LMWeekCurrentCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(LMWeekStarGitfListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
[self.giftBaseImage sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:kDefaultUserIcon];
|
||||
self.giftNameLabel.text = model.gift_name;
|
||||
|
||||
if (model.isSelect == YES){
|
||||
self.giftBgImage.image = ImageNamed(@"week_item_current_sel");
|
||||
}else{
|
||||
self.giftBgImage.image = ImageNamed(@"week_item_current_nor");
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
61
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.xib
Normal file
61
SweetParty/主类/狸猫新增/周星榜/LMWeekCurrentCollectionViewCell.xib
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="LMWeekCurrentCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="week_item_current_nor" translatesAutoresizingMaskIntoConstraints="NO" id="Gyg-XH-v0H">
|
||||
<rect key="frame" x="15" y="0.0" width="70" height="70"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="70" id="Sjk-8Y-WXD"/>
|
||||
<constraint firstAttribute="height" constant="70" id="z1p-sk-aBr"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DdP-fK-6R7">
|
||||
<rect key="frame" x="25" y="10" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="WBJ-gK-JSp"/>
|
||||
<constraint firstAttribute="width" constant="50" id="uSJ-9H-g8d"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="礼物昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DVC-dP-2CY">
|
||||
<rect key="frame" x="25.333333333333332" y="75" width="49.333333333333343" height="14.333333333333329"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="Gyg-XH-v0H" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="FHy-RG-E9A"/>
|
||||
<constraint firstItem="DdP-fK-6R7" firstAttribute="centerX" secondItem="Gyg-XH-v0H" secondAttribute="centerX" id="Qfd-zg-vYT"/>
|
||||
<constraint firstItem="DdP-fK-6R7" firstAttribute="centerY" secondItem="Gyg-XH-v0H" secondAttribute="centerY" id="UcM-0c-4nN"/>
|
||||
<constraint firstItem="DVC-dP-2CY" firstAttribute="top" secondItem="Gyg-XH-v0H" secondAttribute="bottom" constant="5" id="WR0-Gl-ybv"/>
|
||||
<constraint firstItem="Gyg-XH-v0H" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="hdG-Ib-FI3"/>
|
||||
<constraint firstItem="DVC-dP-2CY" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="sR4-xe-ug4"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="101" height="105"/>
|
||||
<connections>
|
||||
<outlet property="giftBaseImage" destination="DdP-fK-6R7" id="SLe-Wa-B6O"/>
|
||||
<outlet property="giftBgImage" destination="Gyg-XH-v0H" id="0Na-fk-B65"/>
|
||||
<outlet property="giftNameLabel" destination="DVC-dP-2CY" id="jTe-DJ-Tpv"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="168.70229007633588" y="8.0985915492957758"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="week_item_current_nor" width="64" height="63.5"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.h
Normal file
24
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMWeekLastCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMLastWeekRankListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMWeekLastCollectionViewCellID = @"LMWeekLastCollectionViewCellID";
|
||||
@interface LMWeekLastCollectionViewCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftBaseImage;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftName;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *userHeader;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *receiveCount;
|
||||
|
||||
@property (nonatomic, strong) LMLastWeekRankListModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
29
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.m
Normal file
29
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.m
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// LMWeekLastCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMWeekLastCollectionViewCell.h"
|
||||
|
||||
@implementation LMWeekLastCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(LMLastWeekRankListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
[self.giftBaseImage sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:kDefaultUserIcon];
|
||||
self.giftName.text = model.gift_name;
|
||||
[self.userHeader sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.userNameLabel.text = model.nick_name;
|
||||
self.receiveCount.text = [NSString stringWithFormat:@"收到%@个",model.total_gift_num];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
110
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.xib
Normal file
110
SweetParty/主类/狸猫新增/周星榜/LMWeekLastCollectionViewCell.xib
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="LMWeekLastCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="87" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="87" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="V0K-5P-XPk">
|
||||
<rect key="frame" x="18.666666666666671" y="5" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="BKX-Tg-2MC"/>
|
||||
<constraint firstAttribute="height" constant="50" id="SxG-w3-PbU"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="txI-sv-QNt">
|
||||
<rect key="frame" x="27.666666666666664" y="60.000000000000007" width="31.666666666666664" height="14.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wlG-XR-eVL">
|
||||
<rect key="frame" x="0.0" y="80.333333333333329" width="87" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rYP-Hl-cGg">
|
||||
<rect key="frame" x="18" y="0.0" width="51" height="20"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="bt3-ev-rUz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="jD2-0F-V2h"/>
|
||||
<constraint firstAttribute="height" constant="20" id="mt1-rZ-KzZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jPD-0B-acY">
|
||||
<rect key="frame" x="23" y="4" width="28" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="jPD-0B-acY" firstAttribute="leading" secondItem="bt3-ev-rUz" secondAttribute="trailing" constant="3" id="DPr-E9-ZzK"/>
|
||||
<constraint firstItem="jPD-0B-acY" firstAttribute="centerY" secondItem="rYP-Hl-cGg" secondAttribute="centerY" id="FOE-NL-ss6"/>
|
||||
<constraint firstItem="bt3-ev-rUz" firstAttribute="centerY" secondItem="rYP-Hl-cGg" secondAttribute="centerY" id="MVF-Yb-yYS"/>
|
||||
<constraint firstItem="bt3-ev-rUz" firstAttribute="leading" secondItem="rYP-Hl-cGg" secondAttribute="leading" id="f6b-EU-Fqa"/>
|
||||
<constraint firstAttribute="height" constant="20" id="nw3-jh-cNX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jPD-0B-acY" secondAttribute="trailing" id="z2b-md-0Jd"/>
|
||||
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="80" id="zLn-cn-QPB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收到0个" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nOm-QU-rJI">
|
||||
<rect key="frame" x="21" y="25" width="45" height="13.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nOm-QU-rJI" firstAttribute="centerX" secondItem="wlG-XR-eVL" secondAttribute="centerX" id="MUx-k8-RKC"/>
|
||||
<constraint firstItem="rYP-Hl-cGg" firstAttribute="centerX" secondItem="wlG-XR-eVL" secondAttribute="centerX" id="RYZ-4u-vQE"/>
|
||||
<constraint firstItem="nOm-QU-rJI" firstAttribute="top" secondItem="rYP-Hl-cGg" secondAttribute="bottom" constant="5" id="VrP-2t-ftI"/>
|
||||
<constraint firstItem="rYP-Hl-cGg" firstAttribute="top" secondItem="wlG-XR-eVL" secondAttribute="top" id="Wh5-TF-eca"/>
|
||||
<constraint firstAttribute="height" constant="40" id="lE0-dF-FDd"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="wlG-XR-eVL" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="1Rm-ql-btj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wlG-XR-eVL" secondAttribute="trailing" id="3FV-cZ-RCR"/>
|
||||
<constraint firstItem="txI-sv-QNt" firstAttribute="top" secondItem="V0K-5P-XPk" secondAttribute="bottom" constant="5" id="5lb-Ad-tcs"/>
|
||||
<constraint firstItem="txI-sv-QNt" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="81I-LS-vUI"/>
|
||||
<constraint firstItem="wlG-XR-eVL" firstAttribute="top" secondItem="txI-sv-QNt" secondAttribute="bottom" constant="6" id="8bJ-1v-Y3d"/>
|
||||
<constraint firstItem="wlG-XR-eVL" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="9hw-NP-A17"/>
|
||||
<constraint firstItem="V0K-5P-XPk" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="5" id="eVY-iS-g3A"/>
|
||||
<constraint firstItem="V0K-5P-XPk" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="wdZ-72-Njf"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="151" height="152"/>
|
||||
<connections>
|
||||
<outlet property="giftBaseImage" destination="V0K-5P-XPk" id="yZj-HF-sfC"/>
|
||||
<outlet property="giftName" destination="txI-sv-QNt" id="lgN-cU-cJS"/>
|
||||
<outlet property="receiveCount" destination="nOm-QU-rJI" id="Dk7-bj-oXi"/>
|
||||
<outlet property="userHeader" destination="bt3-ev-rUz" id="1Xb-AO-q4E"/>
|
||||
<outlet property="userNameLabel" destination="jPD-0B-acY" id="bXw-8o-rSj"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="206.87022900763358" y="24.647887323943664"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
21
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.h
Normal file
21
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// LMWeekListHeaderView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^selectGiftUpdateListBlock)(NSString *gid);
|
||||
@interface LMWeekListHeaderView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *giftItemView;
|
||||
|
||||
@property (nonatomic, copy) selectGiftUpdateListBlock updateListBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
86
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.m
Normal file
86
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.m
Normal file
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// LMWeekListHeaderView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMWeekListHeaderView.h"
|
||||
#import "LMWeekCurrentCollectionViewCell.h"
|
||||
|
||||
@interface LMWeekListHeaderView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMWeekListHeaderView
|
||||
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
|
||||
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
|
||||
flowLayout.itemSize = CGSizeMake((APPW-50)/4, 100);
|
||||
flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
flowLayout.minimumLineSpacing = 0;
|
||||
|
||||
self.giftItemView.delegate = self;
|
||||
self.giftItemView.dataSource = self;
|
||||
self.giftItemView.collectionViewLayout = flowLayout;
|
||||
[self.giftItemView registerNib:[UINib nibWithNibName:@"LMWeekCurrentCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMWeekCurrentCollectionViewCellID];
|
||||
|
||||
[self requestWeekStarGiftList];
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArr.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMWeekCurrentCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMWeekCurrentCollectionViewCellID forIndexPath:indexPath];
|
||||
cell.model = self.dataArr[indexPath.row];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self.dataArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
LMWeekStarGitfListModel *model = obj;
|
||||
model.isSelect = NO;
|
||||
}];
|
||||
|
||||
LMWeekStarGitfListModel *model = self.dataArr[indexPath.row];
|
||||
model.isSelect = YES;
|
||||
[collectionView reloadData];
|
||||
|
||||
if (self.updateListBlock){
|
||||
self.updateListBlock(model.gid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)requestWeekStarGiftList
|
||||
{
|
||||
[BJHttpTool BJ_Week_star_gift_listWithParameters:@{} success:^(id response) {
|
||||
self.dataArr = [LMWeekStarGitfListModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
if (self.dataArr.count > 0){
|
||||
LMWeekStarGitfListModel *model = self.dataArr[0];
|
||||
model.isSelect = YES;
|
||||
if (self.updateListBlock){
|
||||
self.updateListBlock(model.gid);
|
||||
}
|
||||
}
|
||||
[self.giftItemView reloadData];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
41
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.xib
Normal file
41
SweetParty/主类/狸猫新增/周星榜/LMWeekListHeaderView.xib
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMWeekListHeaderView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="110"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="hXD-hc-TlR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="110"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="ohO-mf-Kdd">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="hXD-hc-TlR" secondAttribute="trailing" id="57C-Vk-Xww"/>
|
||||
<constraint firstItem="hXD-hc-TlR" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="MgY-3E-2Cs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="hXD-hc-TlR" secondAttribute="bottom" id="UdS-1z-boC"/>
|
||||
<constraint firstItem="hXD-hc-TlR" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="br0-GZ-tIm"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="giftItemView" destination="hXD-hc-TlR" id="mx2-b2-Z3O"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="237.67605633802819"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
30
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.h
Normal file
30
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// LMWeekListTableViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMCurrentWeekGiftRankListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
static NSString *LMWeekListTableViewCellID = @"LMWeekListTableViewCellID";
|
||||
@interface LMWeekListTableViewCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *rankIcon;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rankLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *receiveHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nickNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *receiveCountLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *sendHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *sendCountLabel;
|
||||
|
||||
@property (nonatomic, strong) LMCurrentWeekGiftRankListModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
44
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.m
Normal file
44
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.m
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// LMWeekListTableViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMWeekListTableViewCell.h"
|
||||
|
||||
@implementation LMWeekListTableViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
WEAK_SELF;
|
||||
[self.receiveHeaderPic dg_Tapped:^{
|
||||
[UIViewController goUserMainpageWith:weakSelf.model.uid withRid:@""];
|
||||
}];
|
||||
|
||||
[self.sendHeaderPic dg_Tapped:^{
|
||||
[UIViewController goUserMainpageWith:weakSelf.model.give_uid withRid:@""];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setModel:(LMCurrentWeekGiftRankListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
[self.receiveHeaderPic sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nickNameLabel.text = model.nick_name;
|
||||
self.receiveCountLabel.text = [NSString stringWithFormat:@"收到%@个%@",model.total_gift_num,model.gift_name];
|
||||
|
||||
[self.sendHeaderPic sd_setImageWithURL:[NSURL URLWithString:model.give_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.sendCountLabel.text = [NSString stringWithFormat:@"打赏%@个",model.give_total_gift_num];
|
||||
}
|
||||
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
128
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.xib
Normal file
128
SweetParty/主类/狸猫新增/周星榜/LMWeekListTableViewCell.xib
Normal file
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="84" id="KGk-i7-Jjw" customClass="LMWeekListTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GzT-PV-RnA">
|
||||
<rect key="frame" x="5" y="5" width="365" height="74"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6C2-dv-vd7">
|
||||
<rect key="frame" x="15" y="25" width="24" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="67a-ct-v12"/>
|
||||
<constraint firstAttribute="height" constant="24" id="tKR-Qm-e3J"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="U5M-Yg-pma">
|
||||
<rect key="frame" x="45" y="15" width="44" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="DRM-FX-IUW"/>
|
||||
<constraint firstAttribute="width" constant="44" id="VI3-o7-R9T"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7km-CZ-ehR">
|
||||
<rect key="frame" x="94" y="17" width="26.666666666666671" height="15.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收到0个冰淇淋" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Rw-lZ-3FH">
|
||||
<rect key="frame" x="94" y="40.666666666666664" width="82" height="13.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="打赏0个" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2kd-ib-EeH">
|
||||
<rect key="frame" x="305" y="29.999999999999996" width="45" height="14.333333333333332"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="kLq-Bo-X4m">
|
||||
<rect key="frame" x="268" y="21" width="32" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="32" id="bIT-Hg-KLc"/>
|
||||
<constraint firstAttribute="height" constant="32" id="kjB-M3-0Di"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="03" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="h2r-Da-TvP">
|
||||
<rect key="frame" x="15.333333333333334" y="26.333333333333329" width="23.333333333333329" height="21.666666666666671"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="2kd-ib-EeH" firstAttribute="centerY" secondItem="GzT-PV-RnA" secondAttribute="centerY" id="4wG-WZ-LMp"/>
|
||||
<constraint firstItem="U5M-Yg-pma" firstAttribute="centerY" secondItem="GzT-PV-RnA" secondAttribute="centerY" id="5LL-20-cmI"/>
|
||||
<constraint firstItem="7km-CZ-ehR" firstAttribute="top" secondItem="U5M-Yg-pma" secondAttribute="top" constant="2" id="6gu-AU-QH0"/>
|
||||
<constraint firstItem="2kd-ib-EeH" firstAttribute="leading" secondItem="kLq-Bo-X4m" secondAttribute="trailing" constant="5" id="A8B-Xh-d00"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2kd-ib-EeH" secondAttribute="trailing" constant="15" id="DyE-VT-ljQ"/>
|
||||
<constraint firstItem="0Rw-lZ-3FH" firstAttribute="top" secondItem="7km-CZ-ehR" secondAttribute="bottom" constant="8" id="FKv-pm-xhf"/>
|
||||
<constraint firstItem="7km-CZ-ehR" firstAttribute="leading" secondItem="U5M-Yg-pma" secondAttribute="trailing" constant="5" id="MPt-6t-N4T"/>
|
||||
<constraint firstItem="kLq-Bo-X4m" firstAttribute="centerY" secondItem="GzT-PV-RnA" secondAttribute="centerY" id="NLd-7y-ZVG"/>
|
||||
<constraint firstItem="h2r-Da-TvP" firstAttribute="centerY" secondItem="GzT-PV-RnA" secondAttribute="centerY" id="WGl-yu-apu"/>
|
||||
<constraint firstItem="6C2-dv-vd7" firstAttribute="leading" secondItem="GzT-PV-RnA" secondAttribute="leading" constant="15" id="XoL-pX-d7r"/>
|
||||
<constraint firstItem="6C2-dv-vd7" firstAttribute="centerY" secondItem="GzT-PV-RnA" secondAttribute="centerY" id="bN5-m9-Oo3"/>
|
||||
<constraint firstItem="h2r-Da-TvP" firstAttribute="centerX" secondItem="6C2-dv-vd7" secondAttribute="centerX" id="n5B-dV-TCV"/>
|
||||
<constraint firstItem="0Rw-lZ-3FH" firstAttribute="leading" secondItem="7km-CZ-ehR" secondAttribute="leading" id="x6h-Zp-0Sx"/>
|
||||
<constraint firstItem="U5M-Yg-pma" firstAttribute="leading" secondItem="GzT-PV-RnA" secondAttribute="leading" constant="45" id="ysL-FP-6f0"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="GzT-PV-RnA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="5" id="HwQ-uJ-LhD"/>
|
||||
<constraint firstAttribute="bottom" secondItem="GzT-PV-RnA" secondAttribute="bottom" constant="5" id="PXk-tf-GWh"/>
|
||||
<constraint firstItem="GzT-PV-RnA" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="UV3-Km-Ubs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GzT-PV-RnA" secondAttribute="trailing" constant="5" id="XR3-ZR-Szn"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="nickNameLabel" destination="7km-CZ-ehR" id="AW4-6X-OQK"/>
|
||||
<outlet property="rankIcon" destination="6C2-dv-vd7" id="zjW-ng-PK1"/>
|
||||
<outlet property="rankLabel" destination="h2r-Da-TvP" id="Tj2-EP-sbl"/>
|
||||
<outlet property="receiveCountLabel" destination="0Rw-lZ-3FH" id="2NC-TP-xXP"/>
|
||||
<outlet property="receiveHeaderPic" destination="U5M-Yg-pma" id="jjt-qv-1Yq"/>
|
||||
<outlet property="sendCountLabel" destination="2kd-ib-EeH" id="eus-4Z-0Ji"/>
|
||||
<outlet property="sendHeaderPic" destination="kLq-Bo-X4m" id="uAa-pN-Q5R"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="180.91603053435114" y="2.8169014084507045"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/狸猫新增/周星榜/LMWeekStarGitfListModel.h
Normal file
24
SweetParty/主类/狸猫新增/周星榜/LMWeekStarGitfListModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMWeekStarGitfListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMWeekStarGitfListModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *gid;
|
||||
@property (nonatomic, strong) NSString *gift_name;
|
||||
@property (nonatomic, strong) NSString *gift_price;
|
||||
@property (nonatomic, strong) NSString *base_image;
|
||||
@property (nonatomic, strong) NSString *tag_name;
|
||||
|
||||
@property (nonatomic, assign) BOOL isSelect;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/周星榜/LMWeekStarGitfListModel.m
Normal file
12
SweetParty/主类/狸猫新增/周星榜/LMWeekStarGitfListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMWeekStarGitfListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMWeekStarGitfListModel.h"
|
||||
|
||||
@implementation LMWeekStarGitfListModel
|
||||
|
||||
@end
|
||||
16
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.h
Normal file
16
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LMWeekStarViewController.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/6.
|
||||
//
|
||||
|
||||
#import "BaseController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMWeekStarViewController : BaseController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
201
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.m
Normal file
201
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.m
Normal file
@@ -0,0 +1,201 @@
|
||||
//
|
||||
// LMWeekStarViewController.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/6.
|
||||
//
|
||||
|
||||
#import "LMWeekStarViewController.h"
|
||||
#import "LMWeekLastCollectionViewCell.h"
|
||||
#import "LMWeekListTableViewCell.h"
|
||||
#import "LMWeekListHeaderView.h"
|
||||
|
||||
@interface LMWeekStarViewController ()<UITableViewDelegate,UITableViewDataSource,UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView *currentTableView;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *lastWeekTopItemView;
|
||||
@property (nonatomic, strong) LMWeekListHeaderView *headerView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topLayout;
|
||||
@property (nonatomic, strong) NSMutableArray *lastWeekDataArr;
|
||||
@property (nonatomic, strong) NSMutableArray *currentListDataArr;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *meInfoisRank;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *meInfoHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *meInfoNicknameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *meInfoDeffNumLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *heightConstraint;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMWeekStarViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
|
||||
self.navTitle = @"周星榜";
|
||||
[self.customNavBar styleClear];
|
||||
self.customNavBar.titleLab.textColor = kWhiteColor;
|
||||
[self.customNavBar.left0Btn setImage:ImageNamed(@"whiteBack") forState:(UIControlStateNormal)];
|
||||
|
||||
self.view.backgroundColor = HEXCOLOR(0x390780);
|
||||
|
||||
UIButton *btn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
[btn setImage:ImageNamed(@"week_home_yiwen") forState:(UIControlStateNormal)];
|
||||
[self.customNavBar addSubview:btn];
|
||||
[btn buttonAddTaget:^(UIButton *btn) {
|
||||
[UIViewController goWebWithUrl:[VERSION_HTTPS_SERVER stringByAppendingString:@"index.php/index/index/page_show?id=20"]];
|
||||
} forControlEvents:(UIControlEventTouchUpInside)];
|
||||
|
||||
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.width.height.mas_equalTo(30);
|
||||
make.top.mas_equalTo(yb_StatusBar_H+7);
|
||||
}];
|
||||
|
||||
|
||||
[self setupUI];
|
||||
[self requestGiftLastWeekRank];
|
||||
}
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
self.topLayout.constant = yb_NavigationBar_H;
|
||||
|
||||
[self.currentTableView registerNib:[UINib nibWithNibName:@"LMWeekListTableViewCell" bundle:nil] forCellReuseIdentifier:LMWeekListTableViewCellID];
|
||||
self.currentTableView.tableHeaderView = self.headerView;
|
||||
|
||||
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
|
||||
flowLayout.itemSize = CGSizeMake((APPW-30)/4, 140);
|
||||
flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
flowLayout.minimumLineSpacing = 0;
|
||||
|
||||
self.lastWeekTopItemView.collectionViewLayout = flowLayout;
|
||||
self.lastWeekTopItemView.delegate = self;
|
||||
self.lastWeekTopItemView.dataSource = self;
|
||||
[self.lastWeekTopItemView registerNib:[UINib nibWithNibName:@"LMWeekLastCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMWeekLastCollectionViewCellID];
|
||||
}
|
||||
|
||||
- (void)setmeInfoWithDict:(NSDictionary *)myinfo
|
||||
{
|
||||
NSInteger is_top_rank = [myinfo safeIntForKey:@"is_top_rank"];//1 已上榜 2未上榜
|
||||
if (is_top_rank == 1){
|
||||
self.meInfoisRank.text = @"已上榜";
|
||||
self.meInfoDeffNumLabel.hidden = YES;
|
||||
}else{
|
||||
self.meInfoisRank.text = @"未上榜";
|
||||
self.meInfoDeffNumLabel.text = [NSString stringWithFormat:@"距上榜还差%@个",[myinfo safeStringForKey:@"diff_num"]];
|
||||
self.meInfoDeffNumLabel.hidden = NO;
|
||||
}
|
||||
self.meInfoNicknameLabel.text = [myinfo safeStringForKey:@"nick_name"];
|
||||
[self.meInfoHeaderPic sd_setImageWithURL:[NSURL URLWithString:[myinfo safeStringForKey:@"head_pic"]] placeholderImage:kDefaultUserIcon];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark ——————— 网络请求 ———————
|
||||
|
||||
- (void)requestGiftLastWeekRank
|
||||
{
|
||||
[BJHttpTool BJ_Last_week_rankWithParameters:@{} success:^(id response) {
|
||||
self.lastWeekDataArr = [LMLastWeekRankListModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
[self.lastWeekTopItemView reloadData];
|
||||
|
||||
if (self.lastWeekDataArr.count > 0) {
|
||||
self.heightConstraint.constant = 200;
|
||||
}else {
|
||||
self.heightConstraint.constant = 55;
|
||||
}
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)requestGiftCurrentWeekRankListWithGid:(NSString *)gid
|
||||
{
|
||||
[BJHttpTool BJ_Now_week_rankWithParameters:@{@"gid":gid} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
self.currentListDataArr = [LMCurrentWeekGiftRankListModel mj_objectArrayWithKeyValuesArray:[data safeArrayForKey:@"list"]];
|
||||
[self.currentTableView reloadData];
|
||||
NSDictionary *myinfo = [data safeDictionaryForKey:@"my_user_info"];
|
||||
[self setmeInfoWithDict:myinfo];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.currentListDataArr.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMWeekListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:LMWeekListTableViewCellID forIndexPath:indexPath];
|
||||
cell.model = self.currentListDataArr[indexPath.row];
|
||||
cell.rankLabel.text = [NSString stringWithFormat:@"%02ld",indexPath.row+1];
|
||||
if (indexPath.row < 3){
|
||||
NSString *rankiconStr = [NSString stringWithFormat:@"week_rank_%ld",indexPath.row+1];
|
||||
cell.rankIcon.image = ImageNamed(rankiconStr);
|
||||
cell.rankIcon.hidden = NO;
|
||||
cell.rankLabel.hidden = YES;
|
||||
// if (indexPath.row == 0){
|
||||
// cell.receiveHeaderPic.layer.borderColor = HEXCOLOR(0xF9A920).CGColor;
|
||||
// }else if (indexPath.row == 1){
|
||||
// cell.receiveHeaderPic.layer.borderColor = HEXCOLOR(0xAEBAC3).CGColor;
|
||||
// }else if (indexPath.row == 2){
|
||||
// cell.receiveHeaderPic.layer.borderColor = HEXCOLOR(0xF36745).CGColor;
|
||||
// }
|
||||
}else{
|
||||
cell.receiveHeaderPic.layer.borderColor = kClearColor.CGColor;
|
||||
cell.rankIcon.hidden = YES;
|
||||
cell.rankLabel.hidden = NO;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.lastWeekDataArr.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMWeekLastCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMWeekLastCollectionViewCellID forIndexPath:indexPath];
|
||||
cell.model = self.lastWeekDataArr[indexPath.row];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (LMWeekListHeaderView *)headerView
|
||||
{
|
||||
if (!_headerView){
|
||||
_headerView = LoadNib(@"LMWeekListHeaderView");
|
||||
_headerView.frame = CGRectMake(0, 0, APPW-30, 110);
|
||||
WEAK_SELF;
|
||||
_headerView.updateListBlock = ^(NSString * _Nonnull gid) {
|
||||
[weakSelf requestGiftCurrentWeekRankListWithGid:gid];
|
||||
};
|
||||
}
|
||||
return _headerView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)lastWeekDataArr
|
||||
{
|
||||
if (!_lastWeekDataArr){
|
||||
_lastWeekDataArr = [NSMutableArray array];
|
||||
}
|
||||
return _lastWeekDataArr;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)currentListDataArr
|
||||
{
|
||||
if (!_currentListDataArr){
|
||||
_currentListDataArr = [NSMutableArray array];
|
||||
}
|
||||
return _currentListDataArr;
|
||||
}
|
||||
|
||||
@end
|
||||
206
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.xib
Normal file
206
SweetParty/主类/狸猫新增/周星榜/LMWeekStarViewController.xib
Normal file
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LMWeekStarViewController">
|
||||
<connections>
|
||||
<outlet property="currentTableView" destination="hYP-dn-D93" id="PL1-Ma-5dy"/>
|
||||
<outlet property="heightConstraint" destination="TX3-KR-YTz" id="FCO-1w-n67"/>
|
||||
<outlet property="lastWeekTopItemView" destination="WwQ-Ah-x5L" id="KYa-5S-5CT"/>
|
||||
<outlet property="meInfoDeffNumLabel" destination="YLy-KF-d4I" id="8hd-sx-6KO"/>
|
||||
<outlet property="meInfoHeaderPic" destination="AU3-Qa-uP0" id="a2b-Wo-1V6"/>
|
||||
<outlet property="meInfoNicknameLabel" destination="vGt-1P-9lW" id="Hvc-eK-xT7"/>
|
||||
<outlet property="meInfoisRank" destination="Vim-Jo-T1g" id="jf9-Ai-0MB"/>
|
||||
<outlet property="topLayout" destination="j75-lx-UtM" id="Vrm-ht-REu"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T6L-Ky-FPj">
|
||||
<rect key="frame" x="0.0" y="100" width="375" height="626"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q5p-hQ-hNV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="966"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="week_home_top" translatesAutoresizingMaskIntoConstraints="NO" id="hdt-Rw-tEu">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="306"/>
|
||||
</imageView>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TR3-n7-5nn">
|
||||
<rect key="frame" x="15" y="256" width="345" height="200"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="week_current_last_bg" translatesAutoresizingMaskIntoConstraints="NO" id="iSM-oJ-V8O">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="192"/>
|
||||
</imageView>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="WwQ-Ah-x5L">
|
||||
<rect key="frame" x="0.0" y="55" width="345" height="145"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="nhz-wt-VvE">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="WwQ-Ah-x5L" firstAttribute="leading" secondItem="TR3-n7-5nn" secondAttribute="leading" id="91o-D9-7fH"/>
|
||||
<constraint firstItem="iSM-oJ-V8O" firstAttribute="top" secondItem="TR3-n7-5nn" secondAttribute="top" id="TJt-ip-m4f"/>
|
||||
<constraint firstAttribute="height" constant="200" id="TX3-KR-YTz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WwQ-Ah-x5L" secondAttribute="trailing" id="obw-X2-c9O"/>
|
||||
<constraint firstItem="iSM-oJ-V8O" firstAttribute="leading" secondItem="TR3-n7-5nn" secondAttribute="leading" id="rvK-Cx-xMj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iSM-oJ-V8O" secondAttribute="trailing" id="sJd-x0-uDQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="WwQ-Ah-x5L" secondAttribute="bottom" id="uY5-gd-3B2"/>
|
||||
<constraint firstItem="WwQ-Ah-x5L" firstAttribute="top" secondItem="TR3-n7-5nn" secondAttribute="top" constant="55" id="ynZ-g4-dfV"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UTr-o3-KDk">
|
||||
<rect key="frame" x="15" y="466" width="345" height="500"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="week_current_list_bg" translatesAutoresizingMaskIntoConstraints="NO" id="xTm-Xf-Cyh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="500"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="xTm-Xf-Cyh" secondAttribute="height" multiplier="345:500" id="rp7-OK-L1g"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="77" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="hYP-dn-D93">
|
||||
<rect key="frame" x="10" y="55" width="325" height="445"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="ro7-gs-2CM"/>
|
||||
<outlet property="delegate" destination="-1" id="GKT-fZ-9n4"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="hYP-dn-D93" secondAttribute="bottom" id="LQf-el-rwC"/>
|
||||
<constraint firstItem="xTm-Xf-Cyh" firstAttribute="top" secondItem="UTr-o3-KDk" secondAttribute="top" id="Mpk-U0-PDj"/>
|
||||
<constraint firstItem="hYP-dn-D93" firstAttribute="top" secondItem="UTr-o3-KDk" secondAttribute="top" constant="55" id="PJl-qe-oXi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hYP-dn-D93" secondAttribute="trailing" constant="10" id="TmB-zL-MF9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="xTm-Xf-Cyh" secondAttribute="bottom" id="bSS-EQ-c3l"/>
|
||||
<constraint firstItem="hYP-dn-D93" firstAttribute="leading" secondItem="UTr-o3-KDk" secondAttribute="leading" constant="10" id="d7Z-1Z-GMX"/>
|
||||
<constraint firstItem="xTm-Xf-Cyh" firstAttribute="leading" secondItem="UTr-o3-KDk" secondAttribute="leading" id="ea9-ZT-AZa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="xTm-Xf-Cyh" secondAttribute="trailing" id="jlK-qR-H4f"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="TR3-n7-5nn" secondAttribute="trailing" constant="15" id="4qI-yP-j8P"/>
|
||||
<constraint firstItem="hdt-Rw-tEu" firstAttribute="leading" secondItem="q5p-hQ-hNV" secondAttribute="leading" id="98i-sv-hyW"/>
|
||||
<constraint firstItem="hdt-Rw-tEu" firstAttribute="top" secondItem="q5p-hQ-hNV" secondAttribute="top" id="9ts-YJ-vCF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="UTr-o3-KDk" secondAttribute="bottom" id="EaK-XV-Uin"/>
|
||||
<constraint firstItem="TR3-n7-5nn" firstAttribute="leading" secondItem="q5p-hQ-hNV" secondAttribute="leading" constant="15" id="GRM-Do-S8b"/>
|
||||
<constraint firstItem="UTr-o3-KDk" firstAttribute="leading" secondItem="q5p-hQ-hNV" secondAttribute="leading" constant="15" id="TSa-Y3-Dfc"/>
|
||||
<constraint firstAttribute="height" constant="966" id="bxK-HG-K96"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UTr-o3-KDk" secondAttribute="trailing" constant="15" id="p3P-fk-oIG"/>
|
||||
<constraint firstItem="UTr-o3-KDk" firstAttribute="top" secondItem="TR3-n7-5nn" secondAttribute="bottom" constant="10" id="sbq-CU-QSf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hdt-Rw-tEu" secondAttribute="trailing" id="xWR-YA-f6E"/>
|
||||
<constraint firstItem="TR3-n7-5nn" firstAttribute="top" secondItem="hdt-Rw-tEu" secondAttribute="bottom" constant="-50" id="xnL-bn-Jv0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="q5p-hQ-hNV" firstAttribute="top" secondItem="T6L-Ky-FPj" secondAttribute="top" id="51g-dA-N1K"/>
|
||||
<constraint firstItem="q5p-hQ-hNV" firstAttribute="leading" secondItem="T6L-Ky-FPj" secondAttribute="leading" id="L2w-Dp-usg"/>
|
||||
<constraint firstItem="q5p-hQ-hNV" firstAttribute="bottom" secondItem="T6L-Ky-FPj" secondAttribute="bottom" id="NZk-4W-Rrw"/>
|
||||
<constraint firstItem="q5p-hQ-hNV" firstAttribute="centerX" secondItem="T6L-Ky-FPj" secondAttribute="centerX" id="Nar-X8-Uib"/>
|
||||
<constraint firstItem="q5p-hQ-hNV" firstAttribute="trailing" secondItem="T6L-Ky-FPj" secondAttribute="trailing" id="emN-LE-bde"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="contentLayoutGuide" id="mge-ec-tc5"/>
|
||||
<viewLayoutGuide key="frameLayoutGuide" id="R5L-W6-Nop"/>
|
||||
</scrollView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0Eo-JM-tle">
|
||||
<rect key="frame" x="0.0" y="726" width="375" height="86"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="week_home_bottom_bg" translatesAutoresizingMaskIntoConstraints="NO" id="BXm-Sf-j6w">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="86"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="未上榜" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vim-Jo-T1g">
|
||||
<rect key="frame" x="15" y="22" width="40" height="15.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vGt-1P-9lW">
|
||||
<rect key="frame" x="101" y="22" width="26.666666666666671" height="15.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="距上榜还差1个" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YLy-KF-d4I">
|
||||
<rect key="frame" x="274" y="22" width="86" height="15.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="13"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="AU3-Qa-uP0">
|
||||
<rect key="frame" x="60" y="12" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="2ty-T4-Ke7"/>
|
||||
<constraint firstAttribute="width" constant="36" id="sLA-OD-jjd"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="18"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="86" id="9At-c2-Srp"/>
|
||||
<constraint firstItem="vGt-1P-9lW" firstAttribute="leading" secondItem="AU3-Qa-uP0" secondAttribute="trailing" constant="5" id="EA4-8t-me6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="BXm-Sf-j6w" secondAttribute="trailing" id="GZ6-WM-TVK"/>
|
||||
<constraint firstItem="vGt-1P-9lW" firstAttribute="centerY" secondItem="AU3-Qa-uP0" secondAttribute="centerY" id="KHs-nv-zbl"/>
|
||||
<constraint firstItem="BXm-Sf-j6w" firstAttribute="top" secondItem="0Eo-JM-tle" secondAttribute="top" id="Ksc-x7-fiY"/>
|
||||
<constraint firstItem="AU3-Qa-uP0" firstAttribute="leading" secondItem="Vim-Jo-T1g" secondAttribute="trailing" constant="5" id="MzL-7X-2VI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YLy-KF-d4I" secondAttribute="trailing" constant="15" id="NEx-qS-GEL"/>
|
||||
<constraint firstAttribute="bottom" secondItem="BXm-Sf-j6w" secondAttribute="bottom" id="Nr4-Id-h3a"/>
|
||||
<constraint firstItem="AU3-Qa-uP0" firstAttribute="centerY" secondItem="Vim-Jo-T1g" secondAttribute="centerY" id="fdh-X6-5LL"/>
|
||||
<constraint firstItem="BXm-Sf-j6w" firstAttribute="leading" secondItem="0Eo-JM-tle" secondAttribute="leading" id="hOZ-h7-ZrX"/>
|
||||
<constraint firstItem="YLy-KF-d4I" firstAttribute="centerY" secondItem="AU3-Qa-uP0" secondAttribute="centerY" id="o1J-De-kJB"/>
|
||||
<constraint firstItem="Vim-Jo-T1g" firstAttribute="top" secondItem="0Eo-JM-tle" secondAttribute="top" constant="22" id="oRX-hu-p9J"/>
|
||||
<constraint firstItem="Vim-Jo-T1g" firstAttribute="leading" secondItem="0Eo-JM-tle" secondAttribute="leading" constant="15" id="vMn-M1-7Uh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.22352941176470587" green="0.027450980392156862" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="0Eo-JM-tle" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="0of-t9-kkd"/>
|
||||
<constraint firstItem="0Eo-JM-tle" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="2dW-0n-KHj"/>
|
||||
<constraint firstItem="T6L-Ky-FPj" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="TCV-Pu-8dG"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0Eo-JM-tle" secondAttribute="bottom" id="UpJ-jO-29f"/>
|
||||
<constraint firstItem="T6L-Ky-FPj" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="aZn-Dz-OmN"/>
|
||||
<constraint firstItem="T6L-Ky-FPj" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="100" id="j75-lx-UtM"/>
|
||||
<constraint firstItem="0Eo-JM-tle" firstAttribute="top" secondItem="T6L-Ky-FPj" secondAttribute="bottom" id="wBc-x8-2m9"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="-1019" y="-373"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="week_current_last_bg" width="345" height="192"/>
|
||||
<image name="week_current_list_bg" width="172.5" height="251.5"/>
|
||||
<image name="week_home_bottom_bg" width="375" height="83"/>
|
||||
<image name="week_home_top" width="375" height="306"/>
|
||||
</resources>
|
||||
</document>
|
||||
18
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.h
Normal file
18
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// LMCPInRoomVapView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMCPInRoomVapView : UIView
|
||||
|
||||
- (void)playVapWithDict:(NSDictionary *)dict;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
147
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.m
Normal file
147
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.m
Normal file
@@ -0,0 +1,147 @@
|
||||
//
|
||||
// LMCPInRoomVapView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/17.
|
||||
//
|
||||
|
||||
#import "LMCPInRoomVapView.h"
|
||||
#import "QGVAPWrapView.h"
|
||||
#import "UIView+VAP.h"
|
||||
#import "QGVAPWrapView+download.h"
|
||||
|
||||
@interface LMCPInRoomVapView ()<HWDMP4PlayDelegate,VAPWrapViewDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *inRoomTXCover;
|
||||
@property (weak, nonatomic) IBOutlet UIView *leftHeaderVapCover;
|
||||
@property (weak, nonatomic) IBOutlet UIView *rightHeaderVapCover;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *leftHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *rightHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *leftNicknameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rightNicknameLabel;
|
||||
|
||||
@property (nonatomic, strong) QGVAPWrapView *leftHeaderVapView;
|
||||
@property (nonatomic, strong) QGVAPWrapView *rightHeaderVapView;
|
||||
@property (nonatomic, strong) QGVAPWrapView *texiaoVapView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMCPInRoomVapView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self.leftHeaderVapCover addSubview:self.leftHeaderVapView];
|
||||
[self.leftHeaderVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.leftHeaderVapCover);
|
||||
}];
|
||||
|
||||
[self.rightHeaderVapCover addSubview:self.rightHeaderVapView];
|
||||
[self.rightHeaderVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.rightHeaderVapCover);
|
||||
}];
|
||||
|
||||
[self.inRoomTXCover addSubview:self.texiaoVapView];
|
||||
[self.texiaoVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(0);
|
||||
make.width.mas_equalTo(APPW);
|
||||
make.height.mas_equalTo(APPH);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)playVapWithDict:(NSDictionary *)dict
|
||||
{
|
||||
NSString *send_nick_name = [dict safeStringForKey:@"send_nick_name"];
|
||||
NSString *send_head_pic = [dict safeStringForKey:@"send_head_pic"];
|
||||
NSString *receive_nick_name = [dict safeStringForKey:@"receive_nick_name"];
|
||||
NSString *receive_head_pic = [dict safeStringForKey:@"receive_head_pic"];
|
||||
NSString *texiao_img = [dict safeStringForKey:@"texiao_img"];
|
||||
NSString *avatar_play_image = [dict safeStringForKey:@"avatar_play_image"];
|
||||
NSString *receive_avatar_play_image = [dict safeStringForKey:@"receive_avatar_play_image"];
|
||||
|
||||
if (avatar_play_image.length>0){
|
||||
[self.leftHeaderVapView playMemoryWithStr:C_string(avatar_play_image) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.leftHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:nil];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.leftHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
if (receive_avatar_play_image.length>0){
|
||||
[self.rightHeaderVapView playMemoryWithStr:C_string(receive_avatar_play_image) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.rightHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:nil];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.rightHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
if (texiao_img.length>0){
|
||||
[self.texiaoVapView playMemoryWithStr:C_string(texiao_img) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.texiaoVapView playHWDMP4:fileStr repeatCount:0 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.texiaoVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
[self.leftHeaderPic sd_setImageWithURL:[NSURL URLWithString:send_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[self.rightHeaderPic sd_setImageWithURL:[NSURL URLWithString:receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.leftNicknameLabel.text = send_nick_name;
|
||||
self.rightNicknameLabel.text = receive_nick_name;
|
||||
}
|
||||
|
||||
|
||||
- (QGVAPWrapView *)leftHeaderVapView {
|
||||
if (!_leftHeaderVapView) {
|
||||
_leftHeaderVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
_leftHeaderVapView.hwd_Delegate = self;
|
||||
_leftHeaderVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_leftHeaderVapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _leftHeaderVapView;
|
||||
}
|
||||
|
||||
- (QGVAPWrapView *)rightHeaderVapView {
|
||||
if (!_rightHeaderVapView) {
|
||||
_rightHeaderVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
_rightHeaderVapView.hwd_Delegate = self;
|
||||
_rightHeaderVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_rightHeaderVapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _rightHeaderVapView;
|
||||
}
|
||||
|
||||
|
||||
- (QGVAPWrapView *)texiaoVapView {
|
||||
if (!_texiaoVapView) {
|
||||
_texiaoVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
_texiaoVapView.hwd_Delegate = self;
|
||||
_texiaoVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_texiaoVapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _texiaoVapView;
|
||||
}
|
||||
|
||||
- (void)vapWrap_viewDidStopPlayMP4:(NSInteger)lastFrameIndex view:(VAPView *)container
|
||||
{
|
||||
RCMicMainThread(^{
|
||||
self.hidden = YES;
|
||||
[self.leftHeaderVapView stopHWDMP4];
|
||||
[self.rightHeaderVapView stopHWDMP4];
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
121
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.xib
Normal file
121
SweetParty/主类/狸猫新增/情侣空间/LMCPInRoomVapView.xib
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMCPInRoomVapView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vbv-lO-DaV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="edZ-H6-JHw">
|
||||
<rect key="frame" x="96.666666666666686" y="536.33333333333337" width="200" height="120"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="hAa-5x-Dy5">
|
||||
<rect key="frame" x="20" y="20" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="E7k-03-41o"/>
|
||||
<constraint firstAttribute="width" constant="50" id="wWZ-Ke-bj3"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="gZ1-2p-scn">
|
||||
<rect key="frame" x="130" y="20" width="50" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="Lsr-6o-Fn8"/>
|
||||
<constraint firstAttribute="height" constant="50" id="jDo-JX-gFo"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8wW-wP-nRE">
|
||||
<rect key="frame" x="10" y="10" width="70" height="70"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="70" id="VPR-Ln-qZb"/>
|
||||
<constraint firstAttribute="height" constant="70" id="kCS-2a-ds0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rKm-0E-Tig">
|
||||
<rect key="frame" x="31.666666666666671" y="85" width="26.666666666666671" height="15.666666666666671"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gev-q6-ARG">
|
||||
<rect key="frame" x="141.66666666666669" y="85" width="26.666666666666657" height="15.666666666666671"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gaQ-5h-dua">
|
||||
<rect key="frame" x="120" y="10" width="70" height="70"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="70" id="aW8-Mh-ruo"/>
|
||||
<constraint firstAttribute="width" constant="70" id="rZ7-I6-JKM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="8wW-wP-nRE" firstAttribute="centerX" secondItem="hAa-5x-Dy5" secondAttribute="centerX" id="1Zz-6B-85S"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gZ1-2p-scn" secondAttribute="trailing" constant="20" id="4nU-dP-uXb"/>
|
||||
<constraint firstItem="rKm-0E-Tig" firstAttribute="top" secondItem="8wW-wP-nRE" secondAttribute="bottom" constant="5" id="Fjn-P9-rhY"/>
|
||||
<constraint firstItem="8wW-wP-nRE" firstAttribute="centerY" secondItem="hAa-5x-Dy5" secondAttribute="centerY" id="GFW-Lg-PzS"/>
|
||||
<constraint firstAttribute="width" constant="200" id="Je5-6X-H1s"/>
|
||||
<constraint firstItem="gZ1-2p-scn" firstAttribute="top" secondItem="edZ-H6-JHw" secondAttribute="top" constant="20" id="T8s-yp-hIR"/>
|
||||
<constraint firstItem="gaQ-5h-dua" firstAttribute="centerX" secondItem="gZ1-2p-scn" secondAttribute="centerX" id="TcU-nA-XUc"/>
|
||||
<constraint firstItem="hAa-5x-Dy5" firstAttribute="leading" secondItem="edZ-H6-JHw" secondAttribute="leading" constant="20" id="cnV-YJ-sqj"/>
|
||||
<constraint firstItem="Gev-q6-ARG" firstAttribute="centerX" secondItem="gaQ-5h-dua" secondAttribute="centerX" id="d4f-up-UIO"/>
|
||||
<constraint firstItem="rKm-0E-Tig" firstAttribute="centerX" secondItem="8wW-wP-nRE" secondAttribute="centerX" id="gPJ-vs-0Rw"/>
|
||||
<constraint firstItem="hAa-5x-Dy5" firstAttribute="top" secondItem="edZ-H6-JHw" secondAttribute="top" constant="20" id="gyw-u3-ocG"/>
|
||||
<constraint firstItem="gaQ-5h-dua" firstAttribute="centerY" secondItem="gZ1-2p-scn" secondAttribute="centerY" id="irb-YC-otu"/>
|
||||
<constraint firstAttribute="height" constant="120" id="mCw-rd-Nv6"/>
|
||||
<constraint firstItem="Gev-q6-ARG" firstAttribute="top" secondItem="gaQ-5h-dua" secondAttribute="bottom" constant="5" id="rnH-vN-uaS"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="edZ-H6-JHw" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" multiplier="1.4" id="Svx-ob-u7O"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Vbv-lO-DaV" secondAttribute="bottom" id="amc-rq-iI7"/>
|
||||
<constraint firstItem="Vbv-lO-DaV" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="f77-mD-aGl"/>
|
||||
<constraint firstItem="Vbv-lO-DaV" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="niT-AW-BDZ"/>
|
||||
<constraint firstItem="Vbv-lO-DaV" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="oO3-1Q-XFh"/>
|
||||
<constraint firstItem="edZ-H6-JHw" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="qHk-Ad-X2E"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="inRoomTXCover" destination="Vbv-lO-DaV" id="x6s-Hr-NR8"/>
|
||||
<outlet property="leftHeaderPic" destination="hAa-5x-Dy5" id="BTa-dh-cof"/>
|
||||
<outlet property="leftHeaderVapCover" destination="8wW-wP-nRE" id="3op-sA-4pX"/>
|
||||
<outlet property="leftNicknameLabel" destination="rKm-0E-Tig" id="nY0-z0-odV"/>
|
||||
<outlet property="rightHeaderPic" destination="gZ1-2p-scn" id="bR8-E4-tf3"/>
|
||||
<outlet property="rightHeaderVapCover" destination="gaQ-5h-dua" id="Hpa-qK-Xsm"/>
|
||||
<outlet property="rightNicknameLabel" destination="Gev-q6-ARG" id="NAF-Uv-enH"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="-11.267605633802818"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="90" height="90"/>
|
||||
</resources>
|
||||
</document>
|
||||
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.h
Normal file
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// LMCPSpaceCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/13.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMCPSpaceDressListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMCPSpaceCollectionViewCellID = @"LMCPSpaceCollectionViewCellID";
|
||||
@interface LMCPSpaceCollectionViewCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *levelLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *dressIcon;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *basePic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *dressName;
|
||||
|
||||
|
||||
@property (nonatomic, strong) LMCPSpaceDressListModel *model;
|
||||
|
||||
- (void)setHeaderDecInfoWithModel:(LMCPSpaceDressListModel *)model;
|
||||
- (void)setCPTexiaoInfoWithModel:(LMCPSpaceDressListModel *)model;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
54
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.m
Normal file
54
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.m
Normal file
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// LMCPSpaceCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/13.
|
||||
//
|
||||
|
||||
#import "LMCPSpaceCollectionViewCell.h"
|
||||
|
||||
@implementation LMCPSpaceCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.levelLabel.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(32, 16) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
}
|
||||
|
||||
- (void)setHeaderDecInfoWithModel:(LMCPSpaceDressListModel *)model
|
||||
{
|
||||
[self.basePic sd_setImageWithURL:[NSURL URLWithString:model.head_decorate_img] placeholderImage:kDefaultUserIcon];
|
||||
self.dressName.text = model.head_decorate_title;
|
||||
if ([model.is_using isEqualToString:@"1"]){
|
||||
self.dressIcon.hidden = NO;
|
||||
}else{
|
||||
self.dressIcon.hidden = YES;
|
||||
}
|
||||
self.levelLabel.text = [NSString stringWithFormat:@"Lv%@",model.level];
|
||||
if ([model.js_suo isEqualToString:@"2"]){
|
||||
self.contentView.alpha = 0.6;
|
||||
}else{
|
||||
self.contentView.alpha = 1;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCPTexiaoInfoWithModel:(LMCPSpaceDressListModel *)model
|
||||
{
|
||||
[self.basePic sd_setImageWithURL:[NSURL URLWithString:model.cp_tx_img] placeholderImage:kDefaultUserIcon];
|
||||
self.dressName.text = model.cp_tx_title;
|
||||
if ([model.is_using isEqualToString:@"1"]){
|
||||
self.dressIcon.hidden = NO;
|
||||
}else{
|
||||
self.dressIcon.hidden = YES;
|
||||
}
|
||||
self.levelLabel.text = [NSString stringWithFormat:@"Lv%@",model.level];
|
||||
if ([model.js_suo isEqualToString:@"2"]){
|
||||
self.contentView.alpha = 0.6;
|
||||
}else{
|
||||
self.contentView.alpha = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
92
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.xib
Normal file
92
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceCollectionViewCell.xib
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="LMCPSpaceCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="95" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="95" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_kongjian_item_sel" translatesAutoresizingMaskIntoConstraints="NO" id="Cfc-K8-jxe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="95" height="126"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_kongjian_level" translatesAutoresizingMaskIntoConstraints="NO" id="2BV-aZ-nJL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="36" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="LvF-DJ-4sG"/>
|
||||
<constraint firstAttribute="width" constant="36" id="hrp-k3-zra"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LV1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PeZ-TY-yuL">
|
||||
<rect key="frame" x="9.3333333333333339" y="5" width="17.333333333333329" height="12"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_kongjian_yipeidai" translatesAutoresizingMaskIntoConstraints="NO" id="8wS-aM-Vxj">
|
||||
<rect key="frame" x="25.666666666666671" y="98" width="44" height="18"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="p1m-d3-TuH">
|
||||
<rect key="frame" x="20" y="20" width="55" height="55"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="55" id="Mwb-l5-lPI"/>
|
||||
<constraint firstAttribute="height" constant="55" id="uTI-OZ-jqj"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hLv-gz-U8i">
|
||||
<rect key="frame" x="35.333333333333336" y="81" width="24.666666666666664" height="14.333333333333329"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="p1m-d3-TuH" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="20" id="1RZ-2x-HpK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8wS-aM-Vxj" secondAttribute="bottom" constant="10" id="3T6-3U-UqR"/>
|
||||
<constraint firstItem="hLv-gz-U8i" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="3fd-QW-fAY"/>
|
||||
<constraint firstItem="8wS-aM-Vxj" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="4hd-Gq-lpm"/>
|
||||
<constraint firstItem="Cfc-K8-jxe" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="8ci-BN-gJB"/>
|
||||
<constraint firstItem="2BV-aZ-nJL" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="COf-Rt-dDi"/>
|
||||
<constraint firstItem="PeZ-TY-yuL" firstAttribute="centerX" secondItem="2BV-aZ-nJL" secondAttribute="centerX" id="CW8-Np-4to"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Cfc-K8-jxe" secondAttribute="trailing" id="JYq-7S-egm"/>
|
||||
<constraint firstItem="hLv-gz-U8i" firstAttribute="top" secondItem="p1m-d3-TuH" secondAttribute="bottom" constant="6" id="L5l-0Q-yoK"/>
|
||||
<constraint firstItem="2BV-aZ-nJL" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="RS2-eX-1W3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Cfc-K8-jxe" secondAttribute="bottom" id="XXG-F8-GXS"/>
|
||||
<constraint firstItem="p1m-d3-TuH" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="Y2y-o8-58v"/>
|
||||
<constraint firstItem="Cfc-K8-jxe" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="ceD-i0-Cb7"/>
|
||||
<constraint firstItem="PeZ-TY-yuL" firstAttribute="centerY" secondItem="2BV-aZ-nJL" secondAttribute="centerY" id="rv5-E3-hoV"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="107" height="116"/>
|
||||
<connections>
|
||||
<outlet property="basePic" destination="p1m-d3-TuH" id="Vqs-tq-8PF"/>
|
||||
<outlet property="dressIcon" destination="8wS-aM-Vxj" id="78s-7E-mpj"/>
|
||||
<outlet property="dressName" destination="hLv-gz-U8i" id="pwC-0E-Owd"/>
|
||||
<outlet property="levelLabel" destination="PeZ-TY-yuL" id="lwT-CW-sPx"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-22" y="59"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="cp_kongjian_item_sel" width="95" height="126"/>
|
||||
<image name="cp_kongjian_level" width="36" height="22"/>
|
||||
<image name="cp_kongjian_yipeidai" width="44" height="18"/>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceDressListModel.h
Normal file
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceDressListModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// LMCPSpaceDressListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMCPSpaceDressListModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *cp_tx_play_img;
|
||||
@property (nonatomic, strong) NSString *js_suo;
|
||||
@property (nonatomic, strong) NSString *is_using;
|
||||
@property (nonatomic, strong) NSString *head_decorate_img;
|
||||
@property (nonatomic, strong) NSString *head_decorate_title;
|
||||
@property (nonatomic, strong) NSString *head_decorate_play_img;
|
||||
@property (nonatomic, strong) NSString *level;
|
||||
@property (nonatomic, strong) NSString *head_decorate_id;
|
||||
@property (nonatomic, strong) NSString *cp_tx_id;
|
||||
@property (nonatomic, strong) NSString *cp_tx_img;
|
||||
@property (nonatomic, strong) NSString *cp_tx_title;
|
||||
@property (nonatomic, strong) NSString *udid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceDressListModel.m
Normal file
12
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceDressListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMCPSpaceDressListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/16.
|
||||
//
|
||||
|
||||
#import "LMCPSpaceDressListModel.h"
|
||||
|
||||
@implementation LMCPSpaceDressListModel
|
||||
|
||||
@end
|
||||
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceInfoModel.h
Normal file
29
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceInfoModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// LMCPSpaceInfoModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/16.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMCPSpaceInfoModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *uid;
|
||||
@property (nonatomic, strong) NSString *receive_uid;
|
||||
@property (nonatomic, strong) NSString *cp_level;
|
||||
@property (nonatomic, assign) CGFloat cp_value;
|
||||
@property (nonatomic, strong) NSString *u_nick_name;
|
||||
@property (nonatomic, strong) NSString *u_head_pic;
|
||||
@property (nonatomic, strong) NSString *receive_nick_name;
|
||||
@property (nonatomic, strong) NSString *receive_head_pic;
|
||||
@property (nonatomic, assign) CGFloat next_cp_value;
|
||||
@property (nonatomic, strong) NSString *receive_avatar_play_image;
|
||||
@property (nonatomic, strong) NSString *u_avatar_play_image;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceInfoModel.m
Normal file
12
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceInfoModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMCPSpaceInfoModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/16.
|
||||
//
|
||||
|
||||
#import "LMCPSpaceInfoModel.h"
|
||||
|
||||
@implementation LMCPSpaceInfoModel
|
||||
|
||||
@end
|
||||
16
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.h
Normal file
16
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LMCPSpaceViewController.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/13.
|
||||
//
|
||||
|
||||
#import "BaseController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMCPSpaceViewController : BaseController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
293
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.m
Normal file
293
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.m
Normal file
@@ -0,0 +1,293 @@
|
||||
//
|
||||
// LMCPSpaceViewController.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/13.
|
||||
//
|
||||
|
||||
#import "LMCPSpaceViewController.h"
|
||||
#import "LMCPSpaceCollectionViewCell.h"
|
||||
#import "LMCPSpaceInfoModel.h"
|
||||
#import "QGVAPWrapView.h"
|
||||
#import "UIView+VAP.h"
|
||||
#import "QGVAPWrapView+download.h"
|
||||
|
||||
@interface LMCPSpaceViewController ()<JXCategoryViewDelegate,UICollectionViewDelegate,UICollectionViewDataSource,HWDMP4PlayDelegate,VAPWrapViewDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *cateCoverView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topLevelLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *leftHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *rightHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *valueLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *leftNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rightNameLabel;
|
||||
|
||||
@property (nonatomic, strong) JXCategoryTitleView *categoryView;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *dressItemView;
|
||||
|
||||
@property (nonatomic, strong) LMCPSpaceInfoModel *infoModel;
|
||||
@property (nonatomic, assign) NSInteger type;
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
|
||||
@property (nonatomic, strong) QGVAPWrapView *leftHeaderVapView;
|
||||
@property (nonatomic, strong) QGVAPWrapView *rightHeaderVapView;
|
||||
@property (nonatomic, strong) QGVAPWrapView *texiaoVapView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *rightVapCover;
|
||||
@property (weak, nonatomic) IBOutlet UIView *leftVapCover;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMCPSpaceViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.navTitle = @"情侣空间";
|
||||
[self.customNavBar styleClear];
|
||||
self.type = 1;
|
||||
|
||||
[self setupUI];
|
||||
[self requestLoadMyCPInfo];
|
||||
[self requestLoadCPDressList];
|
||||
}
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
[self.cateCoverView addSubview:self.categoryView];
|
||||
[self.categoryView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.cateCoverView);
|
||||
}];
|
||||
|
||||
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
|
||||
flowLayout.itemSize = CGSizeMake((APPW-15*6)/3, 126);
|
||||
flowLayout.minimumLineSpacing = 15;
|
||||
flowLayout.minimumInteritemSpacing = 15;
|
||||
flowLayout.sectionInset = UIEdgeInsetsMake(0, 15, 15, 15);
|
||||
|
||||
self.dressItemView.collectionViewLayout = flowLayout;
|
||||
self.dressItemView.delegate = self;
|
||||
self.dressItemView.dataSource = self;
|
||||
[self.dressItemView registerNib:[UINib nibWithNibName:@"LMCPSpaceCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMCPSpaceCollectionViewCellID];
|
||||
|
||||
[self.leftVapCover addSubview:self.leftHeaderVapView];
|
||||
[self.leftHeaderVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.leftVapCover);
|
||||
}];
|
||||
|
||||
[self.rightVapCover addSubview:self.rightHeaderVapView];
|
||||
[self.rightHeaderVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.rightVapCover);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.texiaoVapView];
|
||||
[self.texiaoVapView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)setupInfoWithModel
|
||||
{
|
||||
[self.leftHeaderPic sd_setImageWithURL:[NSURL URLWithString:self.infoModel.u_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[self.rightHeaderPic sd_setImageWithURL:[NSURL URLWithString:self.infoModel.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.leftNameLabel.text = self.infoModel.u_nick_name;
|
||||
self.rightNameLabel.text = self.infoModel.receive_nick_name;
|
||||
self.topLevelLabel.text = [NSString stringWithFormat:@"LV.%@",self.infoModel.cp_level];
|
||||
self.valueLabel.text = [NSString stringWithFormat:@"%.0f/%.0f",self.infoModel.cp_value,self.infoModel.next_cp_value];
|
||||
WEAK_SELF;
|
||||
if (self.infoModel.u_avatar_play_image.length>0){
|
||||
[self.leftHeaderVapView playMemoryWithStr:C_string(self.infoModel.u_avatar_play_image) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.leftHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[weakSelf.leftHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
if (self.infoModel.receive_avatar_play_image.length>0){
|
||||
[self.rightHeaderVapView playMemoryWithStr:C_string(self.infoModel.receive_avatar_play_image) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.rightHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[weakSelf.rightHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArr.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMCPSpaceCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMCPSpaceCollectionViewCellID forIndexPath:indexPath];
|
||||
LMCPSpaceDressListModel *model = self.dataArr[indexPath.item];
|
||||
if (self.type == 1){
|
||||
[cell setHeaderDecInfoWithModel:model];
|
||||
}else{
|
||||
[cell setCPTexiaoInfoWithModel:model];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
LMCPSpaceDressListModel *model = self.dataArr[indexPath.item];
|
||||
if ([model.js_suo isEqualToString:@"1"]){
|
||||
NSDictionary *params = @{@"udid":model.udid};
|
||||
NSString *urlStr = @"/api/decorate/user_use_decorate";
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:urlStr Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
[self requestLoadCPDressList];
|
||||
if (self.type == 1){
|
||||
if ([self.infoModel.uid isEqualToString:[BJUserManager userInfo].uid]){
|
||||
[self.leftHeaderVapView playMemoryWithStr:C_string(model.head_decorate_play_img) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.leftHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.leftHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}else{
|
||||
[self.rightHeaderVapView playMemoryWithStr:C_string(model.head_decorate_play_img) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.rightHeaderVapView playHWDMP4:fileStr repeatCount:-1 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.rightHeaderVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
}else{
|
||||
self.texiaoVapView.hidden = NO;
|
||||
[self.texiaoVapView playMemoryWithStr:C_string(model.cp_tx_play_img) Success:^(NSURL * _Nonnull filePath) {
|
||||
NSString *fileStr = [filePath absoluteString];
|
||||
if ([fileStr containsString:@"file://"]) {
|
||||
fileStr = [fileStr substringFromIndex:7];
|
||||
}
|
||||
[self.texiaoVapView playHWDMP4:fileStr repeatCount:0 delegate:self];
|
||||
} Failure:^(NSError * _Nonnull error) {
|
||||
[self.texiaoVapView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}else{
|
||||
[HelpPageDefine showMessage:@"未解锁"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)requestLoadMyCPInfo
|
||||
{
|
||||
[BJHttpTool BJ_GetMy_cpWithParameters:@{} success:^(id response) {
|
||||
self.infoModel = [LMCPSpaceInfoModel mj_objectWithKeyValues:response[@"data"]];
|
||||
[self setupInfoWithModel];
|
||||
} failure:^(NSError *error) {
|
||||
[self.leftHeaderPic sd_setImageWithURL:[NSURL URLWithString:[BJUserManager userInfo].head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.leftNameLabel.text = [BJUserManager userInfo].nick_name;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)requestLoadCPDressList
|
||||
{
|
||||
[BJHttpTool BJ_GetMy_cp_txkWithParameters:@{@"type":[NSString stringWithFormat:@"%ld",self.type]} success:^(id response) {
|
||||
self.dataArr = [LMCPSpaceDressListModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
[self.dressItemView reloadData];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index
|
||||
{
|
||||
if (index == 0){
|
||||
self.type = 1;
|
||||
}else{
|
||||
self.type = 9;
|
||||
}
|
||||
[self requestLoadCPDressList];
|
||||
}
|
||||
|
||||
// 分页菜单视图
|
||||
- (JXCategoryTitleView *)categoryView {
|
||||
if (!_categoryView) {
|
||||
_categoryView = [[JXCategoryTitleView alloc] init];
|
||||
_categoryView.titleFont = YBBoldFont(14);
|
||||
_categoryView.titleSelectedFont = YBBoldFont(16);
|
||||
_categoryView.titleColor = HEXCOLORA(0x999999, 1);
|
||||
_categoryView.titleSelectedColor = HEXCOLOR(0x333333);
|
||||
_categoryView.delegate = self;
|
||||
_categoryView.contentEdgeInsetLeft = 60;
|
||||
_categoryView.contentEdgeInsetRight = 60;
|
||||
_categoryView.titles = @[@"头像框",@"入场特效"];
|
||||
|
||||
// JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init];
|
||||
// backgroundView.indicatorWidth = 69;
|
||||
// backgroundView.indicatorHeight = 27;
|
||||
// backgroundView.indicatorCornerRadius = 13.5;
|
||||
// backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(79, 27) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
// _categoryView.indicators = @[backgroundView];
|
||||
}
|
||||
return _categoryView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)dataArr
|
||||
{
|
||||
if (!_dataArr){
|
||||
_dataArr = [NSMutableArray array];
|
||||
}
|
||||
return _dataArr;
|
||||
}
|
||||
|
||||
- (QGVAPWrapView *)leftHeaderVapView {
|
||||
if (!_leftHeaderVapView) {
|
||||
_leftHeaderVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
// _leftHeaderVapView.hwd_Delegate = self;
|
||||
_leftHeaderVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_leftHeaderVapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _leftHeaderVapView;
|
||||
}
|
||||
|
||||
- (QGVAPWrapView *)rightHeaderVapView {
|
||||
if (!_rightHeaderVapView) {
|
||||
_rightHeaderVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
// _rightHeaderVapView.hwd_Delegate = self;
|
||||
_rightHeaderVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_rightHeaderVapView.userInteractionEnabled = NO;
|
||||
}
|
||||
return _rightHeaderVapView;
|
||||
}
|
||||
|
||||
|
||||
- (QGVAPWrapView *)texiaoVapView {
|
||||
if (!_texiaoVapView) {
|
||||
_texiaoVapView = [[QGVAPWrapView alloc] initWithFrame:CGRectZero];
|
||||
_texiaoVapView.hwd_Delegate = self;
|
||||
_texiaoVapView.contentMode = QGVAPWrapViewContentModeScaleToFill;
|
||||
_texiaoVapView.userInteractionEnabled = NO;
|
||||
_texiaoVapView.hidden = YES;
|
||||
}
|
||||
return _texiaoVapView;
|
||||
}
|
||||
|
||||
- (void)vapWrap_viewDidStopPlayMP4:(NSInteger)lastFrameIndex view:(VAPView *)container
|
||||
{
|
||||
if (container == self.texiaoVapView){
|
||||
self.texiaoVapView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
212
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.xib
Normal file
212
SweetParty/主类/狸猫新增/情侣空间/LMCPSpaceViewController.xib
Normal file
@@ -0,0 +1,212 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LMCPSpaceViewController">
|
||||
<connections>
|
||||
<outlet property="cateCoverView" destination="0aK-s3-7s8" id="Job-7k-RuU"/>
|
||||
<outlet property="dressItemView" destination="76g-EA-cPC" id="Myc-l0-tHx"/>
|
||||
<outlet property="leftHeaderPic" destination="sJd-PV-na8" id="u3K-63-voU"/>
|
||||
<outlet property="leftNameLabel" destination="Ja1-NL-mjq" id="Y2t-17-Y6Q"/>
|
||||
<outlet property="leftVapCover" destination="k7U-7U-i90" id="dGF-Qf-0Wt"/>
|
||||
<outlet property="rightHeaderPic" destination="X0H-IS-qTE" id="XJc-CT-Bmu"/>
|
||||
<outlet property="rightNameLabel" destination="ze8-xX-VJ9" id="KII-OD-kve"/>
|
||||
<outlet property="rightVapCover" destination="hPL-Sa-CGX" id="s4c-Nn-NgE"/>
|
||||
<outlet property="topLevelLabel" destination="TLm-4o-mPF" id="dcc-tv-1Uw"/>
|
||||
<outlet property="valueLabel" destination="Hv5-Pl-XGV" id="dNT-9K-4E0"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_kongjian_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Ryg-GP-IRe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="sJd-PV-na8">
|
||||
<rect key="frame" x="48.666666666666657" y="134" width="60" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="EFn-T8-W7Y"/>
|
||||
<constraint firstAttribute="height" constant="60" id="xgN-0f-BC9"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="X0H-IS-qTE">
|
||||
<rect key="frame" x="266.66666666666669" y="134" width="60" height="60"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="60" id="YMr-pe-fzT"/>
|
||||
<constraint firstAttribute="height" constant="60" id="yfz-Uv-76z"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="k7U-7U-i90">
|
||||
<rect key="frame" x="38.666666666666657" y="124" width="80" height="80"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hPL-Sa-CGX">
|
||||
<rect key="frame" x="256.66666666666669" y="124" width="80" height="80"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_kongjian_aixin" translatesAutoresizingMaskIntoConstraints="NO" id="cuk-9h-KEb">
|
||||
<rect key="frame" x="138.66666666666666" y="115" width="98" height="98"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="98" id="CaL-C8-wgd"/>
|
||||
<constraint firstAttribute="width" constant="98" id="ki3-no-Sfa"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LV.0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TLm-4o-mPF">
|
||||
<rect key="frame" x="163.33333333333334" y="149.66666666666666" width="48.333333333333343" height="28.666666666666657"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4fi-Ly-4vV">
|
||||
<rect key="frame" x="155" y="193" width="65" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hv5-Pl-XGV">
|
||||
<rect key="frame" x="10" y="0.0" width="45" height="20"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.5725490196078431" green="0.28627450980392155" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Hv5-Pl-XGV" secondAttribute="trailing" constant="10" id="4dh-YD-5E1"/>
|
||||
<constraint firstItem="Hv5-Pl-XGV" firstAttribute="top" secondItem="4fi-Ly-4vV" secondAttribute="top" id="PHm-1d-XkP"/>
|
||||
<constraint firstItem="Hv5-Pl-XGV" firstAttribute="leading" secondItem="4fi-Ly-4vV" secondAttribute="leading" constant="10" id="PLD-nA-heR"/>
|
||||
<constraint firstAttribute="height" constant="20" id="cPU-oV-JRI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Hv5-Pl-XGV" secondAttribute="bottom" id="gV8-ZW-6q0"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="65" id="yKj-H7-KGb"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ja1-NL-mjq">
|
||||
<rect key="frame" x="54" y="214" width="49.333333333333343" height="14.333333333333343"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="暂无" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ze8-xX-VJ9">
|
||||
<rect key="frame" x="284.33333333333331" y="214" width="24.666666666666686" height="14.333333333333343"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t4z-qg-WDl">
|
||||
<rect key="frame" x="15" y="240" width="345" height="512"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="cp_list_bg" translatesAutoresizingMaskIntoConstraints="NO" id="uOR-TF-ybU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="512"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="专属福利" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fgJ-QT-F3U">
|
||||
<rect key="frame" x="135.66666666666666" y="15" width="74" height="22"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0aK-s3-7s8">
|
||||
<rect key="frame" x="0.0" y="45" width="345" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="yUR-vV-UcB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="76g-EA-cPC">
|
||||
<rect key="frame" x="0.0" y="89" width="345" height="423"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="PEQ-OE-c8B">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="uOR-TF-ybU" secondAttribute="bottom" id="55Q-K7-rMO"/>
|
||||
<constraint firstItem="76g-EA-cPC" firstAttribute="leading" secondItem="t4z-qg-WDl" secondAttribute="leading" id="A8E-d0-bFO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="76g-EA-cPC" secondAttribute="trailing" id="EVU-Y4-x31"/>
|
||||
<constraint firstItem="fgJ-QT-F3U" firstAttribute="centerX" secondItem="t4z-qg-WDl" secondAttribute="centerX" id="JCa-J5-XNr"/>
|
||||
<constraint firstItem="76g-EA-cPC" firstAttribute="top" secondItem="0aK-s3-7s8" secondAttribute="bottom" id="KvJ-VJ-pWK"/>
|
||||
<constraint firstItem="0aK-s3-7s8" firstAttribute="top" secondItem="t4z-qg-WDl" secondAttribute="top" constant="45" id="LHr-lc-XXq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="uOR-TF-ybU" secondAttribute="trailing" id="PMa-jW-acB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0aK-s3-7s8" secondAttribute="trailing" id="We9-JW-iy6"/>
|
||||
<constraint firstItem="uOR-TF-ybU" firstAttribute="top" secondItem="t4z-qg-WDl" secondAttribute="top" id="XVF-ep-li6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="76g-EA-cPC" secondAttribute="bottom" id="dkB-Mk-IvW"/>
|
||||
<constraint firstItem="fgJ-QT-F3U" firstAttribute="top" secondItem="t4z-qg-WDl" secondAttribute="top" constant="15" id="eaS-6i-cEN"/>
|
||||
<constraint firstItem="uOR-TF-ybU" firstAttribute="leading" secondItem="t4z-qg-WDl" secondAttribute="leading" id="ey4-R7-YTS"/>
|
||||
<constraint firstItem="0aK-s3-7s8" firstAttribute="leading" secondItem="t4z-qg-WDl" secondAttribute="leading" id="uYG-7R-L02"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="t4z-qg-WDl" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="15" id="01f-Cs-55c"/>
|
||||
<constraint firstAttribute="bottom" secondItem="t4z-qg-WDl" secondAttribute="bottom" constant="60" id="2d1-l0-dK2"/>
|
||||
<constraint firstItem="k7U-7U-i90" firstAttribute="top" secondItem="sJd-PV-na8" secondAttribute="top" constant="-10" id="6q3-lJ-f4j"/>
|
||||
<constraint firstItem="k7U-7U-i90" firstAttribute="leading" secondItem="sJd-PV-na8" secondAttribute="leading" constant="-10" id="76f-gp-nA9"/>
|
||||
<constraint firstItem="Ja1-NL-mjq" firstAttribute="centerX" secondItem="sJd-PV-na8" secondAttribute="centerX" id="CAf-x3-nUa"/>
|
||||
<constraint firstItem="cuk-9h-KEb" firstAttribute="leading" secondItem="sJd-PV-na8" secondAttribute="trailing" constant="30" id="ICp-9w-nbb"/>
|
||||
<constraint firstItem="X0H-IS-qTE" firstAttribute="leading" secondItem="cuk-9h-KEb" secondAttribute="trailing" constant="30" id="IGV-Ay-ZxT"/>
|
||||
<constraint firstItem="ze8-xX-VJ9" firstAttribute="top" secondItem="hPL-Sa-CGX" secondAttribute="bottom" constant="10" id="Jwh-BT-tx1"/>
|
||||
<constraint firstItem="TLm-4o-mPF" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="Mjr-jU-wss"/>
|
||||
<constraint firstItem="4fi-Ly-4vV" firstAttribute="centerX" secondItem="cuk-9h-KEb" secondAttribute="centerX" id="Nhx-bf-XWA"/>
|
||||
<constraint firstItem="hPL-Sa-CGX" firstAttribute="trailing" secondItem="X0H-IS-qTE" secondAttribute="trailing" constant="10" id="Ni8-ue-h37"/>
|
||||
<constraint firstItem="cuk-9h-KEb" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="115" id="OfG-ge-WO7"/>
|
||||
<constraint firstItem="ze8-xX-VJ9" firstAttribute="centerX" secondItem="X0H-IS-qTE" secondAttribute="centerX" id="QSp-Cr-HrT"/>
|
||||
<constraint firstItem="X0H-IS-qTE" firstAttribute="centerY" secondItem="sJd-PV-na8" secondAttribute="centerY" id="TU7-dk-3fP"/>
|
||||
<constraint firstItem="Ryg-GP-IRe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="UHM-b5-m7c"/>
|
||||
<constraint firstAttribute="trailing" secondItem="t4z-qg-WDl" secondAttribute="trailing" constant="15" id="W68-It-y1B"/>
|
||||
<constraint firstItem="4fi-Ly-4vV" firstAttribute="bottom" secondItem="cuk-9h-KEb" secondAttribute="bottom" id="ZN5-GX-Byk"/>
|
||||
<constraint firstItem="Ryg-GP-IRe" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="ZeU-bc-KpT"/>
|
||||
<constraint firstItem="cuk-9h-KEb" firstAttribute="centerY" secondItem="sJd-PV-na8" secondAttribute="centerY" id="bGn-V4-NVe"/>
|
||||
<constraint firstItem="cuk-9h-KEb" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="bKR-yG-oXA"/>
|
||||
<constraint firstItem="hPL-Sa-CGX" firstAttribute="leading" secondItem="X0H-IS-qTE" secondAttribute="leading" constant="-10" id="cn1-ye-Djd"/>
|
||||
<constraint firstItem="Ryg-GP-IRe" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="d3B-eY-4NI"/>
|
||||
<constraint firstItem="hPL-Sa-CGX" firstAttribute="top" secondItem="X0H-IS-qTE" secondAttribute="top" constant="-10" id="eGl-hH-N04"/>
|
||||
<constraint firstItem="k7U-7U-i90" firstAttribute="trailing" secondItem="sJd-PV-na8" secondAttribute="trailing" constant="10" id="hLa-lk-uMA"/>
|
||||
<constraint firstItem="hPL-Sa-CGX" firstAttribute="bottom" secondItem="X0H-IS-qTE" secondAttribute="bottom" constant="10" id="hz2-A2-qBB"/>
|
||||
<constraint firstItem="TLm-4o-mPF" firstAttribute="centerY" secondItem="cuk-9h-KEb" secondAttribute="centerY" id="mde-Ln-Ytz"/>
|
||||
<constraint firstItem="TLm-4o-mPF" firstAttribute="centerX" secondItem="cuk-9h-KEb" secondAttribute="centerX" id="ndJ-fS-PYa"/>
|
||||
<constraint firstItem="t4z-qg-WDl" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="240" id="v5p-7v-AQP"/>
|
||||
<constraint firstItem="Ja1-NL-mjq" firstAttribute="top" secondItem="k7U-7U-i90" secondAttribute="bottom" constant="10" id="vwK-LB-CRf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Ryg-GP-IRe" secondAttribute="bottom" id="yJf-dS-Y8e"/>
|
||||
<constraint firstItem="k7U-7U-i90" firstAttribute="bottom" secondItem="sJd-PV-na8" secondAttribute="bottom" constant="10" id="yeR-mg-tct"/>
|
||||
<constraint firstItem="cuk-9h-KEb" firstAttribute="centerY" secondItem="sJd-PV-na8" secondAttribute="centerY" id="zBy-LW-cr5"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="80" y="149"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="cp_kongjian_aixin" width="98" height="98"/>
|
||||
<image name="cp_kongjian_bg" width="375" height="812"/>
|
||||
<image name="cp_list_bg" width="345" height="515"/>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsListModel.h
Normal file
24
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsListModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMLoveLsListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMLoveLsListModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *uid;
|
||||
@property (nonatomic, strong) NSString *nick_name;
|
||||
@property (nonatomic, strong) NSString *head_pic;
|
||||
@property (nonatomic, strong) NSString *receive_uid;
|
||||
@property (nonatomic, strong) NSString *receive_nick_name;
|
||||
@property (nonatomic, strong) NSString *receive_head_pic;
|
||||
@property (nonatomic, strong) NSString *rank_value;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsListModel.m
Normal file
12
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMLoveLsListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMLoveLsListModel.h"
|
||||
|
||||
@implementation LMLoveLsListModel
|
||||
|
||||
@end
|
||||
25
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.h
Normal file
25
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// LMLoveLsTableViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMLoveLsListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMLoveLsTableViewCellID = @"LMLoveLsTableViewCellID";
|
||||
@interface LMLoveLsTableViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rankLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *leftHeaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *rightHaderPic;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *leftNicknameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *rightNicknameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *valueLabel;
|
||||
|
||||
@property (nonatomic, strong) LMLoveLsListModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
33
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.m
Normal file
33
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// LMLoveLsTableViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMLoveLsTableViewCell.h"
|
||||
|
||||
@implementation LMLoveLsTableViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(LMLoveLsListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
[self.leftHeaderPic sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[self.rightHaderPic sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.leftNicknameLabel.text = model.nick_name;
|
||||
self.rightNicknameLabel.text = model.receive_nick_name;
|
||||
self.valueLabel.text = [NSString stringWithFormat:@"%@",model.rank_value];
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
124
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.xib
Normal file
124
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveLsTableViewCell.xib
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="93" id="KGk-i7-Jjw" customClass="LMLoveLsTableViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gWn-gd-eed">
|
||||
<rect key="frame" x="15" y="5" width="345" height="55"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_cell_bg" translatesAutoresizingMaskIntoConstraints="NO" id="2NG-fS-qO1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="55"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="hdm-Pn-I1h">
|
||||
<rect key="frame" x="87" y="10.666666666666664" width="34" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="34" id="08W-B1-8G9"/>
|
||||
<constraint firstAttribute="height" constant="34" id="Xog-2X-V7Q"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="17"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="06" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kB1-Sf-mlC">
|
||||
<rect key="frame" x="15" y="16.666666666666664" width="24" height="21.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="4hp-3t-GRg">
|
||||
<rect key="frame" x="45" y="10.666666666666664" width="34" height="34"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="34" id="f1b-bP-ClM"/>
|
||||
<constraint firstAttribute="width" constant="34" id="pXT-fR-tLy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="17"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_list_xin" translatesAutoresizingMaskIntoConstraints="NO" id="NC8-ry-rop">
|
||||
<rect key="frame" x="71" y="15.666666666666668" width="24" height="24.000000000000004"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qA6-T1-JLh">
|
||||
<rect key="frame" x="131" y="10.666666666666664" width="22.666666666666657" height="13.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SyW-SD-v4A">
|
||||
<rect key="frame" x="131" y="31.333333333333332" width="22.666666666666657" height="13.333333333333332"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c1a-b8-dEA">
|
||||
<rect key="frame" x="318" y="16.666666666666664" width="12" height="21.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="c1a-b8-dEA" secondAttribute="trailing" constant="15" id="C9T-GN-u6e"/>
|
||||
<constraint firstItem="hdm-Pn-I1h" firstAttribute="centerY" secondItem="gWn-gd-eed" secondAttribute="centerY" id="D0M-GK-HTx"/>
|
||||
<constraint firstItem="c1a-b8-dEA" firstAttribute="centerY" secondItem="gWn-gd-eed" secondAttribute="centerY" id="Dbm-iD-rwn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2NG-fS-qO1" secondAttribute="trailing" id="HJ7-pf-kQc"/>
|
||||
<constraint firstItem="hdm-Pn-I1h" firstAttribute="leading" secondItem="NC8-ry-rop" secondAttribute="trailing" constant="-8" id="Mg6-DG-Sfe"/>
|
||||
<constraint firstItem="SyW-SD-v4A" firstAttribute="leading" secondItem="hdm-Pn-I1h" secondAttribute="trailing" constant="10" id="Oys-Fj-PAG"/>
|
||||
<constraint firstItem="4hp-3t-GRg" firstAttribute="centerY" secondItem="gWn-gd-eed" secondAttribute="centerY" id="TAY-vc-uNs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2NG-fS-qO1" secondAttribute="bottom" id="VKh-5L-FKb"/>
|
||||
<constraint firstItem="qA6-T1-JLh" firstAttribute="leading" secondItem="hdm-Pn-I1h" secondAttribute="trailing" constant="10" id="Z1u-K0-Ce7"/>
|
||||
<constraint firstItem="4hp-3t-GRg" firstAttribute="leading" secondItem="gWn-gd-eed" secondAttribute="leading" constant="45" id="db1-8p-f2u"/>
|
||||
<constraint firstItem="2NG-fS-qO1" firstAttribute="top" secondItem="gWn-gd-eed" secondAttribute="top" id="fYZ-fR-f1P"/>
|
||||
<constraint firstItem="2NG-fS-qO1" firstAttribute="leading" secondItem="gWn-gd-eed" secondAttribute="leading" id="g7m-7L-gZm"/>
|
||||
<constraint firstItem="kB1-Sf-mlC" firstAttribute="centerY" secondItem="gWn-gd-eed" secondAttribute="centerY" id="gwb-DS-2rJ"/>
|
||||
<constraint firstItem="NC8-ry-rop" firstAttribute="centerY" secondItem="gWn-gd-eed" secondAttribute="centerY" id="mjz-It-gU3"/>
|
||||
<constraint firstItem="kB1-Sf-mlC" firstAttribute="leading" secondItem="gWn-gd-eed" secondAttribute="leading" constant="15" id="tha-JT-t0P"/>
|
||||
<constraint firstItem="qA6-T1-JLh" firstAttribute="top" secondItem="hdm-Pn-I1h" secondAttribute="top" id="wJR-5N-mqW"/>
|
||||
<constraint firstItem="SyW-SD-v4A" firstAttribute="bottom" secondItem="hdm-Pn-I1h" secondAttribute="bottom" id="zCZ-Nu-j2m"/>
|
||||
<constraint firstItem="NC8-ry-rop" firstAttribute="leading" secondItem="4hp-3t-GRg" secondAttribute="trailing" constant="-8" id="zXq-dC-ZKY"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="gWn-gd-eed" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="2Le-AB-bDM"/>
|
||||
<constraint firstItem="gWn-gd-eed" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="EH0-rK-oQL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gWn-gd-eed" secondAttribute="trailing" constant="15" id="U21-5U-7az"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gWn-gd-eed" secondAttribute="bottom" constant="5" id="qoZ-hZ-pTm"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="leftHeaderPic" destination="4hp-3t-GRg" id="gDn-k0-x1Q"/>
|
||||
<outlet property="leftNicknameLabel" destination="qA6-T1-JLh" id="oi4-ti-68u"/>
|
||||
<outlet property="rankLabel" destination="kB1-Sf-mlC" id="cgQ-hk-6Ob"/>
|
||||
<outlet property="rightHaderPic" destination="hdm-Pn-I1h" id="yN7-io-ru3"/>
|
||||
<outlet property="rightNicknameLabel" destination="SyW-SD-v4A" id="rRB-lc-xbZ"/>
|
||||
<outlet property="valueLabel" destination="c1a-b8-dEA" id="2qN-bz-gKh"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="66" y="-22"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="love_mtl_cell_bg" width="345" height="54"/>
|
||||
<image name="love_mtl_rank_list_xin" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
16
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.h
Normal file
16
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LMLoveSkyWheelViewController.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "BaseController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMLoveSkyWheelViewController : BaseController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
121
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.m
Normal file
121
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.m
Normal file
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// LMLoveSkyWheelViewController.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMLoveSkyWheelViewController.h"
|
||||
#import "LMLovelsTableHeaderView.h"
|
||||
#import "LMLoveLsTableViewCell.h"
|
||||
|
||||
@interface LMLoveSkyWheelViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView *swTableView;
|
||||
@property (nonatomic, strong) LMLovelsTableHeaderView *headerView;
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
@property (nonatomic, strong) NSMutableArray *listDataArr;
|
||||
@property (nonatomic, strong) NSMutableArray *topDataArr;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMLoveSkyWheelViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.navTitle = @"";
|
||||
[self.customNavBar styleClear];
|
||||
|
||||
UIButton *btn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
[btn setImage:ImageNamed(@"week_home_yiwen") forState:(UIControlStateNormal)];
|
||||
[self.customNavBar addSubview:btn];
|
||||
[btn buttonAddTaget:^(UIButton *btn) {
|
||||
[UIViewController goWebWithUrl:[VERSION_HTTPS_SERVER stringByAppendingString:@"index.php/index/index/page_show?id=21"]];
|
||||
} forControlEvents:(UIControlEventTouchUpInside)];
|
||||
|
||||
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.width.height.mas_equalTo(30);
|
||||
make.top.mas_equalTo(yb_StatusBar_H+7);
|
||||
}];
|
||||
|
||||
[self.swTableView registerNib:[UINib nibWithNibName:@"LMLoveLsTableViewCell" bundle:nil] forCellReuseIdentifier:LMLoveLsTableViewCellID];
|
||||
self.swTableView.tableHeaderView = self.headerView;
|
||||
|
||||
[self requestmotianLunTodayRank];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.listDataArr.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
LMLoveLsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:LMLoveLsTableViewCellID forIndexPath:indexPath];
|
||||
LMLoveLsListModel *model = self.listDataArr[indexPath.row];
|
||||
cell.model = model;
|
||||
cell.rankLabel.text = [NSString stringWithFormat:@"%02ld",indexPath.row+6];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (LMLovelsTableHeaderView *)headerView
|
||||
{
|
||||
if (!_headerView){
|
||||
_headerView = LoadNib(@"LMLovelsTableHeaderView");
|
||||
_headerView.frame = CGRectMake(0, 0, APPW, 704);
|
||||
}
|
||||
return _headerView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)requestmotianLunTodayRank
|
||||
{
|
||||
[BJHttpTool BJ_Get_motian_rankWithParameters:@{@"type":@"2"} success:^(id response) {
|
||||
self.dataArr = [LMLoveLsListModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
if (self.dataArr.count > 5){
|
||||
[self.dataArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
LMLoveLsListModel *model = obj;
|
||||
if (idx < 5){
|
||||
[self.topDataArr addObject:model];
|
||||
}else{
|
||||
[self.listDataArr addObject:model];
|
||||
}
|
||||
}];
|
||||
[self.swTableView reloadData];
|
||||
self.headerView.fiveArr = self.topDataArr;
|
||||
}else{
|
||||
[self.topDataArr addObjectsFromArray:self.dataArr];
|
||||
self.headerView.fiveArr = self.topDataArr;
|
||||
}
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSMutableArray *)dataArr
|
||||
{
|
||||
if (!_dataArr){
|
||||
_dataArr = [NSMutableArray array];
|
||||
}
|
||||
return _dataArr;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)listDataArr
|
||||
{
|
||||
if (!_listDataArr){
|
||||
_listDataArr = [NSMutableArray array];
|
||||
}
|
||||
return _listDataArr;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)topDataArr
|
||||
{
|
||||
if (!_topDataArr){
|
||||
_topDataArr = [NSMutableArray array];
|
||||
}
|
||||
return _topDataArr;
|
||||
}
|
||||
|
||||
@end
|
||||
57
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.xib
Normal file
57
SweetParty/主类/狸猫新增/爱情摩天轮/LMLoveSkyWheelViewController.xib
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LMLoveSkyWheelViewController">
|
||||
<connections>
|
||||
<outlet property="swTableView" destination="2OH-Ma-2uY" id="GZF-ko-iLe"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_bg" translatesAutoresizingMaskIntoConstraints="NO" id="QCw-th-WiK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="1107"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="QCw-th-WiK" secondAttribute="height" multiplier="375:1107" id="ktl-uc-tzQ"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="66" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="2OH-Ma-2uY">
|
||||
<rect key="frame" x="0.0" y="90" width="375" height="722"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="KIl-w5-KAM"/>
|
||||
<outlet property="delegate" destination="-1" id="kdz-iz-I90"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="2OH-Ma-2uY" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="Plm-BA-vqa"/>
|
||||
<constraint firstItem="2OH-Ma-2uY" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="90" id="R42-GY-l4b"/>
|
||||
<constraint firstItem="2OH-Ma-2uY" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="bwj-K0-ADf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2OH-Ma-2uY" secondAttribute="bottom" id="jzW-r7-R18"/>
|
||||
<constraint firstItem="QCw-th-WiK" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="sOu-Ua-PlC"/>
|
||||
<constraint firstItem="QCw-th-WiK" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="utc-s5-jZm"/>
|
||||
<constraint firstItem="QCw-th-WiK" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="wYF-Cf-LeG"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="-11.267605633802818"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="love_mtl_bg" width="375" height="1107"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
18
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.h
Normal file
18
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// LMLovelsTableHeaderView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMLovelsTableHeaderView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *fiveArr;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
206
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.m
Normal file
206
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.m
Normal file
@@ -0,0 +1,206 @@
|
||||
//
|
||||
// LMLovelsTableHeaderView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/7.
|
||||
//
|
||||
|
||||
#import "LMLovelsTableHeaderView.h"
|
||||
#import "LMLoveLsListModel.h"
|
||||
|
||||
@interface LMLovelsTableHeaderView ()<SVGAPlayerDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *yesterdayTopView_1;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewLeftHeader_1;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewRightHeader_1;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewLeftName_1;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewRightName_1;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewValue_1;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *yesterdayTopView_2;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewLeftHeader_2;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewRightHeader_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewLeftName_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewRightName_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewValue_2;
|
||||
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *yesterdayTopView_3;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewLeftHeader_3;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewRightHeader_3;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewLeftName_3;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewRightName_3;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewValue_3;
|
||||
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *yesterdayTopView_4;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewLeftHeader_4;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewRightHeader_4;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewLeftName_4;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewRightName_4;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewValue_4;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *yesterdayTopView_5;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewLeftHeader_5;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *topViewRightHeader_5;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewLeftName_5;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewRightName_5;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *topViewValue_5;
|
||||
|
||||
|
||||
@property (nonatomic, strong) SVGAPlayer *player;
|
||||
@property (nonatomic, strong) SVGAParser *parser;
|
||||
@property (weak, nonatomic) IBOutlet UIView *svgaCover;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *lastDataArr;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMLovelsTableHeaderView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self requestmotianLunLastWeekRank];
|
||||
}
|
||||
|
||||
|
||||
- (void)requestmotianLunLastWeekRank
|
||||
{
|
||||
[BJHttpTool BJ_Get_motian_rankWithParameters:@{@"type":@"1"} success:^(id response) {
|
||||
self.lastDataArr = [LMLoveLsListModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
[self setupYesterdayInfo];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (NSMutableArray *)lastDataArr
|
||||
{
|
||||
if (!_lastDataArr){
|
||||
_lastDataArr = [NSMutableArray array];
|
||||
}
|
||||
return _lastDataArr;
|
||||
}
|
||||
|
||||
- (SVGAPlayer *)player {
|
||||
if (!_player) {
|
||||
_player = [[SVGAPlayer alloc] init];
|
||||
_player.delegate = self;
|
||||
_player.loops = 0;
|
||||
_player.clearsAfterStop = YES;
|
||||
_player.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_player.userInteractionEnabled = NO;
|
||||
}
|
||||
return _player;
|
||||
}
|
||||
|
||||
- (void)onPlaySvgaWithUrl {
|
||||
|
||||
//ui add
|
||||
if (self.player.superview) {
|
||||
[self.player removeFromSuperview];
|
||||
}
|
||||
self.player.frame = self.svgaCover.bounds;
|
||||
[self.svgaCover addSubview:self.player];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
if (_parser == nil) {
|
||||
_parser = [[SVGAParser alloc] init];
|
||||
}
|
||||
[_parser parseWithNamed:@"motianlunTX" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
if (videoItem) {
|
||||
weakSelf.player.videoItem = videoItem;
|
||||
[weakSelf.player startAnimation];
|
||||
WEAK_SELF
|
||||
[weakSelf.fiveArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
LMLoveLsListModel *model = obj;
|
||||
[weakSelf.player setImageWithURL:URL(model.head_pic) forKey:[NSString stringWithFormat:@"img%ld",idx+1]];
|
||||
[weakSelf.player setImageWithURL:URL(model.receive_head_pic) forKey:[NSString stringWithFormat:@"img%ld%ld",idx+1,idx+1]];
|
||||
|
||||
NSAttributedString *str_1 = [[NSAttributedString alloc] initWithString:model.nick_name attributes:@{NSFontAttributeName:YBBoldFont(13), NSForegroundColorAttributeName:kWhiteColor}];
|
||||
[weakSelf.player setAttributedText:str_1 forKey:[NSString stringWithFormat:@"name%ld",idx+1]];
|
||||
NSAttributedString *str_2 = [[NSAttributedString alloc] initWithString:model.receive_nick_name attributes:@{NSFontAttributeName:YBBoldFont(13), NSForegroundColorAttributeName:kWhiteColor}];
|
||||
NSString *key2 = [NSString stringWithFormat:@"name%ld%ld",idx+1,idx+1];
|
||||
[weakSelf.player setAttributedText:str_2 forKey:key2];
|
||||
|
||||
NSAttributedString *str_3 = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",model.rank_value] attributes:@{NSFontAttributeName:YBBoldFont(20), NSForegroundColorAttributeName:HEXCOLOR(0xFFF600)}];
|
||||
[weakSelf.player setAttributedText:str_3 forKey:[NSString stringWithFormat:@"intimate%ld",idx+1]];
|
||||
}];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
// [_parser parseMemoryWithURL:[NSURL fileURLWithPath:url] Version:@"1" completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
// if (videoItem) {
|
||||
// weakSelf.player.videoItem = videoItem;
|
||||
// [weakSelf.player startAnimation];
|
||||
//
|
||||
//// if (name2.length > 0) {
|
||||
//// [weakSelf.player setImageWithURL:URL(tx1) forKey:@"tx1"];
|
||||
//// NSAttributedString *str_1 = [[NSAttributedString alloc] initWithString:name1 attributes:@{NSFontAttributeName:YBBoldFont(24), NSForegroundColorAttributeName:kWhiteColor}];
|
||||
//// [weakSelf.player setAttributedText:str_1 forKey:@"name1"];
|
||||
////
|
||||
//// [weakSelf.player setImageWithURL:URL(tx2) forKey:@"tx2"];
|
||||
//// NSAttributedString *str_2 = [[NSAttributedString alloc] initWithString:name2 attributes:@{NSFontAttributeName:YBBoldFont(24), NSForegroundColorAttributeName:kWhiteColor}];
|
||||
//// [weakSelf.player setAttributedText:str_2 forKey:@"name2"];
|
||||
//// }
|
||||
//
|
||||
// }
|
||||
// } failureBlock:^(NSError * _Nullable error) {
|
||||
// if (error) {
|
||||
// [weakSelf.player removeFromSuperview];
|
||||
// }
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)setupYesterdayInfo
|
||||
{
|
||||
WEAK_SELF
|
||||
[self.lastDataArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
LMLoveLsListModel *model = obj;
|
||||
if (idx == 0){
|
||||
[weakSelf.topViewLeftHeader_1 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[weakSelf.topViewRightHeader_1 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
weakSelf.topViewLeftName_1.text = model.nick_name;
|
||||
weakSelf.topViewRightName_1.text = model.receive_nick_name;
|
||||
weakSelf.topViewValue_1.text = model.rank_value;
|
||||
}else if (idx == 1){
|
||||
[weakSelf.topViewLeftHeader_2 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[weakSelf.topViewRightHeader_2 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
weakSelf.topViewLeftName_2.text = model.nick_name;
|
||||
weakSelf.topViewRightName_2.text = model.receive_nick_name;
|
||||
weakSelf.topViewValue_2.text = model.rank_value;
|
||||
}else if (idx == 2){
|
||||
[weakSelf.topViewLeftHeader_3 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[weakSelf.topViewRightHeader_3 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
weakSelf.topViewLeftName_3.text = model.nick_name;
|
||||
weakSelf.topViewRightName_3.text = model.receive_nick_name;
|
||||
weakSelf.topViewValue_3.text = model.rank_value;
|
||||
}else if (idx == 3){
|
||||
[weakSelf.topViewLeftHeader_4 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[weakSelf.topViewRightHeader_4 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
weakSelf.topViewLeftName_4.text = model.nick_name;
|
||||
weakSelf.topViewRightName_4.text = model.receive_nick_name;
|
||||
weakSelf.topViewValue_4.text = model.rank_value;
|
||||
}else if (idx == 4){
|
||||
[weakSelf.topViewLeftHeader_5 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
[weakSelf.topViewRightHeader_5 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
weakSelf.topViewLeftName_5.text = model.nick_name;
|
||||
weakSelf.topViewRightName_5.text = model.receive_nick_name;
|
||||
weakSelf.topViewValue_5.text = model.rank_value;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setFiveArr:(NSMutableArray *)fiveArr
|
||||
{
|
||||
_fiveArr = fiveArr;
|
||||
[self onPlaySvgaWithUrl];
|
||||
}
|
||||
|
||||
@end
|
||||
607
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.xib
Normal file
607
SweetParty/主类/狸猫新增/爱情摩天轮/LMLovelsTableHeaderView.xib
Normal file
@@ -0,0 +1,607 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMLovelsTableHeaderView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="704"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B5X-E9-jm4">
|
||||
<rect key="frame" x="15" y="70" width="345" height="180"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_top_bg" translatesAutoresizingMaskIntoConstraints="NO" id="VJh-KK-GGa">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="180"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_5" translatesAutoresizingMaskIntoConstraints="NO" id="yPE-VW-NHj">
|
||||
<rect key="frame" x="133" y="0.0" width="79" height="40"/>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="3Nc-UW-6e1">
|
||||
<rect key="frame" x="10" y="48" width="325" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l55-cG-9Vv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="n7e-db-8KE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="dt9-j7-m59">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="P1h-mW-o5y">
|
||||
<rect key="frame" x="8" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="25" id="CPq-aM-hvL"/>
|
||||
<constraint firstAttribute="height" constant="25" id="vQy-og-2t3"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="mLj-MR-4r8">
|
||||
<rect key="frame" x="28" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="CyO-te-TBT"/>
|
||||
<constraint firstAttribute="width" constant="25" id="jZI-bc-dv1"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KaH-HY-LFJ">
|
||||
<rect key="frame" x="14" y="48" width="33" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="& " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fbz-z9-lPb">
|
||||
<rect key="frame" x="26.333333333333336" y="59.66666666666665" width="8.6666666666666643" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6k8-44-al5">
|
||||
<rect key="frame" x="14" y="71.333333333333343" width="33" height="9.6666666666666714"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Cf-hj-bSu">
|
||||
<rect key="frame" x="25.666666666666664" y="90" width="9.6666666666666643" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="mLj-MR-4r8" firstAttribute="centerY" secondItem="P1h-mW-o5y" secondAttribute="centerY" id="1lC-Ru-ohe"/>
|
||||
<constraint firstItem="Fbz-z9-lPb" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" id="743-yu-QXw"/>
|
||||
<constraint firstItem="P1h-mW-o5y" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" constant="-10" id="8n9-cJ-ySn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dt9-j7-m59" secondAttribute="trailing" id="AnC-TV-Y39"/>
|
||||
<constraint firstItem="6k8-44-al5" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" id="L7o-xW-QJ3"/>
|
||||
<constraint firstItem="Fbz-z9-lPb" firstAttribute="top" secondItem="KaH-HY-LFJ" secondAttribute="bottom" constant="2" id="WA0-KV-0sQ"/>
|
||||
<constraint firstItem="dt9-j7-m59" firstAttribute="leading" secondItem="n7e-db-8KE" secondAttribute="leading" id="XdJ-ay-T1m"/>
|
||||
<constraint firstItem="8Cf-hj-bSu" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" id="dxI-6V-nO5"/>
|
||||
<constraint firstItem="6k8-44-al5" firstAttribute="top" secondItem="Fbz-z9-lPb" secondAttribute="bottom" constant="2" id="fNl-Pt-s1Y"/>
|
||||
<constraint firstItem="P1h-mW-o5y" firstAttribute="top" secondItem="n7e-db-8KE" secondAttribute="top" constant="20" id="giX-Mo-wpn"/>
|
||||
<constraint firstItem="mLj-MR-4r8" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" constant="10" id="o7j-bV-rhf"/>
|
||||
<constraint firstItem="dt9-j7-m59" firstAttribute="top" secondItem="n7e-db-8KE" secondAttribute="top" id="ouf-d8-2Vo"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8Cf-hj-bSu" secondAttribute="bottom" constant="10" id="tpm-ay-IkE"/>
|
||||
<constraint firstItem="KaH-HY-LFJ" firstAttribute="centerX" secondItem="n7e-db-8KE" secondAttribute="centerX" id="w0O-2Q-tUh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dt9-j7-m59" secondAttribute="bottom" id="zg9-Fa-6QQ"/>
|
||||
<constraint firstItem="KaH-HY-LFJ" firstAttribute="top" secondItem="P1h-mW-o5y" secondAttribute="bottom" constant="3" id="zx6-74-YE4"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_1" translatesAutoresizingMaskIntoConstraints="NO" id="jOD-K9-XSb">
|
||||
<rect key="frame" x="22.666666666666664" y="0.0" width="16" height="16"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="n7e-db-8KE" secondAttribute="trailing" id="QkC-7r-qqT"/>
|
||||
<constraint firstItem="jOD-K9-XSb" firstAttribute="centerX" secondItem="l55-cG-9Vv" secondAttribute="centerX" id="Z7X-Vb-g7M"/>
|
||||
<constraint firstItem="n7e-db-8KE" firstAttribute="leading" secondItem="l55-cG-9Vv" secondAttribute="leading" id="fzL-Lh-9q3"/>
|
||||
<constraint firstItem="n7e-db-8KE" firstAttribute="top" secondItem="l55-cG-9Vv" secondAttribute="top" id="lOH-tm-xdm"/>
|
||||
<constraint firstItem="jOD-K9-XSb" firstAttribute="top" secondItem="l55-cG-9Vv" secondAttribute="top" id="sX7-YT-She"/>
|
||||
<constraint firstAttribute="bottom" secondItem="n7e-db-8KE" secondAttribute="bottom" id="uXM-r8-ugd"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xpv-Kt-iOX">
|
||||
<rect key="frame" x="66" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gJ1-bc-gkr">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="DUT-wW-U1A">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Dod-RB-Yea">
|
||||
<rect key="frame" x="8" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="25" id="3ph-lq-c4q"/>
|
||||
<constraint firstAttribute="height" constant="25" id="IrS-Eh-Z6k"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Tkp-Vu-0JR">
|
||||
<rect key="frame" x="28" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="1f9-bd-JjD"/>
|
||||
<constraint firstAttribute="width" constant="25" id="UhY-mt-ZdC"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Vq-Cp-dx7">
|
||||
<rect key="frame" x="14" y="48" width="33" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="& " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lUN-w0-7M1">
|
||||
<rect key="frame" x="26.333333333333329" y="59.66666666666665" width="8.6666666666666643" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jQF-r1-s1X">
|
||||
<rect key="frame" x="14" y="71.333333333333343" width="33" height="9.6666666666666714"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SxT-zL-7xx">
|
||||
<rect key="frame" x="25.666666666666671" y="90" width="9.6666666666666643" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="jQF-r1-s1X" firstAttribute="centerX" secondItem="gJ1-bc-gkr" secondAttribute="centerX" id="0ES-fK-xlg"/>
|
||||
<constraint firstItem="DUT-wW-U1A" firstAttribute="leading" secondItem="gJ1-bc-gkr" secondAttribute="leading" id="4bj-lA-oPh"/>
|
||||
<constraint firstItem="6Vq-Cp-dx7" firstAttribute="top" secondItem="Dod-RB-Yea" secondAttribute="bottom" constant="3" id="7HF-E3-zeT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DUT-wW-U1A" secondAttribute="trailing" id="EUi-DL-rTO"/>
|
||||
<constraint firstItem="6Vq-Cp-dx7" firstAttribute="centerX" secondItem="gJ1-bc-gkr" secondAttribute="centerX" id="Fno-AE-jD1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Tkp-Vu-0JR" secondAttribute="trailing" constant="8" id="Gb0-Cc-ue5"/>
|
||||
<constraint firstItem="SxT-zL-7xx" firstAttribute="centerX" secondItem="gJ1-bc-gkr" secondAttribute="centerX" id="Hoa-eM-WBs"/>
|
||||
<constraint firstItem="lUN-w0-7M1" firstAttribute="centerX" secondItem="gJ1-bc-gkr" secondAttribute="centerX" id="Iuf-zv-iOp"/>
|
||||
<constraint firstItem="Dod-RB-Yea" firstAttribute="top" secondItem="gJ1-bc-gkr" secondAttribute="top" constant="20" id="J2l-KP-blL"/>
|
||||
<constraint firstItem="DUT-wW-U1A" firstAttribute="top" secondItem="gJ1-bc-gkr" secondAttribute="top" id="PLo-fF-7f5"/>
|
||||
<constraint firstItem="lUN-w0-7M1" firstAttribute="top" secondItem="6Vq-Cp-dx7" secondAttribute="bottom" constant="2" id="Slj-NM-6ju"/>
|
||||
<constraint firstAttribute="bottom" secondItem="SxT-zL-7xx" secondAttribute="bottom" constant="10" id="UiX-Ox-DZa"/>
|
||||
<constraint firstItem="jQF-r1-s1X" firstAttribute="top" secondItem="lUN-w0-7M1" secondAttribute="bottom" constant="2" id="V93-DF-t7o"/>
|
||||
<constraint firstItem="Dod-RB-Yea" firstAttribute="leading" secondItem="gJ1-bc-gkr" secondAttribute="leading" constant="8" id="g7o-jl-Bli"/>
|
||||
<constraint firstItem="Tkp-Vu-0JR" firstAttribute="centerY" secondItem="Dod-RB-Yea" secondAttribute="centerY" id="mHe-VV-5Wc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DUT-wW-U1A" secondAttribute="bottom" id="nmJ-Iv-SXZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_2" translatesAutoresizingMaskIntoConstraints="NO" id="nS8-VN-u0m">
|
||||
<rect key="frame" x="22.666666666666671" y="0.0" width="16" height="16"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="gJ1-bc-gkr" firstAttribute="top" secondItem="xpv-Kt-iOX" secondAttribute="top" id="A1o-H2-w9X"/>
|
||||
<constraint firstItem="nS8-VN-u0m" firstAttribute="centerX" secondItem="xpv-Kt-iOX" secondAttribute="centerX" id="Rdm-q4-VQs"/>
|
||||
<constraint firstItem="gJ1-bc-gkr" firstAttribute="leading" secondItem="xpv-Kt-iOX" secondAttribute="leading" id="RrI-sh-0Hi"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gJ1-bc-gkr" secondAttribute="bottom" id="dRa-Wg-XH1"/>
|
||||
<constraint firstItem="nS8-VN-u0m" firstAttribute="top" secondItem="xpv-Kt-iOX" secondAttribute="top" id="gQH-1q-Wna"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gJ1-bc-gkr" secondAttribute="trailing" id="pLt-oM-y0a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TwS-Ac-O5d">
|
||||
<rect key="frame" x="132" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E0y-NZ-alh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="UwK-B2-lWU">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ycK-bQ-O4D">
|
||||
<rect key="frame" x="8" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="25" id="onQ-N4-Rmw"/>
|
||||
<constraint firstAttribute="height" constant="25" id="wQE-p0-m05"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="6ee-Z2-4Hr">
|
||||
<rect key="frame" x="28" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="R98-zd-ytT"/>
|
||||
<constraint firstAttribute="width" constant="25" id="g2i-DM-svA"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="q22-4A-79v">
|
||||
<rect key="frame" x="14" y="48" width="33" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="& " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tIg-La-hW4">
|
||||
<rect key="frame" x="26.333333333333343" y="59.66666666666665" width="8.6666666666666643" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a2r-f7-KFu">
|
||||
<rect key="frame" x="14" y="71.333333333333343" width="33" height="9.6666666666666714"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXg-X0-6ze">
|
||||
<rect key="frame" x="25.666666666666657" y="90" width="9.6666666666666643" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="ycK-bQ-O4D" firstAttribute="leading" secondItem="E0y-NZ-alh" secondAttribute="leading" constant="8" id="0Pm-km-jiG"/>
|
||||
<constraint firstItem="q22-4A-79v" firstAttribute="top" secondItem="ycK-bQ-O4D" secondAttribute="bottom" constant="3" id="69g-8W-G3v"/>
|
||||
<constraint firstItem="ycK-bQ-O4D" firstAttribute="top" secondItem="E0y-NZ-alh" secondAttribute="top" constant="20" id="EKl-ZO-Ryk"/>
|
||||
<constraint firstItem="tIg-La-hW4" firstAttribute="centerX" secondItem="E0y-NZ-alh" secondAttribute="centerX" id="Kzx-mO-lEo"/>
|
||||
<constraint firstAttribute="bottom" secondItem="UwK-B2-lWU" secondAttribute="bottom" id="Obi-Cy-Z1R"/>
|
||||
<constraint firstItem="a2r-f7-KFu" firstAttribute="top" secondItem="tIg-La-hW4" secondAttribute="bottom" constant="2" id="OcL-bx-52k"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6ee-Z2-4Hr" secondAttribute="trailing" constant="8" id="Qgf-OI-tUU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UwK-B2-lWU" secondAttribute="trailing" id="Y9E-4D-6wE"/>
|
||||
<constraint firstItem="tIg-La-hW4" firstAttribute="top" secondItem="q22-4A-79v" secondAttribute="bottom" constant="2" id="a80-4d-ZvD"/>
|
||||
<constraint firstItem="6ee-Z2-4Hr" firstAttribute="centerY" secondItem="ycK-bQ-O4D" secondAttribute="centerY" id="aL3-la-Mm3"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KXg-X0-6ze" secondAttribute="bottom" constant="10" id="agH-0N-mbP"/>
|
||||
<constraint firstItem="a2r-f7-KFu" firstAttribute="centerX" secondItem="E0y-NZ-alh" secondAttribute="centerX" id="dAh-Bf-RPc"/>
|
||||
<constraint firstItem="q22-4A-79v" firstAttribute="centerX" secondItem="E0y-NZ-alh" secondAttribute="centerX" id="irp-Id-uQ8"/>
|
||||
<constraint firstItem="UwK-B2-lWU" firstAttribute="leading" secondItem="E0y-NZ-alh" secondAttribute="leading" id="q4z-ah-vWE"/>
|
||||
<constraint firstItem="KXg-X0-6ze" firstAttribute="centerX" secondItem="E0y-NZ-alh" secondAttribute="centerX" id="wWw-sU-bw3"/>
|
||||
<constraint firstItem="UwK-B2-lWU" firstAttribute="top" secondItem="E0y-NZ-alh" secondAttribute="top" id="xxP-Tv-MOg"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_3" translatesAutoresizingMaskIntoConstraints="NO" id="yfv-SD-GxN">
|
||||
<rect key="frame" x="22.666666666666657" y="0.0" width="16" height="16"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="E0y-NZ-alh" firstAttribute="leading" secondItem="TwS-Ac-O5d" secondAttribute="leading" id="BU5-WS-PkK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E0y-NZ-alh" secondAttribute="trailing" id="Cgx-Ed-aEw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E0y-NZ-alh" secondAttribute="bottom" id="XRZ-J7-yrF"/>
|
||||
<constraint firstItem="E0y-NZ-alh" firstAttribute="top" secondItem="TwS-Ac-O5d" secondAttribute="top" id="dQc-1A-pR7"/>
|
||||
<constraint firstItem="yfv-SD-GxN" firstAttribute="centerX" secondItem="TwS-Ac-O5d" secondAttribute="centerX" id="mtJ-Aa-Ygc"/>
|
||||
<constraint firstItem="yfv-SD-GxN" firstAttribute="top" secondItem="TwS-Ac-O5d" secondAttribute="top" id="rRu-eb-f7i"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wnQ-cS-aAa">
|
||||
<rect key="frame" x="198" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HdC-7W-NQa">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ReN-9r-nfw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="A8r-uR-loo">
|
||||
<rect key="frame" x="8" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="25" id="dYV-kF-sCO"/>
|
||||
<constraint firstAttribute="height" constant="25" id="lVR-LZ-Yjs"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="fn8-AP-RGe">
|
||||
<rect key="frame" x="28" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="0Jt-jf-chH"/>
|
||||
<constraint firstAttribute="width" constant="25" id="mxT-yC-gJp"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d1j-kb-C8A">
|
||||
<rect key="frame" x="14" y="48" width="33" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="& " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E18-EC-QSI">
|
||||
<rect key="frame" x="26.333333333333343" y="59.66666666666665" width="8.6666666666666643" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iPF-Ng-Sfe">
|
||||
<rect key="frame" x="14" y="71.333333333333343" width="33" height="9.6666666666666714"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AQG-7K-xGd">
|
||||
<rect key="frame" x="25.666666666666657" y="90" width="9.6666666666666643" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ReN-9r-nfw" secondAttribute="trailing" id="BB5-fN-2kl"/>
|
||||
<constraint firstItem="ReN-9r-nfw" firstAttribute="top" secondItem="HdC-7W-NQa" secondAttribute="top" id="E2h-ai-SEs"/>
|
||||
<constraint firstItem="A8r-uR-loo" firstAttribute="leading" secondItem="HdC-7W-NQa" secondAttribute="leading" constant="8" id="EW9-Q2-Ulw"/>
|
||||
<constraint firstItem="A8r-uR-loo" firstAttribute="top" secondItem="HdC-7W-NQa" secondAttribute="top" constant="20" id="Eht-Rz-8c6"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fn8-AP-RGe" secondAttribute="trailing" constant="8" id="FEY-ka-oTM"/>
|
||||
<constraint firstItem="d1j-kb-C8A" firstAttribute="centerX" secondItem="HdC-7W-NQa" secondAttribute="centerX" id="GiP-32-3Zv"/>
|
||||
<constraint firstItem="AQG-7K-xGd" firstAttribute="centerX" secondItem="HdC-7W-NQa" secondAttribute="centerX" id="H4J-1m-GZd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="AQG-7K-xGd" secondAttribute="bottom" constant="10" id="J5t-Vv-h56"/>
|
||||
<constraint firstItem="ReN-9r-nfw" firstAttribute="leading" secondItem="HdC-7W-NQa" secondAttribute="leading" id="Mlf-Qy-eGg"/>
|
||||
<constraint firstItem="iPF-Ng-Sfe" firstAttribute="centerX" secondItem="HdC-7W-NQa" secondAttribute="centerX" id="Nqo-aC-Z0L"/>
|
||||
<constraint firstItem="d1j-kb-C8A" firstAttribute="top" secondItem="A8r-uR-loo" secondAttribute="bottom" constant="3" id="bRS-v5-agI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ReN-9r-nfw" secondAttribute="bottom" id="c1e-FW-90h"/>
|
||||
<constraint firstItem="E18-EC-QSI" firstAttribute="top" secondItem="d1j-kb-C8A" secondAttribute="bottom" constant="2" id="dbH-du-R8F"/>
|
||||
<constraint firstItem="E18-EC-QSI" firstAttribute="centerX" secondItem="HdC-7W-NQa" secondAttribute="centerX" id="o31-Gg-BiF"/>
|
||||
<constraint firstItem="fn8-AP-RGe" firstAttribute="centerY" secondItem="A8r-uR-loo" secondAttribute="centerY" id="r8I-PJ-lfC"/>
|
||||
<constraint firstItem="iPF-Ng-Sfe" firstAttribute="top" secondItem="E18-EC-QSI" secondAttribute="bottom" constant="2" id="rx2-F0-Tqs"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_4" translatesAutoresizingMaskIntoConstraints="NO" id="r5D-fd-bCH">
|
||||
<rect key="frame" x="22.666666666666657" y="0.0" width="16" height="16"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="HdC-7W-NQa" firstAttribute="leading" secondItem="wnQ-cS-aAa" secondAttribute="leading" id="0jU-uJ-9db"/>
|
||||
<constraint firstItem="r5D-fd-bCH" firstAttribute="centerX" secondItem="wnQ-cS-aAa" secondAttribute="centerX" id="9Vc-Yi-UW8"/>
|
||||
<constraint firstItem="r5D-fd-bCH" firstAttribute="top" secondItem="wnQ-cS-aAa" secondAttribute="top" id="c9l-Eh-ueC"/>
|
||||
<constraint firstItem="HdC-7W-NQa" firstAttribute="top" secondItem="wnQ-cS-aAa" secondAttribute="top" id="hQ4-ub-bkO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HdC-7W-NQa" secondAttribute="bottom" id="mS5-qS-KQd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HdC-7W-NQa" secondAttribute="trailing" id="tWK-xW-aDc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e2s-Fd-2PK">
|
||||
<rect key="frame" x="264" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mgX-Rk-qnh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_top_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Xgi-a1-5Yh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61" height="117"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="RU8-xj-4YM">
|
||||
<rect key="frame" x="8" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="25" id="8M0-bO-aiM"/>
|
||||
<constraint firstAttribute="width" constant="25" id="W5o-3V-d0q"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="pgI-8L-N6i">
|
||||
<rect key="frame" x="28" y="20" width="25" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="25" id="PSq-h7-WVr"/>
|
||||
<constraint firstAttribute="height" constant="25" id="SXb-4V-sWR"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="txM-Q6-lq7">
|
||||
<rect key="frame" x="14" y="48" width="33" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="& " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HwB-bv-lRH">
|
||||
<rect key="frame" x="26.333333333333314" y="59.66666666666665" width="8.6666666666666643" height="9.6666666666666643"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ikv-gb-dDF">
|
||||
<rect key="frame" x="14" y="71.333333333333343" width="33" height="9.6666666666666714"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="8"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0lS-DR-iyy">
|
||||
<rect key="frame" x="25.666666666666686" y="90" width="9.6666666666666643" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="0.83529411764705885" blue="0.38823529411764707" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Xgi-a1-5Yh" secondAttribute="trailing" id="2Ng-wd-WTh"/>
|
||||
<constraint firstItem="Xgi-a1-5Yh" firstAttribute="leading" secondItem="mgX-Rk-qnh" secondAttribute="leading" id="4k7-8P-XM3"/>
|
||||
<constraint firstItem="RU8-xj-4YM" firstAttribute="leading" secondItem="mgX-Rk-qnh" secondAttribute="leading" constant="8" id="Aaz-ea-NGt"/>
|
||||
<constraint firstItem="Ikv-gb-dDF" firstAttribute="top" secondItem="HwB-bv-lRH" secondAttribute="bottom" constant="2" id="C8i-Ha-Q9u"/>
|
||||
<constraint firstItem="HwB-bv-lRH" firstAttribute="centerX" secondItem="mgX-Rk-qnh" secondAttribute="centerX" id="Cuc-4z-tIo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pgI-8L-N6i" secondAttribute="trailing" constant="8" id="QaL-Td-afa"/>
|
||||
<constraint firstItem="Ikv-gb-dDF" firstAttribute="centerX" secondItem="mgX-Rk-qnh" secondAttribute="centerX" id="Rkf-T7-yFD"/>
|
||||
<constraint firstItem="txM-Q6-lq7" firstAttribute="centerX" secondItem="mgX-Rk-qnh" secondAttribute="centerX" id="Tqv-uN-1n7"/>
|
||||
<constraint firstItem="0lS-DR-iyy" firstAttribute="centerX" secondItem="mgX-Rk-qnh" secondAttribute="centerX" id="Vn6-PU-a6y"/>
|
||||
<constraint firstItem="Xgi-a1-5Yh" firstAttribute="top" secondItem="mgX-Rk-qnh" secondAttribute="top" id="cC1-7O-onz"/>
|
||||
<constraint firstItem="txM-Q6-lq7" firstAttribute="top" secondItem="RU8-xj-4YM" secondAttribute="bottom" constant="3" id="clO-Cg-MOh"/>
|
||||
<constraint firstItem="HwB-bv-lRH" firstAttribute="top" secondItem="txM-Q6-lq7" secondAttribute="bottom" constant="2" id="fwV-Wp-R60"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Xgi-a1-5Yh" secondAttribute="bottom" id="gJ5-mt-OBg"/>
|
||||
<constraint firstItem="pgI-8L-N6i" firstAttribute="centerY" secondItem="RU8-xj-4YM" secondAttribute="centerY" id="tY2-N3-jzs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0lS-DR-iyy" secondAttribute="bottom" constant="10" id="yB9-et-EJf"/>
|
||||
<constraint firstItem="RU8-xj-4YM" firstAttribute="top" secondItem="mgX-Rk-qnh" secondAttribute="top" constant="20" id="yee-IE-WVW"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_rank_5" translatesAutoresizingMaskIntoConstraints="NO" id="Tgu-A1-evF">
|
||||
<rect key="frame" x="22.666666666666686" y="0.0" width="16" height="16"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Tgu-A1-evF" firstAttribute="top" secondItem="e2s-Fd-2PK" secondAttribute="top" id="0lO-yt-nC9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="mgX-Rk-qnh" secondAttribute="trailing" id="1m3-le-gTb"/>
|
||||
<constraint firstItem="mgX-Rk-qnh" firstAttribute="top" secondItem="e2s-Fd-2PK" secondAttribute="top" id="MNJ-cS-t7p"/>
|
||||
<constraint firstAttribute="bottom" secondItem="mgX-Rk-qnh" secondAttribute="bottom" id="jf1-N9-Nrl"/>
|
||||
<constraint firstItem="Tgu-A1-evF" firstAttribute="centerX" secondItem="e2s-Fd-2PK" secondAttribute="centerX" id="pFl-Dk-2Th"/>
|
||||
<constraint firstItem="mgX-Rk-qnh" firstAttribute="leading" secondItem="e2s-Fd-2PK" secondAttribute="leading" id="xsX-h0-tv5"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="3Nc-UW-6e1" firstAttribute="leading" secondItem="B5X-E9-jm4" secondAttribute="leading" constant="10" id="3xv-x2-Sne"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3Nc-UW-6e1" secondAttribute="bottom" constant="15" id="6pH-oZ-qb0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VJh-KK-GGa" secondAttribute="bottom" id="HkW-DF-UKG"/>
|
||||
<constraint firstItem="yPE-VW-NHj" firstAttribute="top" secondItem="B5X-E9-jm4" secondAttribute="top" id="S6z-z3-np5"/>
|
||||
<constraint firstItem="3Nc-UW-6e1" firstAttribute="top" secondItem="B5X-E9-jm4" secondAttribute="top" constant="48" id="SQ8-rR-j2h"/>
|
||||
<constraint firstAttribute="height" constant="180" id="aeg-Y4-caV"/>
|
||||
<constraint firstItem="VJh-KK-GGa" firstAttribute="top" secondItem="B5X-E9-jm4" secondAttribute="top" id="ecq-se-YMS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VJh-KK-GGa" secondAttribute="trailing" id="haI-xV-TBC"/>
|
||||
<constraint firstItem="yPE-VW-NHj" firstAttribute="centerX" secondItem="B5X-E9-jm4" secondAttribute="centerX" id="m80-eT-xit"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3Nc-UW-6e1" secondAttribute="trailing" constant="10" id="u7B-bW-tsE"/>
|
||||
<constraint firstItem="VJh-KK-GGa" firstAttribute="leading" secondItem="B5X-E9-jm4" secondAttribute="leading" id="uqm-Jw-A5o"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_today" translatesAutoresizingMaskIntoConstraints="NO" id="Ggd-TS-Jdf">
|
||||
<rect key="frame" x="147.66666666666666" y="260" width="79.666666666666657" height="40"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ygr-kr-rjc">
|
||||
<rect key="frame" x="0.0" y="315" width="375" height="369"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="love_mtl_icon_yun" translatesAutoresizingMaskIntoConstraints="NO" id="IiM-69-SSt">
|
||||
<rect key="frame" x="0.0" y="490.66666666666669" width="375" height="213.33333333333331"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="IiM-69-SSt" secondAttribute="bottom" id="0pL-yf-e3i"/>
|
||||
<constraint firstAttribute="trailing" secondItem="B5X-E9-jm4" secondAttribute="trailing" constant="15" id="7F4-Bj-zAn"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ygr-kr-rjc" secondAttribute="bottom" constant="20" id="AMh-QJ-tVR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ygr-kr-rjc" secondAttribute="trailing" id="IDq-Ro-xfa"/>
|
||||
<constraint firstItem="B5X-E9-jm4" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="70" id="KBC-o6-qtT"/>
|
||||
<constraint firstItem="Ggd-TS-Jdf" firstAttribute="top" secondItem="B5X-E9-jm4" secondAttribute="bottom" constant="10" id="QCY-cC-WSS"/>
|
||||
<constraint firstItem="B5X-E9-jm4" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="TRb-Zz-mQP"/>
|
||||
<constraint firstItem="ygr-kr-rjc" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Us1-cD-VsT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="IiM-69-SSt" secondAttribute="trailing" id="ZJn-QC-d3Q"/>
|
||||
<constraint firstItem="IiM-69-SSt" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="nW5-7y-gcz"/>
|
||||
<constraint firstItem="ygr-kr-rjc" firstAttribute="top" secondItem="Ggd-TS-Jdf" secondAttribute="bottom" constant="15" id="pzY-gG-vRi"/>
|
||||
<constraint firstItem="Ggd-TS-Jdf" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="qOx-Gk-uZB"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="svgaCover" destination="ygr-kr-rjc" id="HZE-qc-bjn"/>
|
||||
<outlet property="topViewLeftHeader_1" destination="P1h-mW-o5y" id="tQ9-1B-KDp"/>
|
||||
<outlet property="topViewLeftHeader_2" destination="Dod-RB-Yea" id="5PA-Za-n1q"/>
|
||||
<outlet property="topViewLeftHeader_3" destination="ycK-bQ-O4D" id="3Ae-DZ-UrY"/>
|
||||
<outlet property="topViewLeftHeader_4" destination="A8r-uR-loo" id="vbN-N6-GTO"/>
|
||||
<outlet property="topViewLeftHeader_5" destination="RU8-xj-4YM" id="saE-Fk-Ubb"/>
|
||||
<outlet property="topViewLeftName_1" destination="KaH-HY-LFJ" id="UJN-hy-2xp"/>
|
||||
<outlet property="topViewLeftName_2" destination="6Vq-Cp-dx7" id="vhZ-WI-52C"/>
|
||||
<outlet property="topViewLeftName_3" destination="q22-4A-79v" id="JgX-rW-ULO"/>
|
||||
<outlet property="topViewLeftName_4" destination="d1j-kb-C8A" id="xBj-1o-KTc"/>
|
||||
<outlet property="topViewLeftName_5" destination="txM-Q6-lq7" id="RGv-NG-NKa"/>
|
||||
<outlet property="topViewRightHeader_1" destination="mLj-MR-4r8" id="mPT-tT-WXd"/>
|
||||
<outlet property="topViewRightHeader_2" destination="Tkp-Vu-0JR" id="yI1-bX-iGv"/>
|
||||
<outlet property="topViewRightHeader_3" destination="6ee-Z2-4Hr" id="GzF-lA-ZMh"/>
|
||||
<outlet property="topViewRightHeader_4" destination="fn8-AP-RGe" id="KzQ-f1-608"/>
|
||||
<outlet property="topViewRightHeader_5" destination="pgI-8L-N6i" id="Wq0-Fx-H0o"/>
|
||||
<outlet property="topViewRightName_1" destination="6k8-44-al5" id="l1L-n4-VqN"/>
|
||||
<outlet property="topViewRightName_2" destination="jQF-r1-s1X" id="iDz-Gs-KLa"/>
|
||||
<outlet property="topViewRightName_3" destination="a2r-f7-KFu" id="AEa-xO-bzy"/>
|
||||
<outlet property="topViewRightName_4" destination="iPF-Ng-Sfe" id="hux-BT-ElD"/>
|
||||
<outlet property="topViewRightName_5" destination="Ikv-gb-dDF" id="ecu-0E-Vlg"/>
|
||||
<outlet property="topViewValue_1" destination="8Cf-hj-bSu" id="60l-AC-44p"/>
|
||||
<outlet property="topViewValue_2" destination="SxT-zL-7xx" id="0om-sS-kal"/>
|
||||
<outlet property="topViewValue_3" destination="KXg-X0-6ze" id="Jyy-sB-7Ie"/>
|
||||
<outlet property="topViewValue_4" destination="AQG-7K-xGd" id="HnW-lZ-ImE"/>
|
||||
<outlet property="topViewValue_5" destination="0lS-DR-iyy" id="Zvq-5c-tq9"/>
|
||||
<outlet property="yesterdayTopView_1" destination="l55-cG-9Vv" id="86A-Vs-lNJ"/>
|
||||
<outlet property="yesterdayTopView_2" destination="xpv-Kt-iOX" id="dwg-dn-2xY"/>
|
||||
<outlet property="yesterdayTopView_3" destination="TwS-Ac-O5d" id="pP9-cP-kQ9"/>
|
||||
<outlet property="yesterdayTopView_4" destination="wnQ-cS-aAa" id="u9z-EL-34t"/>
|
||||
<outlet property="yesterdayTopView_5" destination="e2s-Fd-2PK" id="wOt-8E-Tbb"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="279.57746478873241"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="love_mtl_icon_yun" width="375" height="213.5"/>
|
||||
<image name="love_mtl_rank_1" width="16" height="16"/>
|
||||
<image name="love_mtl_rank_2" width="16" height="16"/>
|
||||
<image name="love_mtl_rank_3" width="16" height="16"/>
|
||||
<image name="love_mtl_rank_4" width="16" height="16"/>
|
||||
<image name="love_mtl_rank_5" width="16" height="16"/>
|
||||
<image name="love_mtl_rank_top_bg" width="345" height="178"/>
|
||||
<image name="love_mtl_today" width="79.5" height="40"/>
|
||||
<image name="love_mtl_top_5" width="79" height="40"/>
|
||||
<image name="love_mtl_top_item_bg" width="61" height="115"/>
|
||||
</resources>
|
||||
</document>
|
||||
BIN
SweetParty/主类/狸猫新增/爱情摩天轮/motianlunTX.svga
Normal file
BIN
SweetParty/主类/狸猫新增/爱情摩天轮/motianlunTX.svga
Normal file
Binary file not shown.
20
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.h
Normal file
20
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// LMBaodengAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMBaodengAlertView : UIView
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
|
||||
- (void)sheetViewforViewAppear;
|
||||
- (void)sheetViewforViewClose;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
102
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.m
Normal file
102
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.m
Normal file
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// LMBaodengAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import "LMBaodengAlertView.h"
|
||||
#import "LMSpecialGiftModel.h"
|
||||
|
||||
@interface LMBaodengAlertView ()
|
||||
@property (weak, nonatomic) IBOutlet UIView *mineView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftLeftIMg;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftLeftPrice;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftLeftName;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMBaodengAlertView
|
||||
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.mineView.frame = CGRectMake(0, APPH, self.mineView.width, self.mineView.height);
|
||||
self.mineView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 330) direction:(FXGradientChangeDirectionVertical) startColor:HEXCOLOR(0xDFFFF6) endColor:HEXCOLOR(0xFFFFFF)];
|
||||
self.confirmButton.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(125, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
[self requestLoadSpecialGift];
|
||||
}
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
|
||||
if (self.viewModel.roomInfo.roomId.length == 0){
|
||||
[HelpPageDefine showMessage:@"信息有误"];
|
||||
return;
|
||||
}
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
[dict setValue:self.viewModel.roomInfo.roomId forKey:@"rid"];
|
||||
[dict setValue:@"1" forKey:@"num"];
|
||||
[dict setValue:@"2" forKey:@"light_type"]; //1普通灯 2爆灯
|
||||
|
||||
[BJHttpTool BJ_XQUser_room_lightParameters:dict success:^(id response) {
|
||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"嘉宾爆灯" ofType:@"mp3"];
|
||||
int result = [self.viewModel.agoraKit playEffect:1 filePath:filePath loopCount:0 pitch:1 pan:0 gain:100 publish:YES];
|
||||
if (result != 0) {
|
||||
NSLog(@"音效播放失败");
|
||||
}
|
||||
[self sheetViewforViewClose];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)cancelButtonClick:(UIButton *)sender {
|
||||
[self sheetViewforViewClose];
|
||||
}
|
||||
|
||||
- (void)sheetViewforViewAppear
|
||||
{
|
||||
//滑出动画
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.mineView.frame = CGRectMake(0, APPH/2-330/2, self.mineView.width, self.mineView.height);
|
||||
} completion:^(BOOL finished) {
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)sheetViewforViewClose
|
||||
{
|
||||
self.backgroundColor = HEXCOLORA(0x000000, 0);
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight);
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)requestLoadSpecialGift
|
||||
{
|
||||
//灭灯礼物
|
||||
[BJHttpTool BJ_XQ_appoint_giftParameters:@{@"type":@"1"} success:^(id response) {
|
||||
NSArray *dataArr = [response safeArrayForKey:@"data"];
|
||||
if (dataArr.count > 0){
|
||||
LMSpecialGiftModel *model = [LMSpecialGiftModel mj_objectWithKeyValues:dataArr.firstObject];
|
||||
[self.giftLeftIMg sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:kDefaultUserIcon];
|
||||
self.giftLeftName.text = model.gift_name;
|
||||
self.giftLeftPrice.text = model.gift_price;
|
||||
}
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
192
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.xib
Normal file
192
SweetParty/主类/狸猫新增/相亲房/LMBaodengAlertView.xib
Normal file
@@ -0,0 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMBaodengAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bmj-71-lhg">
|
||||
<rect key="frame" x="15" y="241" width="345" height="330"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xq_special_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="DX1-Sg-XsY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="330"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="爆灯" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8jX-Zr-hEJ">
|
||||
<rect key="frame" x="154" y="15" width="37" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rki-CK-waR">
|
||||
<rect key="frame" x="10" y="20" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="4mJ-K0-pmx"/>
|
||||
<constraint firstAttribute="width" constant="30" id="TUk-AF-uty"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="yG9-P1-cpi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7ox-CA-fgP">
|
||||
<rect key="frame" x="120" y="55" width="105" height="126"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xq_special_gift_sel" translatesAutoresizingMaskIntoConstraints="NO" id="RfN-ck-EdJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="126"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TyT-YF-0So">
|
||||
<rect key="frame" x="18.666666666666657" y="10" width="68" height="68"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="68" id="76w-at-QU0"/>
|
||||
<constraint firstAttribute="width" constant="68" id="x5n-U5-0Zf"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p9a-UW-pnF">
|
||||
<rect key="frame" x="43.666666666666657" y="102" width="28" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="miebaodeng_icon" translatesAutoresizingMaskIntoConstraints="NO" id="c6h-YB-bhL">
|
||||
<rect key="frame" x="27.666666666666657" y="101" width="14" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="FcH-NS-gnY"/>
|
||||
<constraint firstAttribute="height" constant="14" id="yWH-Bd-VrG"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="礼物名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qek-IT-2fq">
|
||||
<rect key="frame" x="32" y="83" width="41" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="qek-IT-2fq" firstAttribute="centerX" secondItem="7ox-CA-fgP" secondAttribute="centerX" id="AeF-Cr-W6N"/>
|
||||
<constraint firstItem="RfN-ck-EdJ" firstAttribute="leading" secondItem="7ox-CA-fgP" secondAttribute="leading" id="BK5-hq-Ru3"/>
|
||||
<constraint firstItem="TyT-YF-0So" firstAttribute="centerX" secondItem="7ox-CA-fgP" secondAttribute="centerX" id="CQN-Vb-ghe"/>
|
||||
<constraint firstAttribute="height" constant="126" id="L6l-pq-OIE"/>
|
||||
<constraint firstAttribute="width" constant="105" id="QEZ-5a-18n"/>
|
||||
<constraint firstItem="p9a-UW-pnF" firstAttribute="leading" secondItem="c6h-YB-bhL" secondAttribute="trailing" constant="2" id="RwP-bF-NR9"/>
|
||||
<constraint firstItem="RfN-ck-EdJ" firstAttribute="top" secondItem="7ox-CA-fgP" secondAttribute="top" id="VlE-U9-ymT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="RfN-ck-EdJ" secondAttribute="bottom" id="XRG-DD-6Ui"/>
|
||||
<constraint firstItem="p9a-UW-pnF" firstAttribute="top" secondItem="7ox-CA-fgP" secondAttribute="top" constant="102" id="YUf-m9-tJ9"/>
|
||||
<constraint firstItem="p9a-UW-pnF" firstAttribute="centerX" secondItem="7ox-CA-fgP" secondAttribute="centerX" constant="5" id="ZRo-XH-Z8K"/>
|
||||
<constraint firstItem="qek-IT-2fq" firstAttribute="top" secondItem="7ox-CA-fgP" secondAttribute="top" constant="83" id="dO4-as-1VM"/>
|
||||
<constraint firstItem="TyT-YF-0So" firstAttribute="top" secondItem="7ox-CA-fgP" secondAttribute="top" constant="10" id="tnb-nc-83t"/>
|
||||
<constraint firstItem="c6h-YB-bhL" firstAttribute="centerY" secondItem="p9a-UW-pnF" secondAttribute="centerY" id="ufu-GT-DAw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RfN-ck-EdJ" secondAttribute="trailing" id="weQ-EZ-x4R"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4DA-QK-art">
|
||||
<rect key="frame" x="30" y="256" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="125" id="cMI-9h-ISW"/>
|
||||
<constraint firstAttribute="height" constant="44" id="wq4-ek-DDM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="取消">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="Hl2-cF-ztg"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="elN-kQ-OXE">
|
||||
<rect key="frame" x="190" y="256" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.050980392156862744" green="1" blue="0.72549019607843135" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="125" id="5CZ-0V-ZQC"/>
|
||||
<constraint firstAttribute="height" constant="44" id="aAV-WD-NoZ"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="立即赠送">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="tBc-e3-oki"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fgV-qE-fMB">
|
||||
<rect key="frame" x="33.666666666666657" y="201" width="277.66666666666674" height="38.333333333333343"/>
|
||||
<string key="text">爆灯需要赠送上方特定礼物才可以哦,
|
||||
您确定要爆灯吗?</string>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="330" id="5Lk-n4-FCs"/>
|
||||
<constraint firstItem="DX1-Sg-XsY" firstAttribute="top" secondItem="Bmj-71-lhg" secondAttribute="top" id="5Rh-DE-QsO"/>
|
||||
<constraint firstItem="rki-CK-waR" firstAttribute="top" secondItem="Bmj-71-lhg" secondAttribute="top" constant="20" id="CSR-Py-bqe"/>
|
||||
<constraint firstItem="4DA-QK-art" firstAttribute="leading" secondItem="Bmj-71-lhg" secondAttribute="leading" constant="30" id="QHG-Ds-qwM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DX1-Sg-XsY" secondAttribute="bottom" id="SgI-g1-glf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DX1-Sg-XsY" secondAttribute="trailing" id="TDq-Jc-66Q"/>
|
||||
<constraint firstItem="8jX-Zr-hEJ" firstAttribute="top" secondItem="Bmj-71-lhg" secondAttribute="top" constant="15" id="TXs-k4-POH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="elN-kQ-OXE" secondAttribute="bottom" constant="30" id="Wdy-ha-pHv"/>
|
||||
<constraint firstItem="8jX-Zr-hEJ" firstAttribute="centerX" secondItem="Bmj-71-lhg" secondAttribute="centerX" id="Zx6-Fi-XJU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="elN-kQ-OXE" secondAttribute="trailing" constant="30" id="dDB-Ac-kgm"/>
|
||||
<constraint firstItem="7ox-CA-fgP" firstAttribute="centerX" secondItem="Bmj-71-lhg" secondAttribute="centerX" id="eRC-o4-GfD"/>
|
||||
<constraint firstItem="DX1-Sg-XsY" firstAttribute="leading" secondItem="Bmj-71-lhg" secondAttribute="leading" id="pXv-N2-vsE"/>
|
||||
<constraint firstItem="fgV-qE-fMB" firstAttribute="top" secondItem="7ox-CA-fgP" secondAttribute="bottom" constant="20" id="qJ6-03-lmo"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4DA-QK-art" secondAttribute="bottom" constant="30" id="u6n-9i-HVO"/>
|
||||
<constraint firstItem="fgV-qE-fMB" firstAttribute="centerX" secondItem="Bmj-71-lhg" secondAttribute="centerX" id="uFw-FL-FYv"/>
|
||||
<constraint firstItem="rki-CK-waR" firstAttribute="leading" secondItem="Bmj-71-lhg" secondAttribute="leading" constant="10" id="zVr-QB-Vri"/>
|
||||
<constraint firstItem="7ox-CA-fgP" firstAttribute="top" secondItem="Bmj-71-lhg" secondAttribute="top" constant="55" id="zve-lJ-EcC"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Bmj-71-lhg" secondAttribute="trailing" constant="15" id="jmp-tu-x7b"/>
|
||||
<constraint firstItem="Bmj-71-lhg" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="oqr-Jg-Oex"/>
|
||||
<constraint firstItem="Bmj-71-lhg" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="xiE-Wb-dAX"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="elN-kQ-OXE" id="ha1-9J-BCb"/>
|
||||
<outlet property="giftLeftIMg" destination="TyT-YF-0So" id="p68-Vh-bjJ"/>
|
||||
<outlet property="giftLeftName" destination="qek-IT-2fq" id="26v-r2-k2R"/>
|
||||
<outlet property="giftLeftPrice" destination="p9a-UW-pnF" id="GcD-jX-VFh"/>
|
||||
<outlet property="mineView" destination="Bmj-71-lhg" id="YAE-jv-eSm"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-401" y="15"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="miebaodeng_icon" width="16" height="16"/>
|
||||
<image name="whiteBack" width="8.5" height="15"/>
|
||||
<image name="xq_special_alert_bg" width="350.5" height="392.5"/>
|
||||
<image name="xq_special_gift_sel" width="105" height="126"/>
|
||||
</resources>
|
||||
</document>
|
||||
21
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.h
Normal file
21
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// LMInviteHechangAlert.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/9/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef void(^confirmBlcok)(void);
|
||||
|
||||
@interface LMInviteHechangAlert : UIView
|
||||
|
||||
@property (nonatomic, copy) confirmBlcok confirmBlock;
|
||||
- (void)sheetViewforViewAppear;
|
||||
- (void)sheetViewforViewClose;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
59
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.m
Normal file
59
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.m
Normal file
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// LMInviteHechangAlert.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/9/11.
|
||||
//
|
||||
|
||||
#import "LMInviteHechangAlert.h"
|
||||
|
||||
|
||||
@interface LMInviteHechangAlert ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView *mineView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMInviteHechangAlert
|
||||
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.confirmButton.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(125, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
}
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
[self sheetViewforViewClose];
|
||||
if (self.confirmBlock){
|
||||
self.confirmBlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)cancelButtonClick:(UIButton *)sender {
|
||||
[self sheetViewforViewClose];
|
||||
}
|
||||
|
||||
- (void)sheetViewforViewAppear
|
||||
{
|
||||
//滑出动画
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.mineView.frame = CGRectMake(0, 0, ScreenWidth, self.mineView.height);
|
||||
} completion:^(BOOL finished) {
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)sheetViewforViewClose
|
||||
{
|
||||
self.backgroundColor = HEXCOLORA(0x000000, 0);
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight);
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
123
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.xib
Normal file
123
SweetParty/主类/狸猫新增/相亲房/LMInviteHechangAlert.xib
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMInviteHechangAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qfk-Nu-PYK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="GaB-0a-pDx"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WFu-Ud-OAf">
|
||||
<rect key="frame" x="15" y="306" width="345" height="200"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tankuang_bg" translatesAutoresizingMaskIntoConstraints="NO" id="KVp-SM-l3q">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="200"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="神秘人邀请您加入合唱,是否同意?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eXb-nT-vOe">
|
||||
<rect key="frame" x="50" y="68" width="245" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提示" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nkA-A2-Dz6">
|
||||
<rect key="frame" x="157.33333333333334" y="27" width="30.666666666666657" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9a2-1e-gdN">
|
||||
<rect key="frame" x="25" y="126" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="8Iy-I7-0Tx"/>
|
||||
<constraint firstAttribute="width" constant="125" id="nCr-pF-a9t"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="取消">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="Vey-ce-WrW"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ue7-2d-yE0">
|
||||
<rect key="frame" x="195" y="126" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.72941176470588232" green="0.38823529411764707" blue="0.8666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="EHR-Uo-cm1"/>
|
||||
<constraint firstAttribute="width" constant="125" id="wGw-dq-OWr"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="同意">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="JH7-sD-OlP"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="KVp-SM-l3q" firstAttribute="leading" secondItem="WFu-Ud-OAf" secondAttribute="leading" id="0kO-DG-fAI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="9a2-1e-gdN" secondAttribute="bottom" constant="30" id="1w1-Ag-Obs"/>
|
||||
<constraint firstAttribute="height" constant="200" id="8KZ-2p-ISR"/>
|
||||
<constraint firstItem="nkA-A2-Dz6" firstAttribute="top" secondItem="WFu-Ud-OAf" secondAttribute="top" constant="27" id="8fc-cF-ydM"/>
|
||||
<constraint firstItem="KVp-SM-l3q" firstAttribute="top" secondItem="WFu-Ud-OAf" secondAttribute="top" id="9MW-vf-ojV"/>
|
||||
<constraint firstItem="eXb-nT-vOe" firstAttribute="centerX" secondItem="WFu-Ud-OAf" secondAttribute="centerX" id="A6Z-Os-JSz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KVp-SM-l3q" secondAttribute="trailing" id="N6w-jD-gpR"/>
|
||||
<constraint firstItem="eXb-nT-vOe" firstAttribute="top" secondItem="nkA-A2-Dz6" secondAttribute="bottom" constant="23" id="Nh6-PT-Yel"/>
|
||||
<constraint firstItem="9a2-1e-gdN" firstAttribute="leading" secondItem="WFu-Ud-OAf" secondAttribute="leading" constant="25" id="Q8q-1Y-Dgf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ue7-2d-yE0" secondAttribute="trailing" constant="25" id="Xuj-x1-80I"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KVp-SM-l3q" secondAttribute="bottom" id="jn2-8a-ZZT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ue7-2d-yE0" secondAttribute="bottom" constant="30" id="jzb-8m-fue"/>
|
||||
<constraint firstItem="nkA-A2-Dz6" firstAttribute="centerX" secondItem="WFu-Ud-OAf" secondAttribute="centerX" id="vZW-Ak-w38"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="WFu-Ud-OAf" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="VUz-gY-9kg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Qfk-Nu-PYK" secondAttribute="bottom" id="Ye4-r6-uho"/>
|
||||
<constraint firstItem="Qfk-Nu-PYK" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="trailing" id="bmE-2V-fj0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WFu-Ud-OAf" secondAttribute="trailing" constant="15" id="fx4-NT-eIM"/>
|
||||
<constraint firstItem="Qfk-Nu-PYK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="lF3-lU-OfA"/>
|
||||
<constraint firstItem="Qfk-Nu-PYK" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="yNM-6G-9er"/>
|
||||
<constraint firstItem="WFu-Ud-OAf" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ygC-sT-8CB"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="ue7-2d-yE0" id="k8G-CZ-DJj"/>
|
||||
<outlet property="mineView" destination="WFu-Ud-OAf" id="F2W-9a-33K"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-190" y="-11"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="tankuang_bg" width="345" height="237"/>
|
||||
</resources>
|
||||
</document>
|
||||
26
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.h
Normal file
26
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// LMSendSpecialCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/9/2.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMSpecialGiftModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMSendSpecialCollectionViewCellID = @"LMSendSpecialCollectionViewCellID";
|
||||
@interface LMSendSpecialCollectionViewCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *itemBGIcon;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftBaseIMG;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftPriceLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView *tagCover;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *tagNameLabel;
|
||||
|
||||
@property (nonatomic, strong) LMSpecialGiftModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
32
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.m
Normal file
32
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.m
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// LMSendSpecialCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/9/2.
|
||||
//
|
||||
|
||||
#import "LMSendSpecialCollectionViewCell.h"
|
||||
|
||||
@implementation LMSendSpecialCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self.tagCover styleGradiBlueColor];
|
||||
}
|
||||
|
||||
- (void)setModel:(LMSpecialGiftModel *)model
|
||||
{
|
||||
_model = model;
|
||||
self.giftNameLabel.text = model.gift_name;
|
||||
self.giftPriceLabel.text = model.gift_price;
|
||||
[self.giftBaseIMG sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:kDefaultUserIcon];
|
||||
if (model.isSelect){
|
||||
self.itemBGIcon.image = ImageNamed(@"xq_special_gift_sel");
|
||||
}else{
|
||||
self.itemBGIcon.image = ImageNamed(@"xq_special_gift_nor");
|
||||
}
|
||||
self.tagNameLabel.text = model.tag_name;
|
||||
}
|
||||
|
||||
@end
|
||||
121
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.xib
Normal file
121
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialCollectionViewCell.xib
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="LMSendSpecialCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="11g-CC-FU4">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="126"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="xq_special_gift_nor" translatesAutoresizingMaskIntoConstraints="NO" id="Qqp-4k-6jz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="105" height="126"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Zbo-9Z-wA4">
|
||||
<rect key="frame" x="18.666666666666671" y="10" width="68" height="68"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="68" id="4Pf-FH-Pje"/>
|
||||
<constraint firstAttribute="height" constant="68" id="w9R-Hv-rI0"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qno-NV-ur8">
|
||||
<rect key="frame" x="43.666666666666664" y="101" width="27.999999999999993" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dress_coin" translatesAutoresizingMaskIntoConstraints="NO" id="YlJ-RE-ZnM">
|
||||
<rect key="frame" x="27.666666666666671" y="100" width="14" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="4Ah-ef-9NI"/>
|
||||
<constraint firstAttribute="height" constant="14" id="s2e-eB-46m"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="礼物名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yip-gE-NcX">
|
||||
<rect key="frame" x="32" y="83" width="41" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cHO-0T-77P">
|
||||
<rect key="frame" x="55" y="5" width="45" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="灭爆灯" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="K3x-3U-VG9">
|
||||
<rect key="frame" x="7.3333333333333375" y="4" width="30.666666666666671" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemPinkColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="K3x-3U-VG9" firstAttribute="centerX" secondItem="cHO-0T-77P" secondAttribute="centerX" id="AYc-II-PsC"/>
|
||||
<constraint firstAttribute="width" constant="45" id="BcQ-MN-5jw"/>
|
||||
<constraint firstItem="K3x-3U-VG9" firstAttribute="centerY" secondItem="cHO-0T-77P" secondAttribute="centerY" id="I3U-ET-aGH"/>
|
||||
<constraint firstAttribute="height" constant="20" id="cQj-9U-Ozg"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Zbo-9Z-wA4" firstAttribute="top" secondItem="11g-CC-FU4" secondAttribute="top" constant="10" id="1ho-lY-59m"/>
|
||||
<constraint firstItem="YlJ-RE-ZnM" firstAttribute="centerY" secondItem="qno-NV-ur8" secondAttribute="centerY" id="At4-7h-peV"/>
|
||||
<constraint firstItem="qno-NV-ur8" firstAttribute="top" secondItem="11g-CC-FU4" secondAttribute="top" constant="101" id="Br5-fu-KfB"/>
|
||||
<constraint firstItem="yip-gE-NcX" firstAttribute="centerX" secondItem="11g-CC-FU4" secondAttribute="centerX" id="BvL-Iy-IAP"/>
|
||||
<constraint firstItem="qno-NV-ur8" firstAttribute="centerX" secondItem="11g-CC-FU4" secondAttribute="centerX" constant="5" id="EbB-xh-RuP"/>
|
||||
<constraint firstItem="Qqp-4k-6jz" firstAttribute="top" secondItem="11g-CC-FU4" secondAttribute="top" id="KEv-u6-mTz"/>
|
||||
<constraint firstItem="yip-gE-NcX" firstAttribute="top" secondItem="11g-CC-FU4" secondAttribute="top" constant="83" id="UUX-mT-xNz"/>
|
||||
<constraint firstItem="Zbo-9Z-wA4" firstAttribute="centerX" secondItem="11g-CC-FU4" secondAttribute="centerX" id="UsO-zb-AuR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Qqp-4k-6jz" secondAttribute="trailing" id="b80-iq-IDH"/>
|
||||
<constraint firstItem="cHO-0T-77P" firstAttribute="top" secondItem="11g-CC-FU4" secondAttribute="top" constant="5" id="e1u-Ix-pLH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Qqp-4k-6jz" secondAttribute="bottom" id="fTl-xf-3Tt"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cHO-0T-77P" secondAttribute="trailing" constant="5" id="nfG-nb-CXA"/>
|
||||
<constraint firstItem="Qqp-4k-6jz" firstAttribute="leading" secondItem="11g-CC-FU4" secondAttribute="leading" id="pfA-yQ-bCq"/>
|
||||
<constraint firstItem="qno-NV-ur8" firstAttribute="leading" secondItem="YlJ-RE-ZnM" secondAttribute="trailing" constant="2" id="uXx-Du-4TX"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="11g-CC-FU4" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="0U8-o7-eIa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="11g-CC-FU4" secondAttribute="trailing" id="0or-xH-sCt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="11g-CC-FU4" secondAttribute="bottom" id="Gfg-7W-0EB"/>
|
||||
<constraint firstItem="11g-CC-FU4" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="ai2-vz-VLD"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="108" height="126"/>
|
||||
<connections>
|
||||
<outlet property="giftBaseIMG" destination="Zbo-9Z-wA4" id="Y4T-Yi-ACf"/>
|
||||
<outlet property="giftNameLabel" destination="yip-gE-NcX" id="FSe-e2-wRC"/>
|
||||
<outlet property="giftPriceLabel" destination="qno-NV-ur8" id="a5W-u0-OuR"/>
|
||||
<outlet property="itemBGIcon" destination="Qqp-4k-6jz" id="To7-MB-eiq"/>
|
||||
<outlet property="tagCover" destination="cHO-0T-77P" id="6Pi-Tp-3EK"/>
|
||||
<outlet property="tagNameLabel" destination="K3x-3U-VG9" id="3b6-ni-8cQ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="175.57251908396947" y="15.492957746478874"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="dress_coin" width="24" height="24"/>
|
||||
<image name="xq_special_gift_nor" width="109" height="114.5"/>
|
||||
<systemColor name="systemPinkColor">
|
||||
<color red="1" green="0.17647058823529413" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.h
Normal file
24
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMSendSpecialGiftView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSendSpecialGiftView : UIView
|
||||
|
||||
@property (nonatomic, strong) NSString *rid;
|
||||
@property (nonatomic, strong) NSString *close_uid;
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
|
||||
- (void)sheetViewforViewAppear;
|
||||
- (void)sheetViewforViewClose;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
166
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.m
Normal file
166
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.m
Normal file
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// LMSendSpecialGiftView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import "LMSendSpecialGiftView.h"
|
||||
#import "LMSpecialGiftModel.h"
|
||||
#import "LMSendSpecialCollectionViewCell.h"
|
||||
|
||||
@interface LMSendSpecialGiftView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *mineView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *giftItemView;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSString *submitGid;
|
||||
@property (nonatomic, strong) NSString *submitTagName;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMSendSpecialGiftView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.mineView.frame = CGRectMake(0, APPH, self.mineView.width, self.mineView.height);
|
||||
self.mineView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 300) direction:(FXGradientChangeDirectionVertical) startColor:HEXCOLOR(0xDFFFF6) endColor:HEXCOLOR(0xFFFFFF)];
|
||||
self.confirmButton.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(125, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor];
|
||||
[self requestLoadSpecialGift];
|
||||
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc] init];
|
||||
flow.itemSize = CGSizeMake(105, 126);
|
||||
CGFloat left = (APPW-30-105*2-35)/2;
|
||||
flow.sectionInset = UIEdgeInsetsMake(0, left, 0, left);
|
||||
flow.minimumLineSpacing = 35;
|
||||
flow.minimumInteritemSpacing = 35;
|
||||
flow.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
|
||||
self.giftItemView.collectionViewLayout = flow;
|
||||
self.giftItemView.delegate = self;
|
||||
self.giftItemView.dataSource = self;
|
||||
[self.giftItemView registerNib:[UINib nibWithNibName:@"LMSendSpecialCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMSendSpecialCollectionViewCellID];
|
||||
}
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
if (self.submitGid.length == 0){
|
||||
[HelpPageDefine showMessage:@"请选择礼物"];
|
||||
return;
|
||||
}
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
[dict setValue:self.rid forKey:@"rid"];
|
||||
[dict setValue:self.close_uid forKey:@"close_uid"];
|
||||
[dict setValue:self.submitGid forKey:@"gid"];
|
||||
[dict setValue:@"1" forKey:@"num"];
|
||||
|
||||
[BJHttpTool BJ_XQ_reverse_send_giftParameters:dict success:^(id response) {
|
||||
if ([self.submitTagName isEqualToString:@"灭亮灯"]){
|
||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"特殊礼物灭亮灯" ofType:@"wav"];
|
||||
int result = [self.viewModel.agoraKit playEffect:1 filePath:filePath loopCount:0 pitch:1 pan:0 gain:100 publish:YES];
|
||||
if (result != 0) {
|
||||
NSLog(@"音效播放失败");
|
||||
}
|
||||
}else if ([self.submitTagName isEqualToString:@"灭爆灯"]){
|
||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"特殊礼物灭爆灯" ofType:@"mp3"];
|
||||
int result = [self.viewModel.agoraKit playEffect:1 filePath:filePath loopCount:0 pitch:1 pan:0 gain:100 publish:YES];
|
||||
if (result != 0) {
|
||||
NSLog(@"音效播放失败");
|
||||
}
|
||||
}else if ([self.submitTagName isEqualToString:@"牵线"]){
|
||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"特殊礼物普通牵线" ofType:@"mp3"];
|
||||
int result = [self.viewModel.agoraKit playEffect:1 filePath:filePath loopCount:0 pitch:1 pan:0 gain:100 publish:YES];
|
||||
if (result != 0) {
|
||||
NSLog(@"音效播放失败");
|
||||
}
|
||||
}else if ([self.submitTagName isEqualToString:@"牵手"]){
|
||||
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"特殊礼物牵手成功" ofType:@"mp3"];
|
||||
int result = [self.viewModel.agoraKit playEffect:1 filePath:filePath loopCount:0 pitch:1 pan:0 gain:100 publish:YES];
|
||||
if (result != 0) {
|
||||
NSLog(@"音效播放失败");
|
||||
}
|
||||
}
|
||||
|
||||
[self sheetViewforViewClose];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArr.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMSendSpecialCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMSendSpecialCollectionViewCellID forIndexPath:indexPath];
|
||||
if (self.dataArr.count > indexPath.row){
|
||||
LMSpecialGiftModel *model = self.dataArr[indexPath.row];
|
||||
cell.model = model;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMSpecialGiftModel *model = self.dataArr[indexPath.row];
|
||||
[self.dataArr enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
LMSpecialGiftModel *nor = obj;
|
||||
nor.isSelect = NO;
|
||||
}];
|
||||
|
||||
model.isSelect = YES;
|
||||
self.submitGid = model.gid;
|
||||
self.submitTagName = model.tag_name;
|
||||
[collectionView reloadData];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)cancelButtonClick:(UIButton *)sender {
|
||||
[self sheetViewforViewClose];
|
||||
}
|
||||
|
||||
- (void)sheetViewforViewAppear
|
||||
{
|
||||
//滑出动画
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.mineView.frame = CGRectMake(0, APPH/2-330/2, self.mineView.width, self.mineView.height);
|
||||
} completion:^(BOOL finished) {
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)sheetViewforViewClose
|
||||
{
|
||||
self.backgroundColor = HEXCOLORA(0x000000, 0);
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, ScreenHeight, ScreenWidth, ScreenHeight);
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)requestLoadSpecialGift
|
||||
{
|
||||
//灭灯礼物
|
||||
[BJHttpTool BJ_XQ_appoint_giftParameters:@{@"type":@"2"} success:^(id response) {
|
||||
self.dataArr = [LMSpecialGiftModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
[self.giftItemView reloadData];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
160
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.xib
Normal file
160
SweetParty/主类/狸猫新增/相亲房/LMSendSpecialGiftView.xib
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMSendSpecialGiftView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vc9-lO-gwA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="JL3-do-uET"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TtB-ak-x5h">
|
||||
<rect key="frame" x="15" y="256" width="345" height="300"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tankuang_bg" translatesAutoresizingMaskIntoConstraints="NO" id="AO4-eY-J9f">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="300"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="赠送特殊礼物" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ay4-pv-3c5">
|
||||
<rect key="frame" x="117.33333333333334" y="15" width="110.33333333333334" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uH2-Pm-I83">
|
||||
<rect key="frame" x="10" y="20" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="AyD-Yg-KPn"/>
|
||||
<constraint firstAttribute="width" constant="30" id="znF-8R-P2y"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="whiteBack"/>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="E7C-TM-Eg7"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择你要赠送的特殊礼物~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SS3-LD-DYa">
|
||||
<rect key="frame" x="77.666666666666686" y="60.000000000000007" width="190" height="19.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.71372549019607845" blue="0.50980392156862742" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2LC-Kg-GQc">
|
||||
<rect key="frame" x="30" y="241" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="TiY-Wz-8yJ"/>
|
||||
<constraint firstAttribute="width" constant="125" id="Ym0-Te-Ut5"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="取消">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="cancelButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="3cM-CL-eyT"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2aU-Bu-Ejo">
|
||||
<rect key="frame" x="190" y="241" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.72941176470588232" green="0.38823529411764707" blue="0.8666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="SWo-et-IQQ"/>
|
||||
<constraint firstAttribute="width" constant="125" id="mV1-GW-WOg"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="立即赠送">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="0Tb-gH-b9t"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="fkP-FV-n9v">
|
||||
<rect key="frame" x="0.0" y="99.333333333333314" width="345" height="126"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="126" id="hbW-MF-80l"/>
|
||||
</constraints>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="j9a-lN-Zyu">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="2aU-Bu-Ejo" secondAttribute="bottom" constant="15" id="A1N-VD-cGx"/>
|
||||
<constraint firstItem="SS3-LD-DYa" firstAttribute="top" secondItem="TtB-ak-x5h" secondAttribute="top" constant="60" id="ACp-JK-G55"/>
|
||||
<constraint firstItem="uH2-Pm-I83" firstAttribute="leading" secondItem="TtB-ak-x5h" secondAttribute="leading" constant="10" id="AeL-4v-oTd"/>
|
||||
<constraint firstAttribute="height" constant="300" id="DRE-Az-r6f"/>
|
||||
<constraint firstItem="uH2-Pm-I83" firstAttribute="top" secondItem="TtB-ak-x5h" secondAttribute="top" constant="20" id="DXW-mk-FQj"/>
|
||||
<constraint firstItem="Ay4-pv-3c5" firstAttribute="centerX" secondItem="TtB-ak-x5h" secondAttribute="centerX" id="GXN-FF-xCM"/>
|
||||
<constraint firstItem="SS3-LD-DYa" firstAttribute="centerX" secondItem="TtB-ak-x5h" secondAttribute="centerX" id="I0F-m6-N1H"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fkP-FV-n9v" secondAttribute="trailing" id="WmQ-yW-3i7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="AO4-eY-J9f" secondAttribute="bottom" id="Ye9-Of-OGb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AO4-eY-J9f" secondAttribute="trailing" id="bMq-oe-5Ca"/>
|
||||
<constraint firstItem="fkP-FV-n9v" firstAttribute="leading" secondItem="TtB-ak-x5h" secondAttribute="leading" id="dmu-ob-eKd"/>
|
||||
<constraint firstItem="Ay4-pv-3c5" firstAttribute="top" secondItem="TtB-ak-x5h" secondAttribute="top" constant="15" id="i4P-kt-nsc"/>
|
||||
<constraint firstItem="AO4-eY-J9f" firstAttribute="leading" secondItem="TtB-ak-x5h" secondAttribute="leading" id="lYO-Vt-8pF"/>
|
||||
<constraint firstItem="2LC-Kg-GQc" firstAttribute="leading" secondItem="TtB-ak-x5h" secondAttribute="leading" constant="30" id="ro4-79-pJ5"/>
|
||||
<constraint firstItem="fkP-FV-n9v" firstAttribute="top" secondItem="SS3-LD-DYa" secondAttribute="bottom" constant="20" id="u9W-MS-FYr"/>
|
||||
<constraint firstItem="AO4-eY-J9f" firstAttribute="top" secondItem="TtB-ak-x5h" secondAttribute="top" id="xcb-hV-DJP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2LC-Kg-GQc" secondAttribute="bottom" constant="15" id="ycS-bM-x15"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2aU-Bu-Ejo" secondAttribute="trailing" constant="30" id="zS7-u4-WuG"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="TtB-ak-x5h" secondAttribute="trailing" constant="15" id="2Yl-IV-KTQ"/>
|
||||
<constraint firstItem="TtB-ak-x5h" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="PgD-Wb-vno"/>
|
||||
<constraint firstItem="TtB-ak-x5h" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Rt8-oN-SaR"/>
|
||||
<constraint firstItem="vc9-lO-gwA" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="trailing" id="amy-aa-4fM"/>
|
||||
<constraint firstItem="vc9-lO-gwA" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="b4A-AH-5Kc"/>
|
||||
<constraint firstItem="vc9-lO-gwA" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="cro-gb-0kW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="vc9-lO-gwA" secondAttribute="bottom" id="hAC-an-pSB"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="2aU-Bu-Ejo" id="JjX-LQ-vcF"/>
|
||||
<outlet property="giftItemView" destination="fkP-FV-n9v" id="PXD-Wh-sZw"/>
|
||||
<outlet property="mineView" destination="TtB-ak-x5h" id="pxB-1B-FHC"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="91" y="42"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="tankuang_bg" width="345" height="380"/>
|
||||
<image name="whiteBack" width="8.5" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/狸猫新增/相亲房/LMSpecialGiftModel.h
Normal file
24
SweetParty/主类/狸猫新增/相亲房/LMSpecialGiftModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// LMSpecialGiftModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSpecialGiftModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSString *gid;
|
||||
@property (nonatomic, strong) NSString *gift_price;
|
||||
@property (nonatomic, strong) NSString *base_image;
|
||||
@property (nonatomic, strong) NSString *gift_name;
|
||||
@property (nonatomic, strong) NSString *tag_name;
|
||||
|
||||
@property (nonatomic, assign) BOOL isSelect;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/相亲房/LMSpecialGiftModel.m
Normal file
12
SweetParty/主类/狸猫新增/相亲房/LMSpecialGiftModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMSpecialGiftModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/29.
|
||||
//
|
||||
|
||||
#import "LMSpecialGiftModel.h"
|
||||
|
||||
@implementation LMSpecialGiftModel
|
||||
|
||||
@end
|
||||
BIN
SweetParty/主类/狸猫新增/相亲房/音频/baodeng_vap.mp4
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/baodeng_vap.mp4
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/主持点开始游戏音效.wav
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/主持点开始游戏音效.wav
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾亮灯.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾亮灯.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾灭灯.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾灭灯.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾爆灯.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/嘉宾爆灯.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物普通牵线.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物普通牵线.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物灭亮灯.wav
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物灭亮灯.wav
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物灭爆灯.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物灭爆灯.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物牵手成功.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/特殊礼物牵手成功.mp3
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/酒吧房私密小屋特效.mp4
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/酒吧房私密小屋特效.mp4
Normal file
Binary file not shown.
BIN
SweetParty/主类/狸猫新增/相亲房/音频/酒吧房约她进小黑屋音效.mp3
Normal file
BIN
SweetParty/主类/狸猫新增/相亲房/音频/酒吧房约她进小黑屋音效.mp3
Normal file
Binary file not shown.
26
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.h
Normal file
26
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// LMSignInAlertCollectionViewCell.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LMSingListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
static NSString *LMSignInAlertCollectionViewCellID = @"LMSignInAlertCollectionViewCellID";
|
||||
@interface LMSignInAlertCollectionViewCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *coinLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *dayLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView *signsCover;
|
||||
@property (weak, nonatomic) IBOutlet UIView *baseCover;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImg;
|
||||
|
||||
@property (nonatomic, strong) LMSingListModel *model;
|
||||
@property (nonatomic, assign) NSInteger index;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
48
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.m
Normal file
48
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.m
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// LMSignInAlertCollectionViewCell.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInAlertCollectionViewCell.h"
|
||||
|
||||
@implementation LMSignInAlertCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(LMSingListModel *)model
|
||||
{
|
||||
_model = model;
|
||||
self.coinLabel.text = [NSString stringWithFormat:@"%@金币",model.award];
|
||||
if (model.is_sign == 2){
|
||||
self.coinLabel.textColor = HEXCOLOR(0x333333);
|
||||
}else{
|
||||
self.coinLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIndex:(NSInteger)index {
|
||||
_index = index;
|
||||
|
||||
self.dayLabel.text = [NSString stringWithFormat:@"%ld",index+1];
|
||||
|
||||
if (index < 6) {
|
||||
if (_model.is_sign == 2){
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_1");
|
||||
}else{
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_2");
|
||||
}
|
||||
}else {
|
||||
if (_model.is_sign == 2){
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_3");
|
||||
}else{
|
||||
self.bgImg.image = ImageNamed(@"signin_bg_4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
92
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.xib
Normal file
92
SweetParty/主类/狸猫新增/签到/LMSignInAlertCollectionViewCell.xib
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="LMSignInAlertCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MHf-tU-VPR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="clc-CX-WMp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="55"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="day_bg" translatesAutoresizingMaskIntoConstraints="NO" id="voY-QH-Mx5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="156-Wa-Bts"/>
|
||||
<constraint firstAttribute="width" constant="20" id="jKq-YL-MaQ"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qcN-Un-uaP">
|
||||
<rect key="frame" x="7.3333333333333339" y="4" width="5.3333333333333339" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_jinbi" translatesAutoresizingMaskIntoConstraints="NO" id="FOh-uQ-m4l">
|
||||
<rect key="frame" x="23" y="6" width="24" height="24"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="10金币" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fWY-gW-CHP">
|
||||
<rect key="frame" x="19" y="37" width="32" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="fWY-gW-CHP" secondAttribute="bottom" constant="6" id="5oz-eq-kjs"/>
|
||||
<constraint firstItem="FOh-uQ-m4l" firstAttribute="centerX" secondItem="MHf-tU-VPR" secondAttribute="centerX" id="7h2-ei-QdV"/>
|
||||
<constraint firstItem="voY-QH-Mx5" firstAttribute="leading" secondItem="MHf-tU-VPR" secondAttribute="leading" id="Dp4-XA-kKe"/>
|
||||
<constraint firstItem="clc-CX-WMp" firstAttribute="leading" secondItem="MHf-tU-VPR" secondAttribute="leading" id="Gh1-Fo-pWI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="clc-CX-WMp" secondAttribute="bottom" id="RX3-gc-77z"/>
|
||||
<constraint firstItem="clc-CX-WMp" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" id="Ulc-bO-kmg"/>
|
||||
<constraint firstItem="fWY-gW-CHP" firstAttribute="centerX" secondItem="MHf-tU-VPR" secondAttribute="centerX" id="VQK-G8-OYC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="clc-CX-WMp" secondAttribute="trailing" id="WUd-5p-7YV"/>
|
||||
<constraint firstItem="FOh-uQ-m4l" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" constant="6" id="acJ-YS-4kI"/>
|
||||
<constraint firstItem="qcN-Un-uaP" firstAttribute="centerX" secondItem="voY-QH-Mx5" secondAttribute="centerX" id="haW-MU-AWW"/>
|
||||
<constraint firstItem="voY-QH-Mx5" firstAttribute="top" secondItem="MHf-tU-VPR" secondAttribute="top" id="iVM-6o-CrK"/>
|
||||
<constraint firstItem="qcN-Un-uaP" firstAttribute="centerY" secondItem="voY-QH-Mx5" secondAttribute="centerY" id="sdH-fC-IbD"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="MHf-tU-VPR" secondAttribute="trailing" id="Y68-oq-2fh"/>
|
||||
<constraint firstItem="MHf-tU-VPR" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="bU8-Ro-Laf"/>
|
||||
<constraint firstItem="MHf-tU-VPR" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="lXV-L4-nIx"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MHf-tU-VPR" secondAttribute="bottom" id="qbL-ex-f27"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="80" height="85"/>
|
||||
<connections>
|
||||
<outlet property="baseCover" destination="MHf-tU-VPR" id="VfU-rf-ipK"/>
|
||||
<outlet property="bgImg" destination="clc-CX-WMp" id="iJr-5D-AIr"/>
|
||||
<outlet property="coinLabel" destination="fWY-gW-CHP" id="neo-DL-opz"/>
|
||||
<outlet property="dayLabel" destination="qcN-Un-uaP" id="bPK-cU-sFu"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="152.67175572519082" y="1.0563380281690142"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="day_bg" width="20" height="20"/>
|
||||
<image name="lm_home_sign_jinbi" width="24" height="24"/>
|
||||
<image name="signin_bg_1" width="70" height="55"/>
|
||||
</resources>
|
||||
</document>
|
||||
20
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.h
Normal file
20
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// LMSignInAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSignInAlertView : UIView
|
||||
|
||||
@property (nonatomic, assign) NSInteger isHome;
|
||||
@property (nonatomic, strong) id response;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
136
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.m
Normal file
136
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.m
Normal file
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// LMSignInAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInAlertView.h"
|
||||
#import "LMSignInAlertCollectionViewCell.h"
|
||||
#import "LMSignInSuccessAlertView.h"
|
||||
|
||||
@interface LMSignInAlertView ()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmButton;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *signItemView;
|
||||
@property (nonatomic, assign) NSInteger today_sign; //1-已签到 2-未签到
|
||||
@property (nonatomic, assign) NSInteger sign_num; //已签到天数
|
||||
@property (nonatomic, strong) NSMutableArray *dataArr;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *signnumLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation LMSignInAlertView
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self setupUI];
|
||||
}
|
||||
|
||||
- (void)setIsHome:(NSInteger)isHome
|
||||
{
|
||||
_isHome = isHome;
|
||||
if (self.isHome){
|
||||
[self setupHomeResp];
|
||||
}else{
|
||||
[self requestSigninInfo];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupHomeResp
|
||||
{
|
||||
NSDictionary *data = [self.response safeDictionaryForKey:@"data"];
|
||||
self.sign_num = [data safeIntForKey:@"sign_num"];
|
||||
self.today_sign = [data safeIntForKey:@"today_sign"];
|
||||
self.signnumLabel.text = [NSString stringWithFormat:@"已累计签到%ld天",self.sign_num];
|
||||
self.dataArr = [LMSingListModel mj_objectArrayWithKeyValuesArray:[data safeArrayForKey:@"sign_log"]];
|
||||
[self.signItemView reloadData];
|
||||
if (self.today_sign == 1){
|
||||
self.confirmButton.selected = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupUI
|
||||
{
|
||||
UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc] init];
|
||||
flow.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
|
||||
self.signItemView.collectionViewLayout = flow;
|
||||
self.signItemView.delegate = self;
|
||||
self.signItemView.dataSource = self;
|
||||
[self.signItemView registerNib:[UINib nibWithNibName:@"LMSignInAlertCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:LMSignInAlertCollectionViewCellID];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)confirmButtonClick:(UIButton *)sender {
|
||||
if (self.today_sign == 1){
|
||||
return;
|
||||
}
|
||||
[BJHttpTool BJ_User_day_signParameters:@{} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
NSString *award = [data safeStringForKey:@"award"];
|
||||
|
||||
[self requestSigninInfo];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
LMSignInSuccessAlertView *suc = LoadNib(@"LMSignInSuccessAlertView");
|
||||
suc.frame = CGRectMake(0, 0, APPW, APPH);
|
||||
suc.sucTipLabel.text = [NSString stringWithFormat:@"签到成功 金币+%@",award];
|
||||
[MainWindow() addSubview:suc];
|
||||
[self removeFromSuperview];
|
||||
});
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)closeButtonClick:(UIButton *)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArr.count;
|
||||
}
|
||||
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LMSignInAlertCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:LMSignInAlertCollectionViewCellID forIndexPath:indexPath];
|
||||
if (indexPath.row < self.dataArr.count){
|
||||
LMSingListModel *model = self.dataArr[indexPath.row];
|
||||
cell.model = model;
|
||||
cell.index = indexPath.row;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.row < 6){
|
||||
return CGSizeMake((APPW-60-12*3)/4, 55);
|
||||
}else{
|
||||
return CGSizeMake((APPW-60-12*3)/2+15, 55);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestSigninInfo
|
||||
{
|
||||
[BJHttpTool BJ_User_day_sign_logParameters:@{} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
self.sign_num = [data safeIntForKey:@"sign_num"];
|
||||
self.today_sign = [data safeIntForKey:@"today_sign"];
|
||||
self.signnumLabel.text = [NSString stringWithFormat:@"已累计签到%ld天",self.sign_num];
|
||||
self.dataArr = [LMSingListModel mj_objectArrayWithKeyValuesArray:[data safeArrayForKey:@"sign_log"]];
|
||||
[self.signItemView reloadData];
|
||||
if (self.today_sign == 1){
|
||||
self.confirmButton.selected = YES;
|
||||
}
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
125
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.xib
Normal file
125
SweetParty/主类/狸猫新增/签到/LMSignInAlertView.xib
Normal file
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMSignInAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XQ0-CP-bYi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="g2K-ys-qT5"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_top" translatesAutoresizingMaskIntoConstraints="NO" id="Te7-gC-DKg">
|
||||
<rect key="frame" x="15" y="149" width="345" height="97"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="Te7-gC-DKg" secondAttribute="height" multiplier="345:97" id="DDa-7j-6dv"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m6y-UL-4rb">
|
||||
<rect key="frame" x="15" y="246" width="345" height="320"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_bg" translatesAutoresizingMaskIntoConstraints="NO" id="wd4-A8-kgM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_title" translatesAutoresizingMaskIntoConstraints="NO" id="8bc-kq-WzE">
|
||||
<rect key="frame" x="109.66666666666666" y="5.0000000000000018" width="125.66666666666666" height="24.666666666666671"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zmr-S6-a73">
|
||||
<rect key="frame" x="30" y="246" width="285" height="44"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="lm_home_sign_qiandao"/>
|
||||
<state key="selected" image="lm_home_sign_yiqiandao"/>
|
||||
<connections>
|
||||
<action selector="confirmButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="zUf-Mm-eMG"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="kFh-zK-3EC">
|
||||
<rect key="frame" x="15" y="90" width="315" height="140"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="140" id="BHi-kd-fno"/>
|
||||
</constraints>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="pC4-Es-LVt">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已累计签到0天" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0hv-5r-1s7">
|
||||
<rect key="frame" x="110" y="52" width="125" height="24"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.71372549019607845" blue="0.50980392156862742" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="KAU-oK-Hwn"/>
|
||||
<constraint firstAttribute="width" constant="125" id="b15-Pb-c5v"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="m6y-UL-4rb" secondAttribute="height" multiplier="345:320" id="6d9-T2-8sK"/>
|
||||
<constraint firstItem="zmr-S6-a73" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="FHV-mT-XDE"/>
|
||||
<constraint firstItem="wd4-A8-kgM" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" id="GV0-X8-aI5"/>
|
||||
<constraint firstItem="kFh-zK-3EC" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="90" id="TBE-4j-axr"/>
|
||||
<constraint firstItem="0hv-5r-1s7" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="52" id="XeV-r4-eqM"/>
|
||||
<constraint firstItem="8bc-kq-WzE" firstAttribute="top" secondItem="m6y-UL-4rb" secondAttribute="top" constant="5" id="bAB-rW-ZdT"/>
|
||||
<constraint firstItem="kFh-zK-3EC" firstAttribute="leading" secondItem="m6y-UL-4rb" secondAttribute="leading" constant="15" id="guU-mq-yXi"/>
|
||||
<constraint firstItem="0hv-5r-1s7" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="tSl-eg-C9Y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kFh-zK-3EC" secondAttribute="trailing" constant="15" id="uJ0-fD-omB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wd4-A8-kgM" secondAttribute="trailing" id="ube-c3-7Jw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="zmr-S6-a73" secondAttribute="bottom" constant="30" id="wfu-Zc-LNG"/>
|
||||
<constraint firstItem="wd4-A8-kgM" firstAttribute="leading" secondItem="m6y-UL-4rb" secondAttribute="leading" id="x5L-n9-6Ra"/>
|
||||
<constraint firstItem="8bc-kq-WzE" firstAttribute="centerX" secondItem="m6y-UL-4rb" secondAttribute="centerX" id="yTH-uh-ZtF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wd4-A8-kgM" secondAttribute="bottom" id="zVc-i0-2g8"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="trailing" secondItem="iN0-l3-epB" secondAttribute="trailing" id="1O6-wR-iER"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="trailing" secondItem="Te7-gC-DKg" secondAttribute="trailing" id="4Cd-MH-piK"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="6RK-kB-cwm"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ClO-Q9-jUY"/>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Nt7-4L-NgA"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="top" secondItem="Te7-gC-DKg" secondAttribute="bottom" id="fUm-EX-SCN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="m6y-UL-4rb" secondAttribute="trailing" constant="15" id="fdM-YI-daF"/>
|
||||
<constraint firstItem="m6y-UL-4rb" firstAttribute="leading" secondItem="Te7-gC-DKg" secondAttribute="leading" id="ki5-yT-G3S"/>
|
||||
<constraint firstItem="XQ0-CP-bYi" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="q8S-xB-HEX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="XQ0-CP-bYi" secondAttribute="bottom" id="qlf-Lb-sL4"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="confirmButton" destination="zmr-S6-a73" id="aE7-Ke-gkR"/>
|
||||
<outlet property="signItemView" destination="kFh-zK-3EC" id="PGe-xH-YI7"/>
|
||||
<outlet property="signnumLabel" destination="0hv-5r-1s7" id="7a6-Pt-UaP"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="144" y="73"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="lm_home_sign_bg" width="345" height="320"/>
|
||||
<image name="lm_home_sign_qiandao" width="285" height="44"/>
|
||||
<image name="lm_home_sign_yiqiandao" width="285" height="44"/>
|
||||
<image name="signin_title" width="125.5" height="24.5"/>
|
||||
<image name="signin_top" width="345" height="97"/>
|
||||
</resources>
|
||||
</document>
|
||||
18
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.h
Normal file
18
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// LMSignInSuccessAlertView.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSignInSuccessAlertView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *sucTipLabel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
16
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.m
Normal file
16
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// LMSignInSuccessAlertView.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/30.
|
||||
//
|
||||
|
||||
#import "LMSignInSuccessAlertView.h"
|
||||
|
||||
@implementation LMSignInSuccessAlertView
|
||||
|
||||
- (IBAction)closeButtonClick:(UIButton *)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
79
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.xib
Normal file
79
SweetParty/主类/狸猫新增/签到/LMSignInSuccessAlertView.xib
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="LMSignInSuccessAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Lfs-tC-OYq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="qIK-tu-cmp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dDH-qW-dBi">
|
||||
<rect key="frame" x="15" y="246" width="345" height="320"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lm_home_sign_suc_bg" translatesAutoresizingMaskIntoConstraints="NO" id="s1q-NR-wxy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sNc-uP-rMQ">
|
||||
<rect key="frame" x="30" y="246" width="285" height="44"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="lm_home_sign_suc_shouxia"/>
|
||||
<connections>
|
||||
<action selector="closeButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="sCm-fP-ost"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签到成功 金币+10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jsr-tD-4VT">
|
||||
<rect key="frame" x="107" y="195" width="131" height="19.333333333333343"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.71372549019607845" blue="0.50980392156862742" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="s1q-NR-wxy" firstAttribute="top" secondItem="dDH-qW-dBi" secondAttribute="top" id="OMz-gH-q0R"/>
|
||||
<constraint firstAttribute="trailing" secondItem="s1q-NR-wxy" secondAttribute="trailing" id="Ra5-mT-nvA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="s1q-NR-wxy" secondAttribute="bottom" id="TkV-RT-yKi"/>
|
||||
<constraint firstAttribute="width" secondItem="dDH-qW-dBi" secondAttribute="height" multiplier="345:320" id="Zep-be-WVB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="sNc-uP-rMQ" secondAttribute="bottom" constant="30" id="foM-6D-oNn"/>
|
||||
<constraint firstItem="s1q-NR-wxy" firstAttribute="leading" secondItem="dDH-qW-dBi" secondAttribute="leading" id="foy-Kj-epK"/>
|
||||
<constraint firstItem="sNc-uP-rMQ" firstAttribute="centerX" secondItem="dDH-qW-dBi" secondAttribute="centerX" id="i8S-TK-gyH"/>
|
||||
<constraint firstItem="Jsr-tD-4VT" firstAttribute="top" secondItem="dDH-qW-dBi" secondAttribute="top" constant="195" id="lJp-TZ-Jsq"/>
|
||||
<constraint firstItem="Jsr-tD-4VT" firstAttribute="centerX" secondItem="dDH-qW-dBi" secondAttribute="centerX" id="rCU-n6-bzK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Lfs-tC-OYq" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="8cg-VF-oS4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lfs-tC-OYq" secondAttribute="trailing" id="D4X-wd-eyN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lfs-tC-OYq" secondAttribute="bottom" id="IK1-Kj-D79"/>
|
||||
<constraint firstItem="dDH-qW-dBi" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="ZD7-co-u7Z"/>
|
||||
<constraint firstItem="Lfs-tC-OYq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="dcG-I8-Urw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dDH-qW-dBi" secondAttribute="trailing" constant="15" id="gTf-J0-hue"/>
|
||||
<constraint firstItem="dDH-qW-dBi" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="q7e-bo-vz4"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="sucTipLabel" destination="Jsr-tD-4VT" id="uqS-JI-CSW"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="130.53435114503816" y="-11.267605633802818"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="lm_home_sign_suc_bg" width="345" height="320"/>
|
||||
<image name="lm_home_sign_suc_shouxia" width="285" height="44"/>
|
||||
</resources>
|
||||
</document>
|
||||
19
SweetParty/主类/狸猫新增/签到/LMSingListModel.h
Normal file
19
SweetParty/主类/狸猫新增/签到/LMSingListModel.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// LMSingListModel.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/31.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface LMSingListModel : NSObject
|
||||
|
||||
@property (nonatomic, assign) NSInteger is_sign;
|
||||
@property (nonatomic, strong) NSString *award;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
12
SweetParty/主类/狸猫新增/签到/LMSingListModel.m
Normal file
12
SweetParty/主类/狸猫新增/签到/LMSingListModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// LMSingListModel.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by Xmac on 2024/8/31.
|
||||
//
|
||||
|
||||
#import "LMSingListModel.h"
|
||||
|
||||
@implementation LMSingListModel
|
||||
|
||||
@end
|
||||
24
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.h
Normal file
24
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// YYXQInviteAlert.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/7/12.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYXQInviteAlert : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *agreeBtn;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary *dataDict;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
83
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.m
Normal file
83
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.m
Normal file
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// YYXQInviteAlert.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/7/12.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YYXQInviteAlert.h"
|
||||
#import "ZWTimer.h"
|
||||
|
||||
@interface YYXQInviteAlert () <ZWTimerDelegate>
|
||||
|
||||
@property (nonatomic, strong) ZWTimer *timer;
|
||||
@property (nonatomic, assign) NSInteger leftSecond;
|
||||
@property (weak, nonatomic) IBOutlet UIView *containerView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYXQInviteAlert
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
self.containerView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 200) direction:FXGradientChangeDirectionVertical startColor:HEXCOLOR(0xDFFFF6) endColor:HEXCOLOR(0xFFFFFF)];
|
||||
[self.agreeBtn styleGradiBlueColor];
|
||||
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setDataDict:(NSDictionary *)dataDict {
|
||||
_dataDict = dataDict;
|
||||
|
||||
self.titleLab.text = [NSString stringWithFormat:@"主持人邀请您上台%@分钟,是否同意?", dataDict[@"time"]];
|
||||
|
||||
self.leftSecond = 10;
|
||||
[self.timer startGCDTimer:1 delegate:self];
|
||||
}
|
||||
|
||||
- (IBAction)onRefuse:(id)sender {
|
||||
[self onRequestWith:NO];
|
||||
}
|
||||
|
||||
- (IBAction)onAgree:(id)sender {
|
||||
[self onRequestWith:YES];
|
||||
}
|
||||
|
||||
- (void)onRequestWith:(BOOL)isAgree {
|
||||
[self.timer stopTimer];
|
||||
|
||||
NSDictionary *params = @{@"rid":[self.dataDict safeStringForKey:@"rid"], @"id":[self.dataDict safeStringForKey:@"id"], @"micro_id":[self.dataDict safeStringForKey:@"micro_id"], @"type":isAgree?@"1":@"2"};
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/room/operate_room_owner_up_micro" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
[self removeFromSuperview];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)onTimerFired:(ZWTimer *)timer {
|
||||
self.timeLab.text = [NSString stringWithFormat:@"(%ld秒后自动拒绝)", self.leftSecond];
|
||||
|
||||
self.leftSecond -= 1;
|
||||
if (self.leftSecond < 0) {
|
||||
[self.timer stopTimer];
|
||||
[self onRefuse:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (ZWTimer *)timer {
|
||||
if (!_timer) {
|
||||
_timer = [[ZWTimer alloc] init];
|
||||
}
|
||||
return _timer;
|
||||
}
|
||||
|
||||
@end
|
||||
138
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.xib
Normal file
138
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQInviteAlert.xib
Normal file
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYXQInviteAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Tg5-mr-M63">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e3c-c8-hjW">
|
||||
<rect key="frame" x="15" y="265.5" width="345" height="200"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="applyUp_gift_bg" translatesAutoresizingMaskIntoConstraints="NO" id="b6l-4x-bOA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="200"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="提示" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OKo-D1-veG">
|
||||
<rect key="frame" x="154" y="15" width="37" height="21.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bRc-Zq-7P8">
|
||||
<rect key="frame" x="190" y="136" width="125" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="NpV-5g-AG1"/>
|
||||
<constraint firstAttribute="width" constant="125" id="zBx-Vi-Grb"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="同意">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onAgree:" destination="iN0-l3-epB" eventType="touchUpInside" id="7sT-b2-dhf"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3S0-Z7-bmg">
|
||||
<rect key="frame" x="30" y="136" width="125" height="44"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="UDJ-IE-fUF"/>
|
||||
<constraint firstAttribute="width" constant="125" id="uT6-BF-HqR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="拒绝">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.63137254901960782" green="0.29803921568627451" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onRefuse:" destination="iN0-l3-epB" eventType="touchUpInside" id="FzN-Ch-PDe"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="主持人邀请您上台5分钟,是否同意?" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AJM-cI-utn">
|
||||
<rect key="frame" x="45" y="54.5" width="255" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" red="0.23921568627450979" green="0.23921568627450979" blue="0.23921568627450979" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(10秒后自动拒绝)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D3K-Ck-JIC">
|
||||
<rect key="frame" x="116.5" y="82.5" width="112" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="200" id="FQK-QB-MuB"/>
|
||||
<constraint firstItem="AJM-cI-utn" firstAttribute="centerX" secondItem="e3c-c8-hjW" secondAttribute="centerX" id="K30-Nl-RUg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bRc-Zq-7P8" secondAttribute="trailing" constant="30" id="Ks2-Kv-Gbf"/>
|
||||
<constraint firstItem="D3K-Ck-JIC" firstAttribute="centerX" secondItem="e3c-c8-hjW" secondAttribute="centerX" id="XnP-0z-7wl"/>
|
||||
<constraint firstAttribute="bottom" secondItem="b6l-4x-bOA" secondAttribute="bottom" id="Y3Z-lK-Tpm"/>
|
||||
<constraint firstItem="b6l-4x-bOA" firstAttribute="leading" secondItem="e3c-c8-hjW" secondAttribute="leading" id="cs3-4k-nXx"/>
|
||||
<constraint firstAttribute="trailing" secondItem="b6l-4x-bOA" secondAttribute="trailing" id="dGn-Yz-fB3"/>
|
||||
<constraint firstItem="D3K-Ck-JIC" firstAttribute="top" secondItem="AJM-cI-utn" secondAttribute="bottom" constant="10" id="eVM-5T-goQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bRc-Zq-7P8" secondAttribute="bottom" constant="20" id="hCB-89-ct1"/>
|
||||
<constraint firstItem="OKo-D1-veG" firstAttribute="top" secondItem="e3c-c8-hjW" secondAttribute="top" constant="15" id="k9y-J3-zwD"/>
|
||||
<constraint firstItem="b6l-4x-bOA" firstAttribute="top" secondItem="e3c-c8-hjW" secondAttribute="top" id="lk6-aX-NHR"/>
|
||||
<constraint firstItem="3S0-Z7-bmg" firstAttribute="leading" secondItem="e3c-c8-hjW" secondAttribute="leading" constant="30" id="smw-ac-3qR"/>
|
||||
<constraint firstItem="AJM-cI-utn" firstAttribute="top" secondItem="OKo-D1-veG" secondAttribute="bottom" constant="18" id="tVw-X2-Nj9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3S0-Z7-bmg" secondAttribute="bottom" constant="20" id="vdS-di-IAt"/>
|
||||
<constraint firstItem="OKo-D1-veG" firstAttribute="centerX" secondItem="e3c-c8-hjW" secondAttribute="centerX" id="x4a-8A-6j8"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Tg5-mr-M63" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Ajp-Bi-NrC"/>
|
||||
<constraint firstItem="Tg5-mr-M63" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="C1U-cI-Wga"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Tg5-mr-M63" secondAttribute="bottom" id="edO-pm-1fM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="e3c-c8-hjW" secondAttribute="trailing" constant="15" id="phH-ga-80f"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Tg5-mr-M63" secondAttribute="trailing" id="tQS-q4-FdB"/>
|
||||
<constraint firstItem="e3c-c8-hjW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="uGX-78-j8U"/>
|
||||
<constraint firstItem="e3c-c8-hjW" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" multiplier="0.9" id="wdE-Wj-Ndc"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="agreeBtn" destination="bRc-Zq-7P8" id="c1T-VA-gR3"/>
|
||||
<outlet property="containerView" destination="e3c-c8-hjW" id="skg-BU-wkP"/>
|
||||
<outlet property="timeLab" destination="D3K-Ck-JIC" id="EeV-NE-oFZ"/>
|
||||
<outlet property="titleLab" destination="AJM-cI-utn" id="lUs-NH-GkF"/>
|
||||
<outlet property="touchImgV" destination="Tg5-mr-M63" id="rZP-D8-cyf"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="122" y="58"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="applyUp_gift_bg" width="375" height="445"/>
|
||||
</resources>
|
||||
</document>
|
||||
23
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.h
Normal file
23
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// YYXQPickGiftAlert.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/7/12.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYXQPickGiftAlert : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;
|
||||
|
||||
- (void)onShowWith:(NSString *)rid micro_id:(NSString *)micro_id;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
121
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.m
Normal file
121
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.m
Normal file
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// YYXQPickGiftAlert.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/7/12.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "YYXQPickGiftAlert.h"
|
||||
#import "BJGiftItemCell.h"
|
||||
#import "BJRoomGiftModel.h"
|
||||
|
||||
@interface YYXQPickGiftAlert ()<UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
|
||||
@property (nonatomic, strong) NSArray *dataArray;
|
||||
@property (nonatomic, assign) NSInteger selectedIndex;
|
||||
|
||||
@property (nonatomic, copy) NSString *rid;
|
||||
@property (nonatomic, copy) NSString *micro_id;
|
||||
|
||||
@end
|
||||
|
||||
@implementation YYXQPickGiftAlert
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
self.selectedIndex = -1;
|
||||
|
||||
[self createUI];
|
||||
|
||||
[self fetchGiftData];
|
||||
}
|
||||
|
||||
- (void)fetchGiftData {
|
||||
NSDictionary *params = @{@"page":@"1", @"page_limit":@"1000"};
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/pub_room/get_wish_gift_list" Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
|
||||
NSArray *arr = [BJRoomGiftModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"]];
|
||||
self.dataArray = arr;
|
||||
[self.collectionView reloadData];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
[self.confirmBtn setJianBianWithCGSize:CGSizeMake(ScreenWidth-30*2, 44)];
|
||||
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
CGFloat itemW = (ScreenWidth-15*2-15*2)/3;
|
||||
layout.itemSize = CGSizeMake(itemW, 126);
|
||||
layout.minimumInteritemSpacing = 15;
|
||||
layout.minimumLineSpacing = 15;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
|
||||
_collectionView.collectionViewLayout = layout;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
[_collectionView registerClass:[BJGiftItemCell class] forCellWithReuseIdentifier:@"BJGiftItemCell"];
|
||||
_collectionView.showsHorizontalScrollIndicator = NO;
|
||||
_collectionView.pagingEnabled = YES;
|
||||
_collectionView.multipleTouchEnabled = NO;
|
||||
}
|
||||
|
||||
- (void)onShowWith:(NSString *)rid micro_id:(NSString *)micro_id {
|
||||
self.rid = rid;
|
||||
self.micro_id = micro_id;
|
||||
[MainWindow() addSubview:self];
|
||||
}
|
||||
|
||||
- (IBAction)onConfirm:(id)sender {
|
||||
if (self.selectedIndex == -1) {
|
||||
[HelpPageDefine showMessage:@"请选择礼物"];
|
||||
return;
|
||||
}
|
||||
BJRoomGiftModel *model = self.dataArray[self.selectedIndex];
|
||||
NSDictionary *params = @{@"rid":C_string(self.rid), @"micro_id":C_string(self.micro_id), @"gid":model.gid};
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/pub_room/oprate_user_wish_gift" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
[self removeFromSuperview];
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate && UICollectionViewDataSource
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
|
||||
{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
BJGiftItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"BJGiftItemCell" forIndexPath:indexPath];
|
||||
BJRoomGiftModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
BJRoomGiftModel *model = self.dataArray[indexPath.row];
|
||||
self.selectedIndex = indexPath.row;
|
||||
for (BJRoomGiftModel *model in self.dataArray) {
|
||||
model.isItemSelected = NO;
|
||||
}
|
||||
model.isItemSelected = YES;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
@end
|
||||
103
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.xib
Normal file
103
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickGiftAlert.xib
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="YYXQPickGiftAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Tg5-mr-M63">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e3c-c8-hjW">
|
||||
<rect key="frame" x="0.0" y="367" width="375" height="445"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="AQV-yS-ey1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="445"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择专属心愿礼物" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OKo-D1-veG">
|
||||
<rect key="frame" x="114" y="15" width="147" height="21.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bRc-Zq-7P8">
|
||||
<rect key="frame" x="30" y="361" width="315" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="C1g-zl-vDP"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="确定">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onConfirm:" destination="iN0-l3-epB" eventType="touchUpInside" id="khQ-Ik-8fQ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="5IG-xR-ASk">
|
||||
<rect key="frame" x="0.0" y="55" width="375" height="286"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="FiI-zu-2w6">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="5IG-xR-ASk" firstAttribute="leading" secondItem="e3c-c8-hjW" secondAttribute="leading" id="41G-2z-bMB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bRc-Zq-7P8" secondAttribute="trailing" constant="30" id="4HR-nJ-CBr"/>
|
||||
<constraint firstAttribute="height" constant="445" id="FQK-QB-MuB"/>
|
||||
<constraint firstItem="AQV-yS-ey1" firstAttribute="leading" secondItem="e3c-c8-hjW" secondAttribute="leading" id="LzL-OB-bNC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AQV-yS-ey1" secondAttribute="trailing" id="ZuH-RL-COy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bRc-Zq-7P8" secondAttribute="bottom" constant="40" id="aRn-R0-XsJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="AQV-yS-ey1" secondAttribute="bottom" id="bN6-eJ-xah"/>
|
||||
<constraint firstItem="5IG-xR-ASk" firstAttribute="top" secondItem="e3c-c8-hjW" secondAttribute="top" constant="55" id="hD8-cb-wfA"/>
|
||||
<constraint firstItem="AQV-yS-ey1" firstAttribute="top" secondItem="e3c-c8-hjW" secondAttribute="top" id="jaw-Hr-vhY"/>
|
||||
<constraint firstItem="OKo-D1-veG" firstAttribute="top" secondItem="e3c-c8-hjW" secondAttribute="top" constant="15" id="k9y-J3-zwD"/>
|
||||
<constraint firstItem="bRc-Zq-7P8" firstAttribute="top" secondItem="5IG-xR-ASk" secondAttribute="bottom" constant="20" id="o6g-mL-e0O"/>
|
||||
<constraint firstItem="bRc-Zq-7P8" firstAttribute="leading" secondItem="e3c-c8-hjW" secondAttribute="leading" constant="30" id="onJ-JO-9Zf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5IG-xR-ASk" secondAttribute="trailing" id="vWj-dv-cyO"/>
|
||||
<constraint firstItem="OKo-D1-veG" firstAttribute="centerX" secondItem="e3c-c8-hjW" secondAttribute="centerX" id="x4a-8A-6j8"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="e3c-c8-hjW" secondAttribute="bottom" id="4EO-5X-MPB"/>
|
||||
<constraint firstItem="Tg5-mr-M63" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Ajp-Bi-NrC"/>
|
||||
<constraint firstItem="Tg5-mr-M63" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="C1U-cI-Wga"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Tg5-mr-M63" secondAttribute="bottom" id="edO-pm-1fM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="e3c-c8-hjW" secondAttribute="trailing" id="phH-ga-80f"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Tg5-mr-M63" secondAttribute="trailing" id="tQS-q4-FdB"/>
|
||||
<constraint firstItem="e3c-c8-hjW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="uGX-78-j8U"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="collectionView" destination="5IG-xR-ASk" id="zVV-hw-brb"/>
|
||||
<outlet property="confirmBtn" destination="bRc-Zq-7P8" id="EHY-bQ-Ajz"/>
|
||||
<outlet property="touchImgV" destination="Tg5-mr-M63" id="rZP-D8-cyf"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="131.8840579710145" y="95.758928571428569"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="common_alert_bg" width="375" height="358"/>
|
||||
</resources>
|
||||
</document>
|
||||
25
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickTimeAlert.h
Normal file
25
SweetParty/主类/狸猫新增/酒吧相亲厅/YYXQPickTimeAlert.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// YYXQPickTimeAlert.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/7/12.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YYXQPickTimeAlert : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *timeBtn_1;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *timeBtn_2;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *agreeBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *timeBtn_3;
|
||||
|
||||
@property (nonatomic, copy) void(^onConfirmBlock)(NSString *time);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user