Compare commits
13 Commits
feature/1.
...
develop_pi
Author | SHA1 | Date | |
---|---|---|---|
![]() |
375d9e38e7 | ||
![]() |
39d5c1c320 | ||
![]() |
6a5f5b3001 | ||
![]() |
b990f01a6e | ||
![]() |
98cedafaae | ||
![]() |
21eac2aceb | ||
![]() |
79fcdb859a | ||
![]() |
9198548b06 | ||
![]() |
bf113af79c | ||
![]() |
259ce7a18a | ||
![]() |
7e678da77d | ||
![]() |
1012ca0f5b | ||
![]() |
0732e4c46f |
@@ -290,7 +290,6 @@
|
||||
237852A12C072D8D00E360AC /* MSRoomGameModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237852A02C072D8D00E360AC /* MSRoomGameModel.m */; };
|
||||
237852A42C082A9800E360AC /* MSRoomGameSendTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237852A32C082A9800E360AC /* MSRoomGameSendTextView.m */; };
|
||||
237852A72C08764B00E360AC /* MSRoomGameResultsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237852A62C08764B00E360AC /* MSRoomGameResultsModel.m */; };
|
||||
237852AA2C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237852A92C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m */; };
|
||||
237B94BC2A984DA7007853E3 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */; };
|
||||
237B94BD2A984DA7007853E3 /* XPNobleTrumpetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B32A984DA7007853E3 /* XPNobleTrumpetModel.m */; };
|
||||
237B94BE2A984DA7007853E3 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B72A984DA7007853E3 /* XPRoomTrumpetViewController.m */; };
|
||||
@@ -2116,8 +2115,6 @@
|
||||
237852A32C082A9800E360AC /* MSRoomGameSendTextView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameSendTextView.m; sourceTree = "<group>"; };
|
||||
237852A52C08764B00E360AC /* MSRoomGameResultsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSRoomGameResultsModel.h; sourceTree = "<group>"; };
|
||||
237852A62C08764B00E360AC /* MSRoomGameResultsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSRoomGameResultsModel.m; sourceTree = "<group>"; };
|
||||
237852A82C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MsRoomMessagChatHallHeadView.h; sourceTree = "<group>"; };
|
||||
237852A92C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MsRoomMessagChatHallHeadView.m; sourceTree = "<group>"; };
|
||||
237B94AD2A984DA7007853E3 /* XPTrumpetPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPTrumpetPresenter.h; sourceTree = "<group>"; };
|
||||
237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = "<group>"; };
|
||||
237B94B02A984DA7007853E3 /* XPRoomTrumpetProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetProtocol.h; sourceTree = "<group>"; };
|
||||
@@ -10188,8 +10185,6 @@
|
||||
E8AEAEF227141C7C0017FCE0 /* XPRoomMessageContainerView.m */,
|
||||
235714932BEDF517004C81D6 /* MsRoomMessagChatHallView.h */,
|
||||
235714942BEDF517004C81D6 /* MsRoomMessagChatHallView.m */,
|
||||
237852A82C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.h */,
|
||||
237852A92C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m */,
|
||||
);
|
||||
path = MessageContainerView;
|
||||
sourceTree = "<group>";
|
||||
@@ -11833,7 +11828,6 @@
|
||||
237700FA2BCCD25500D661F1 /* YYLabel+MSRTL.m in Sources */,
|
||||
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
|
||||
E8F6135C291E26BD00E12650 /* NSMutableDictionary+Saft.m in Sources */,
|
||||
237852AA2C0D98BF00E360AC /* MsRoomMessagChatHallHeadView.m in Sources */,
|
||||
239D0F992BFB43BC002977CE /* MSRoomOnLineAvatarView.m in Sources */,
|
||||
1427213429A75A2600C7C423 /* XPMonentsLatestPresenter.m in Sources */,
|
||||
E83ABEFD280EB5E200322EE4 /* ContentOpenLiveInfoModel.m in Sources */,
|
||||
@@ -12770,7 +12764,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.23;
|
||||
MARKETING_VERSION = 20.20.22;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -12808,7 +12802,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 20.20.23;
|
||||
MARKETING_VERSION = 20.20.22;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 60 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_button@2x.png",
|
||||
"filename" : "ms_room_game_underwa_coin_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_button@3x.png",
|
||||
"filename" : "ms_room_game_underwa_coin_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 696 B |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_victory_border_first@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_victory_border_first@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 17 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_switch_button@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_game_switch_button@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_message_chat_hall_head_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_room_message_chat_hall_head_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 13 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "exchange_diamonds_icon@2x.png",
|
||||
"filename" : "exchange_diamonds_arrow@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "exchange_diamonds_icon@3x.png",
|
||||
"filename" : "exchange_diamonds_arrow@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/IncomeRecord/exchange_diamonds_arrow.imageset/exchange_diamonds_arrow@2x.png
vendored
Normal file
After Width: | Height: | Size: 505 B |
BIN
YuMi/Assets.xcassets/jm/IncomeRecord/exchange_diamonds_arrow.imageset/exchange_diamonds_arrow@3x.png
vendored
Normal file
After Width: | Height: | Size: 730 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 277 B After Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 283 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 84 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_coin_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_coin_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.8 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_diamonds_coin_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_diamonds_coin_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.6 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_diamonds_diamonds_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_exchange_diamonds_diamonds_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 7.2 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_income_record_coin@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_income_record_coin@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 8.5 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_income_recorddiamond@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_income_recorddiamond@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 7.0 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_coin_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_coin_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 54 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_diamond_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_diamond_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 652 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_top_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_top_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_purse_arrow@2x.png",
|
||||
"filename" : "mine_recharge_balance_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_purse_arrow@3x.png",
|
||||
"filename" : "mine_recharge_balance_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/mine_recharge_balance_bg.imageset/mine_recharge_balance_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 897 B |
BIN
YuMi/Assets.xcassets/jm/mine_recharge_balance_bg.imageset/mine_recharge_balance_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_recharge_coin@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "ms_mine_recharge_coin@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 804 B |
@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
|
||||
|
||||
///内置版本号
|
||||
#define PI_App_Version @"1.0.8"
|
||||
#define PI_App_Version @"1.0.7"
|
||||
///渠道
|
||||
#define PI_App_Source @"appstore"
|
||||
#define PI_Test_Flight @"TestFlight"
|
||||
|
@@ -191,7 +191,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
make.width.mas_offset(kGetScaleWidth(162));
|
||||
make.height.mas_equalTo(kGetScaleWidth(32));
|
||||
make.centerX.equalTo(self.view);
|
||||
make.top.equalTo(self.bgImageView.mas_bottom).mas_offset(kGetScaleWidth(-15));
|
||||
make.top.equalTo(self.bgImageView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
}];
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [[UIImageView alloc]init];
|
||||
_bgImageView.image = kImage(@"pi_app_login_new_bg");
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_bgImageView.contentMode = 2;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
@@ -125,8 +125,7 @@
|
||||
[[self getView] onGetLittleGameListSuccess:array ];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] onGetLittleGameListFail];
|
||||
} errorToast:NO]
|
||||
roomUid:uid];
|
||||
} errorToast:NO]];
|
||||
}
|
||||
///快速匹配小游戏房
|
||||
/// @param mgId 游戏ID
|
||||
|
@@ -14,7 +14,8 @@
|
||||
@property (nonatomic,strong) UILabel *titleView;
|
||||
///我的房间
|
||||
@property (nonatomic,strong) XPMinePersonalCenterItemView *myRoomView;
|
||||
|
||||
///收益记录
|
||||
@property (nonatomic,strong) XPMinePersonalCenterItemView *earningsRecordView;
|
||||
///赠送钻石
|
||||
@property (nonatomic,strong) XPMinePersonalCenterItemView *giveDiamondView;
|
||||
|
||||
@@ -39,7 +40,7 @@
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.bgView addSubview:self.titleView];
|
||||
[self.bgView addSubview:self.myRoomView];
|
||||
|
||||
[self.bgView addSubview:self.earningsRecordView];
|
||||
[self.bgView addSubview:self.giveDiamondView];
|
||||
self.giveDiamondView.hidden = YES;
|
||||
}
|
||||
@@ -60,20 +61,42 @@
|
||||
make.height.equalTo(@38);
|
||||
make.top.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.earningsRecordView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.height.width.equalTo(self.myRoomView);
|
||||
make.trailing.mas_equalTo(-35);
|
||||
}];
|
||||
[self.giveDiamondView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.height.width.equalTo(self.myRoomView);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(35));
|
||||
make.trailing.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
-(void)setIsHaveGiveDiamond:(BOOL)isHaveGiveDiamond{
|
||||
_isHaveGiveDiamond = isHaveGiveDiamond;
|
||||
self.myRoomView.isHaveGiveDiamond = _isHaveGiveDiamond;
|
||||
self.earningsRecordView.isHaveGiveDiamond = _isHaveGiveDiamond;
|
||||
self.giveDiamondView.isHaveGiveDiamond = _isHaveGiveDiamond;
|
||||
self.giveDiamondView.hidden = !_isHaveGiveDiamond;
|
||||
|
||||
|
||||
|
||||
CGFloat width = (KScreenWidth - 30) / 3;
|
||||
if(_isHaveGiveDiamond == YES){
|
||||
self.giveDiamondView.hidden = NO;
|
||||
[self.myRoomView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(0);
|
||||
make.width.mas_greaterThanOrEqualTo(width);
|
||||
make.height.equalTo(@68);
|
||||
}];
|
||||
[self.earningsRecordView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-width);
|
||||
}];
|
||||
return;
|
||||
}
|
||||
self.giveDiamondView.hidden = YES;
|
||||
[self.myRoomView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(35);
|
||||
make.width.mas_greaterThanOrEqualTo(104);
|
||||
make.height.equalTo(@38);
|
||||
}];
|
||||
[self.earningsRecordView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-35);
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)clickMyRoomAction{
|
||||
@@ -121,7 +144,16 @@
|
||||
}
|
||||
return _myRoomView;
|
||||
}
|
||||
|
||||
-(XPMinePersonalCenterItemView *)earningsRecordView{
|
||||
if(!_earningsRecordView){
|
||||
_earningsRecordView = [[XPMinePersonalCenterItemView alloc]initWithFrame:CGRectZero];
|
||||
[_earningsRecordView setTitle:YMLocalizedString(@"XPMinePersonalCenterCell2")];
|
||||
[_earningsRecordView setImage:@"mine_earnings_record"];
|
||||
UITapGestureRecognizer *earningsRecordTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickEarningsRecordAction)];
|
||||
[_earningsRecordView addGestureRecognizer:earningsRecordTap];
|
||||
}
|
||||
return _earningsRecordView;
|
||||
}
|
||||
- (XPMinePersonalCenterItemView *)giveDiamondView{
|
||||
if (!_giveDiamondView){
|
||||
_giveDiamondView = [[XPMinePersonalCenterItemView alloc]initWithFrame:CGRectZero];
|
||||
|
@@ -40,15 +40,10 @@
|
||||
|
||||
}
|
||||
-(void)getExchangeDiamondInformation{
|
||||
@kWeakify(self);
|
||||
[Api getExchangeDiamondInformation:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
XPExchangeDiamondsModel *model = [XPExchangeDiamondsModel modelWithDictionary:data.data];
|
||||
XPExchangeDiamondsModel *tempModel = [XPExchangeDiamondsModel modelWithDictionary:data.data];
|
||||
model.golds = tempModel.diamonds;
|
||||
model.diamonds = tempModel.golds;
|
||||
[[self getView] getExchangeDiamondInformation:model];
|
||||
} showLoading:YES]];
|
||||
[[self getView]getExchangeDiamondInformation:model];
|
||||
} showLoading:YES]];
|
||||
}
|
||||
-(void)confirmExchangeDiamondWithGoldNum:(NSString *)goldNum diamondNum:(NSString *)diamondNum currency:(NSString *)currency{
|
||||
[Api confirmExchangeDiamond:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
@protocol XPExchangeDiamondsVCDelegate <NSObject>
|
||||
|
||||
-(void)confirmExchangeDiamondsWithDiamondSuccess:(NSString *_Nullable)diamond gold:(NSString *_Nonnull)gold;
|
||||
-(void)confirmExchangeDiamondsWithDiamondSuccess:(NSString *)diamond gold:(NSString *)gold;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -23,11 +23,6 @@
|
||||
@property (nonatomic,strong) XPExchangeDiamondsView *exchangeView;
|
||||
@property (nonatomic,copy) NSString *diamond;
|
||||
@property (nonatomic,copy) NSString *gold;
|
||||
@property(nonatomic,strong) UIImageView *bgImageView;
|
||||
/// 返回
|
||||
@property (nonatomic,strong) UIButton *backBtn;
|
||||
/// 标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPExchangeDiamondsVC
|
||||
@@ -68,7 +63,7 @@
|
||||
[self.presenter confirmExchangeDiamondWithGoldNum:self.gold diamondNum:self.diamond currency:@"1"];
|
||||
}
|
||||
#pragma mark - XPExchangeDiamondsViewDelegate
|
||||
-(void)confirmExchangeDiamondsWithDiamond:(NSString *)diamond gold:(NSString *)gold{
|
||||
-(void)confirmExchangeDiamondsWithDiamond:(NSString *)diamond gold:(NSString *)gold currency:(NSString *)currency{
|
||||
self.diamond = diamond;
|
||||
self.gold = [NSString stringWithFormat:@"%.0f",ceilf(diamond.doubleValue / self.model.rate)];
|
||||
XPMineConfirmGiveDiamondView *confirmView = [[XPMineConfirmGiveDiamondView alloc]initWithFrame:CGRectZero];
|
||||
@@ -78,42 +73,18 @@
|
||||
confirmView.delegate = self;
|
||||
[TTPopup popupView:confirmView style:TTPopupStyleAlert];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = YMLocalizedString(@"XPExchangeDiamondsView0");
|
||||
[self.view addSubview:self.bgImageView];
|
||||
[self.view addSubview:self.backBtn];
|
||||
[self.view addSubview:self.titleLabel];
|
||||
[self.view addSubview:self.exchangeView];
|
||||
|
||||
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.equalTo(self.view);
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kStatusBarHeight);
|
||||
make.height.mas_equalTo(44);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(0);
|
||||
make.top.mas_equalTo(kStatusBarHeight);
|
||||
make.width.height.mas_equalTo(44);
|
||||
}];
|
||||
[self.exchangeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.equalTo(self.view);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).mas_offset(kGetScaleWidth(48));
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
/// 返回
|
||||
- (void)backBtnAction {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
#pragma mark -懒加载
|
||||
- (XPExchangeDiamondsView *)exchangeView{
|
||||
if (!_exchangeView){
|
||||
@@ -122,31 +93,6 @@
|
||||
}
|
||||
return _exchangeView;
|
||||
}
|
||||
- (UIImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [UIImageView new];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
_bgImageView.image = kImage(@"ms_mine_diamond_bg");
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
- (UIButton *)backBtn {
|
||||
if (!_backBtn) {
|
||||
_backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backBtn setImage:[[UIImage imageNamed:@"room_info_back"]ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _backBtn;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = YMLocalizedString(@"XPIncomeRecordVC1");
|
||||
_titleLabel.textColor = UIColor.blackColor;
|
||||
_titleLabel.font = kFontBold(16);
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPExchangeDiamondsViewDelegate <NSObject>
|
||||
|
||||
-(void)confirmExchangeDiamondsWithDiamond:(NSString *)diamond gold:(NSString *)gold ;
|
||||
-(void)confirmExchangeDiamondsWithDiamond:(NSString *)diamond gold:(NSString *)gold currency:(NSString *)currency;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
///钻石数
|
||||
@property (nonatomic,copy) NSString *diamondNum;
|
||||
@property (nonatomic,assign) IncomeRecordViewType chooseType;
|
||||
|
||||
@end
|
||||
@implementation XPExchangeDiamondsView
|
||||
|
||||
@@ -36,12 +35,12 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
[self addSubview:self.myGoldView];
|
||||
[self addSubview:self.myDiamondsView];
|
||||
[self addSubview:self.confirmBtn];
|
||||
|
||||
@kWeakify(self)
|
||||
|
||||
|
||||
@kWeakify(self)
|
||||
self.myGoldView.inputCounthandle = ^(NSString *_Nonnull goldNum,NSString *_Nonnull diamondNum) {
|
||||
@kStrongify(self)
|
||||
if(goldNum.integerValue == 0 && diamondNum.integerValue == 0){
|
||||
@@ -77,27 +76,22 @@
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.myDiamondsView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(0));
|
||||
[self.myGoldView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(15));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.height.mas_equalTo(kGetScaleWidth(72));
|
||||
make.height.mas_equalTo(kGetScaleWidth(116));
|
||||
}];
|
||||
[self.myGoldView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.width.height.equalTo(self.myDiamondsView);
|
||||
make.top.equalTo(self.myDiamondsView.mas_bottom).mas_offset(kGetScaleWidth(28));
|
||||
[self.myDiamondsView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.height.equalTo(self.myGoldView);
|
||||
make.top.equalTo(self.myGoldView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.myGoldView.mas_bottom).mas_offset(kGetScaleWidth(33));
|
||||
make.width.mas_equalTo(kGetScaleWidth(303));
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
make.top.mas_equalTo(kGetScaleWidth(296));
|
||||
make.width.mas_equalTo(kGetScaleWidth(345));
|
||||
make.height.mas_equalTo(kGetScaleWidth(46));
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
}
|
||||
/// 返回
|
||||
- (void)backBtnAction {
|
||||
|
||||
}
|
||||
-(void)setModel:(XPExchangeDiamondsModel *)model{
|
||||
_model = model;
|
||||
@@ -105,7 +99,7 @@
|
||||
_myDiamondsView.model = _model;
|
||||
}
|
||||
-(void)confirmAction{
|
||||
if( self.model.diamonds < self.diamondNum.doubleValue){
|
||||
if( self.model.golds < self.goldNum.doubleValue){
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPExchangeDiamondsView2")];
|
||||
return;
|
||||
}
|
||||
@@ -115,20 +109,19 @@
|
||||
}
|
||||
if(self.diamondNum.doubleValue > self.model.maxDiamonds){
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:[NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsView4"),self.model.maxDiamonds]];
|
||||
return;
|
||||
return;
|
||||
}
|
||||
[self.myGoldView resignResponder];
|
||||
[self.myDiamondsView resignResponder];
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(confirmExchangeDiamondsWithDiamond:gold:)]){
|
||||
[self.delegate confirmExchangeDiamondsWithDiamond:self.diamondNum gold:self.goldNum];
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(confirmExchangeDiamondsWithDiamond:gold:currency:)]){
|
||||
[self.delegate confirmExchangeDiamondsWithDiamond:self.diamondNum gold:self.goldNum currency:self.chooseType == IncomeRecord_Diamond ? @"1" : @"3"];
|
||||
}
|
||||
}
|
||||
#pragma mark -懒加载
|
||||
|
||||
- (XPExchangeDiamondsItemView *)myGoldView{
|
||||
if (!_myGoldView){
|
||||
_myGoldView = [[XPExchangeDiamondsItemView alloc]initWithFrame:CGRectZero type:IncomeRecord_Gold];
|
||||
|
||||
[_myGoldView setCornerWithLeftTopCorner:kGetScaleWidth(14) rightTopCorner:kGetScaleWidth(14) bottomLeftCorner:0 bottomRightCorner:0 size:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(116))];
|
||||
}
|
||||
return _myGoldView;
|
||||
}
|
||||
@@ -136,18 +129,18 @@
|
||||
-(XPExchangeDiamondsItemView *)myDiamondsView{
|
||||
if (!_myDiamondsView){
|
||||
_myDiamondsView = [[XPExchangeDiamondsItemView alloc]initWithFrame:CGRectZero type:IncomeRecord_Diamond];
|
||||
|
||||
[_myDiamondsView setCornerWithLeftTopCorner:0 rightTopCorner:0 bottomLeftCorner:kGetScaleWidth(14) bottomRightCorner:kGetScaleWidth(14) size:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(116))];
|
||||
}
|
||||
return _myDiamondsView;
|
||||
}
|
||||
-(UIButton *)confirmBtn{
|
||||
if (!_confirmBtn){
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(48))];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(46))];
|
||||
_confirmBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_confirmBtn setTitle:YMLocalizedString(@"XPExchangeDiamondsView1") forState:UIControlStateNormal];
|
||||
_confirmBtn.titleLabel.font = kFontHeavy(16);
|
||||
_confirmBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(24);
|
||||
_confirmBtn.layer.cornerRadius = kGetScaleWidth(23);
|
||||
_confirmBtn.layer.masksToBounds = YES;
|
||||
_confirmBtn.enabled = NO;
|
||||
[_confirmBtn setBackgroundImage:image forState:UIControlStateNormal];
|
||||
@@ -169,7 +162,8 @@
|
||||
@property (nonatomic,strong) UIButton *iconView;
|
||||
///兑换数量
|
||||
@property (nonatomic,strong) XPTextField *numberView;
|
||||
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIButton *arrowView;
|
||||
@property (nonatomic,assign) IncomeRecordViewType type;
|
||||
|
||||
@end
|
||||
@@ -188,50 +182,61 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
[self addSubview:self.titleNumView];
|
||||
[self addSubview:self.bgImageView];
|
||||
|
||||
[self addSubview:self.arrowView];
|
||||
[self.bgImageView addSubview:self.iconView];
|
||||
[self.bgImageView addSubview:self.numberView];
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleNumView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.top.mas_equalTo(kGetScaleWidth(0));
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.top.mas_equalTo(kGetScaleWidth(16));
|
||||
make.height.mas_equalTo(kGetScaleWidth(20));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(73));
|
||||
}];
|
||||
[self.arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(30));
|
||||
make.height.mas_equalTo(kGetScaleWidth(30));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(38));
|
||||
make.centerY.equalTo(self.titleNumView);
|
||||
}];
|
||||
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.top.equalTo(self.titleNumView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(14));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(14));
|
||||
make.top.mas_equalTo(kGetScaleWidth(48));
|
||||
make.height.mas_equalTo(kGetScaleWidth(52));
|
||||
}];
|
||||
[self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(28));
|
||||
make.height.mas_equalTo(kGetScaleWidth(28));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(9));
|
||||
make.width.mas_equalTo(kGetScaleWidth(40));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(10));
|
||||
make.centerY.equalTo(self.bgImageView);
|
||||
}];
|
||||
[self.numberView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.equalTo(self.bgImageView);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(12));
|
||||
make.leading.equalTo(self.iconView.mas_trailing).mas_offset(8);
|
||||
make.leading.equalTo(self.iconView.mas_trailing).mas_offset(5);
|
||||
}];
|
||||
}
|
||||
#pragma mark - 赋值
|
||||
-(void)setModel:(XPExchangeDiamondsModel *)model{
|
||||
_model = model;
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView0"),@(_model.golds)];
|
||||
UIImage *image = [UIImage imageNamed:@"ms_exchange_coin_icon"];
|
||||
if(self.type == IncomeRecord_Diamond){
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView0"),@(_model.diamonds)];
|
||||
NSString *diamondNum = [NSString stringWithFormat:@"%ld",_model.minDiamonds];;
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc]initWithString:diamondNum attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],NSForegroundColorAttributeName:UIColorFromRGB(0xACB8D9)}];
|
||||
_numberView.attributedPlaceholder = attStr;
|
||||
UIImage *image = [UIImage imageNamed:@"exchange_gold_icon"];
|
||||
[_iconView setImage:image forState:UIControlStateNormal];
|
||||
|
||||
|
||||
}else{
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView1"),_model.diamonds];
|
||||
UIImage *image = [UIImage imageNamed:@"exchange_new_diamonds_icon"];
|
||||
NSString *goldNum = [NSString stringWithFormat:@"%.0f",ceilf(_model.minDiamonds / _model.rate)];
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc]initWithString:goldNum attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],NSForegroundColorAttributeName:UIColorFromRGB(0xACB8D9)}];
|
||||
_numberView.attributedPlaceholder = attStr;
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView1"),_model.golds];
|
||||
UIImage *image = [UIImage imageNamed:@"exchange_diamonds_icon"];
|
||||
[_iconView setImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
@@ -258,7 +263,7 @@
|
||||
|
||||
}
|
||||
NSInteger count = textField.text.integerValue;
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
if(self.type == IncomeRecord_Diamond){
|
||||
NSString *goldNum = [NSString stringWithFormat:@"%.0f",ceilf(count / _model.rate)];
|
||||
if(self.inputCounthandle){
|
||||
self.inputCounthandle(goldNum, textField.text);
|
||||
@@ -276,9 +281,9 @@
|
||||
- (UILabel *)titleNumView {
|
||||
if (!_titleNumView) {
|
||||
_titleNumView = [[UILabel alloc] init];
|
||||
_titleNumView.font = kFontBold(15);
|
||||
_titleNumView.textColor = UIColorFromRGB(0x00223D);
|
||||
NSString *title = self.type == IncomeRecord_Gold ? YMLocalizedString(@"XPExchangeDiamondsItemView0"): YMLocalizedString(@"XPExchangeDiamondsItemView1");
|
||||
_titleNumView.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_titleNumView.textColor =[DJDKMIMOMColor inputTextColor];
|
||||
NSString *title = self.type == IncomeRecord_Diamond ? YMLocalizedString(@"XPExchangeDiamondsItemView0"): YMLocalizedString(@"XPExchangeDiamondsItemView1");
|
||||
_titleNumView.text = [NSString stringWithFormat:title,@"0"];
|
||||
}
|
||||
return _titleNumView;
|
||||
@@ -288,10 +293,11 @@
|
||||
if (!_bgImageView){
|
||||
_bgImageView = [UIImageView new];
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
_bgImageView.image = kImage(@"ms_exchange_diamonds_coin_bg");
|
||||
_bgImageView.image = [UIImage gradientColorImageFromColors:@[ UIColorFromRGB(0xDCE6FD),UIColorFromRGB(0xD8E3FE)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(317), kGetScaleWidth(52))];
|
||||
}else{
|
||||
_bgImageView.image = kImage(@"ms_exchange_diamonds_diamonds_bg");
|
||||
_bgImageView.image = [UIImage gradientColorImageFromColors:@[ UIColorFromRGB(0xFEECD2),UIColorFromRGB(0xFFDE90)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(317), kGetScaleWidth(52))];
|
||||
}
|
||||
[_bgImageView setCornerWithLeftTopCorner:kGetScaleWidth(8) rightTopCorner:kGetScaleWidth(8) bottomLeftCorner:kGetScaleWidth(8) bottomRightCorner:kGetScaleWidth(8) size:CGSizeMake(kGetScaleWidth(317), kGetScaleWidth(52))];
|
||||
_bgImageView.userInteractionEnabled = YES;
|
||||
|
||||
}
|
||||
@@ -299,8 +305,11 @@
|
||||
}
|
||||
-(UIButton *)iconView{
|
||||
if (!_iconView){
|
||||
UIImage *image = self.type == IncomeRecord_Gold ? [UIImage imageNamed:@"ms_exchange_coin_icon"] : [UIImage imageNamed:@"exchange_new_diamonds_icon"];
|
||||
UIImage *image = self.type == IncomeRecord_Diamond ? [UIImage imageNamed:@"exchange_gold_icon"] : [UIImage imageNamed:@"exchange_diamonds_icon"];
|
||||
_iconView = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_iconView.backgroundColor = [UIColor whiteColor];
|
||||
_iconView.layer.cornerRadius = kGetScaleWidth(20);
|
||||
_iconView.layer.masksToBounds = YES;
|
||||
[_iconView setImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
return _iconView;
|
||||
@@ -311,15 +320,22 @@
|
||||
_numberView = [[XPTextField alloc]initWithFrame:CGRectZero];
|
||||
_numberView.keyboardType = UIKeyboardTypeNumberPad;
|
||||
_numberView.isValidation = YES;
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc]initWithString:YMLocalizedString(@"XPExchangeDiamondsView6") attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],NSForegroundColorAttributeName:[UIColor colorWithWhite:1 alpha:0.6]}];
|
||||
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16 weight:UIFontWeightMedium],NSForegroundColorAttributeName:UIColorFromRGB(0xACB8D9)}];
|
||||
_numberView.attributedPlaceholder = attStr;
|
||||
_numberView.font = kFontMedium(15);
|
||||
_numberView.textColor = [UIColor whiteColor];
|
||||
// _numberView.textAlignment = NSTextAlignmentRight;
|
||||
_numberView.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_numberView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_numberView.textAlignment = NSTextAlignmentRight;
|
||||
[_numberView addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
|
||||
}
|
||||
return _numberView;
|
||||
}
|
||||
|
||||
-(UIButton *)arrowView{
|
||||
if (!_arrowView){
|
||||
_arrowView = [UIButton new];
|
||||
[_arrowView setImage:[UIImage imageNamed:@"exchange_diamonds_arrow"] forState:UIControlStateNormal];
|
||||
_arrowView.hidden = self.type == IncomeRecord_Gold;
|
||||
}
|
||||
return _arrowView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -22,27 +22,14 @@
|
||||
///tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YUMIHtmlUrl.h"
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryIndicatorBackgroundView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
@interface XPIncomeRecordVC ()<XPExchangeDiamondsVCDelegate,XPIncomeRecordViewDelegate,XPIncomeRecordProtocol,JXCategoryViewDelegate, JXCategoryListContainerViewDelegate>
|
||||
|
||||
@interface XPIncomeRecordVC ()<XPExchangeDiamondsVCDelegate,XPIncomeRecordViewDelegate,XPIncomeRecordProtocol>
|
||||
///钻石
|
||||
@property (nonatomic,strong) XPIncomeRecordView *diamondView;
|
||||
///金币
|
||||
@property (nonatomic,strong) XPIncomeRecordView *goldView;
|
||||
///model
|
||||
@property (nonatomic,strong) XPIncomeRecordModel *recordModel;
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *pi_containerView;
|
||||
@property(nonatomic,strong) UIImageView *bgImageView;
|
||||
/// 返回
|
||||
@property (nonatomic,strong) UIButton *backBtn;
|
||||
/// 标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPIncomeRecordVC
|
||||
@@ -58,64 +45,26 @@
|
||||
[self.presenter requestQueryWithRoomType];
|
||||
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
self.title = YMLocalizedString(@"XPIncomeRecordVC0");
|
||||
[self.view addSubview:self.bgImageView];
|
||||
[self.view addSubview:self.backBtn];
|
||||
[self.view addSubview:self.titleLabel];
|
||||
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.pi_containerView];
|
||||
|
||||
[self.view addSubview:self.diamondView];
|
||||
[self.view addSubview:self.goldView];
|
||||
self.goldView.isClanPresident = YES;
|
||||
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.equalTo(self.view);
|
||||
[self.diamondView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(18));
|
||||
make.leading.trailing.equalTo(self.view).inset(kGetScaleWidth(15));
|
||||
make.height.mas_equalTo(kGetScaleWidth(144));
|
||||
}];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kStatusBarHeight);
|
||||
make.height.mas_equalTo(44);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
[self.goldView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.diamondView);
|
||||
make.top.equalTo(self.diamondView.mas_bottom).mas_offset(kGetScaleWidth(20));
|
||||
make.height.mas_equalTo( kGetScaleWidth(144));
|
||||
}];
|
||||
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(0);
|
||||
make.top.mas_equalTo(kStatusBarHeight);
|
||||
make.width.height.mas_equalTo(44);
|
||||
}];
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).mas_offset(kGetScaleWidth(33));
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
make.height.mas_equalTo(kGetScaleWidth(30));
|
||||
|
||||
}];
|
||||
|
||||
[self.pi_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom).offset(19);
|
||||
}];
|
||||
}
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
if (index == 0) {
|
||||
return self.goldView;
|
||||
} else {
|
||||
return self.diamondView;
|
||||
}
|
||||
}
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
|
||||
self.bgImageView.image = index == 0 ? kImage(@"ms_mine_top_bg"):kImage(@"ms_mine_diamond_bg");
|
||||
self.titleView.titleColor = index == 0 ? UIColorFromRGB(0xA88238):UIColorFromRGB(0x7E8373);
|
||||
}
|
||||
#pragma mark - XPExchangeDiamondsVCDelegate
|
||||
-(void)confirmExchangeDiamondsWithDiamondSuccess:(NSString *)diamond gold:(NSString *)gold{
|
||||
@@ -123,8 +72,8 @@
|
||||
self.recordModel.golds = self.recordModel.golds - gold.doubleValue;
|
||||
NSString *diamondNum = [NSString stringWithFormat:@"%.0f",self.recordModel.diamonds];
|
||||
NSString *goldNum = [NSString stringWithFormat:@"%.2f",self.recordModel.golds];
|
||||
self.diamondView.number = goldNum;
|
||||
self.goldView.number = diamondNum;
|
||||
self.diamondView.number = diamondNum;
|
||||
self.goldView.number = goldNum;
|
||||
}
|
||||
#pragma mark - XPIncomeRecordProtocol
|
||||
- (void)requestQueryWithRoomTypeFail{
|
||||
@@ -140,8 +89,8 @@
|
||||
-(void)getRecordIncomeSuccess:(XPIncomeRecordModel *)model{
|
||||
[self hideHUD];
|
||||
self.recordModel = model;
|
||||
self.goldView.number = @(model.diamonds).stringValue;
|
||||
self.diamondView.number = [NSString stringWithFormat:@"%.2f",model.golds];
|
||||
self.diamondView.number = @(model.diamonds).stringValue;
|
||||
self.goldView.number = [NSString stringWithFormat:@"%.2f",model.golds];
|
||||
// NSString * myUid = [AccountInfoStorage instance].getUid;
|
||||
// if(![self.clanInfo.clan.elderUid isEqualToString:myUid]){
|
||||
// self.goldView.isClanPresident = !self.recordModel.hasGoldExchangeAuth;
|
||||
@@ -189,28 +138,21 @@
|
||||
default:
|
||||
{
|
||||
|
||||
|
||||
// NSString * myUid = [AccountInfoStorage instance].getUid;
|
||||
// if(![self.clanInfo.clan.elderUid isEqualToString:myUid]){
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kGoldEarningsRecord);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
|
||||
// return;
|
||||
//
|
||||
// }
|
||||
// XPIncomeRecordGoldDetailsVC *goldDetailVC = [XPIncomeRecordGoldDetailsVC new];
|
||||
// [self.navigationController pushViewController:goldDetailVC animated:YES];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// 返回
|
||||
- (void)backBtnAction {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
#pragma mark -懒加载
|
||||
- (UIImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
_bgImageView = [UIImageView new];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
_bgImageView.image = kImage(@"ms_mine_top_bg");
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
- (XPIncomeRecordView *)diamondView{
|
||||
if (!_diamondView){
|
||||
_diamondView = [[XPIncomeRecordView alloc]initWithFrame:CGRectZero type:IncomeRecord_Diamond];
|
||||
@@ -225,65 +167,6 @@
|
||||
}
|
||||
return _goldView;
|
||||
}
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.backgroundColor = [UIColor clearColor];
|
||||
_titleView.titleColor = UIColorFromRGB(0xA88238);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0x4E390A);
|
||||
_titleView.titleFont = kFontBold(16);
|
||||
_titleView.titleSelectedFont = kFontHeavy(16);
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.listContainer = self.pi_containerView;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorImageViewSize = CGSizeMake(kGetScaleWidth(11), kGetScaleWidth(3));
|
||||
lineView.verticalMargin = 0;
|
||||
lineView.backgroundColor = UIColorFromRGB(0xAA7400);
|
||||
lineView.layer.masksToBounds = YES;
|
||||
lineView.layer.cornerRadius = kGetScaleWidth(3)/2;
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles{
|
||||
if(!_titles){
|
||||
_titles = @[YMLocalizedString(@"XPIncomeRecordView4"),YMLocalizedString(@"XPIncomeRecordView5")];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
- (JXCategoryListContainerView *)pi_containerView {
|
||||
if (!_pi_containerView) {
|
||||
_pi_containerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_pi_containerView.defaultSelectedIndex = 0;
|
||||
_pi_containerView.scrollView.tag = 1009;
|
||||
}
|
||||
return _pi_containerView;
|
||||
}
|
||||
- (UIButton *)backBtn {
|
||||
if (!_backBtn) {
|
||||
_backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backBtn setImage:[[UIImage imageNamed:@"room_info_back"]ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _backBtn;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = YMLocalizedString(@"XPIncomeRecordVC1");
|
||||
_titleLabel.textColor = UIColor.blackColor;
|
||||
_titleLabel.font = kFontBold(16);
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
|
@@ -6,13 +6,12 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
IncomeRecord_Gold,///金币
|
||||
IncomeRecord_Diamond,///钻石
|
||||
|
||||
IncomeRecord_Gold///金币
|
||||
} IncomeRecordViewType;
|
||||
|
||||
typedef enum : NSUInteger {
|
||||
@@ -29,7 +28,7 @@ typedef enum : NSUInteger {
|
||||
|
||||
@end
|
||||
|
||||
@interface XPIncomeRecordView : UIView<JXCategoryListContentViewDelegate>
|
||||
@interface XPIncomeRecordView : UIView
|
||||
@property (nonatomic,copy) NSString *number;
|
||||
@property (nonatomic,assign) BOOL isClanPresident;
|
||||
@property (nonatomic,weak) id<XPIncomeRecordViewDelegate> delegate;
|
||||
|
@@ -11,19 +11,19 @@
|
||||
|
||||
/// 背景
|
||||
@property (nonatomic,strong) UIImageView *bgImageView;
|
||||
@property(nonatomic,strong) UIImageView *coinView;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleView;
|
||||
///明细
|
||||
@property (nonatomic,strong) UIButton *detailView;
|
||||
@property(nonatomic,strong) UIButton *detailArrowView;
|
||||
|
||||
///数量
|
||||
@property (nonatomic,strong) UILabel *numberView;
|
||||
|
||||
|
||||
///点击btn容器
|
||||
@property (nonatomic,strong) UIStackView *btnStackView;
|
||||
///充值
|
||||
@property (nonatomic,strong) UIButton *payBtn;
|
||||
///兑换
|
||||
@property (nonatomic,strong) UIButton *clickBtn;
|
||||
@property (nonatomic,strong) UIButton *exchangeBtn;
|
||||
|
||||
@property (nonatomic,assign) IncomeRecordViewType type;
|
||||
@end
|
||||
@@ -38,70 +38,64 @@
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.clickBtn];
|
||||
[self.bgImageView addSubview:self.coinView];
|
||||
[self.bgImageView addSubview:self.titleView];
|
||||
[self.bgImageView addSubview:self.detailArrowView];
|
||||
[self.bgImageView addSubview:self.detailView];
|
||||
[self.bgImageView addSubview:self.numberView];
|
||||
|
||||
[self.bgImageView addSubview:self.btnStackView];
|
||||
[self.btnStackView addArrangedSubview:self.payBtn];
|
||||
[self.btnStackView addArrangedSubview:self.exchangeBtn];
|
||||
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(0));
|
||||
make.width.mas_equalTo(kGetScaleWidth(339));
|
||||
make.height.mas_equalTo(kGetScaleWidth(118));
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
[self.coinView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(47));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.centerY.equalTo(self.bgImageView);
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(36));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(68));
|
||||
|
||||
}];
|
||||
[self.detailArrowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(20));
|
||||
make.width.mas_equalTo(kGetScaleWidth(4.5));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.top.mas_equalTo(kGetScaleWidth(38));
|
||||
make.top.mas_equalTo(kGetScaleWidth(17));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(20));
|
||||
make.height.mas_equalTo(kGetScaleWidth(20));
|
||||
}];
|
||||
[self.detailView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(27));
|
||||
make.height.mas_equalTo(kGetScaleWidth(12));
|
||||
make.centerY.equalTo(self.detailArrowView);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(20));
|
||||
make.height.mas_equalTo(kGetScaleWidth(18));
|
||||
make.width.mas_equalTo(kGetScaleWidth(45));
|
||||
make.centerY.equalTo(self.titleView);
|
||||
}];
|
||||
|
||||
[self.numberView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.titleView);
|
||||
make.top.mas_equalTo(kGetScaleWidth(61));
|
||||
make.top.mas_equalTo(kGetScaleWidth(49));
|
||||
make.height.mas_equalTo(kGetScaleWidth(20));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(20));
|
||||
}];
|
||||
[self.clickBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(303));
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
make.top.equalTo(self.bgImageView.mas_bottom).mas_offset(kGetScaleWidth(46));
|
||||
make.centerX.equalTo(self);
|
||||
[self.btnStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.bgImageView).inset(kGetScaleWidth(20));
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
make.top.mas_equalTo(kGetScaleWidth(86));
|
||||
}];
|
||||
[self.payBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
[self.exchangeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(kGetScaleWidth(40));
|
||||
}];
|
||||
}
|
||||
-(void)setNumber:(NSString *)number{
|
||||
_number = number;
|
||||
_numberView.text = _number;
|
||||
}
|
||||
|
||||
-(void)setIsClanPresident:(BOOL)isClanPresident{
|
||||
_isClanPresident = isClanPresident;
|
||||
// _exchangeBtn.hidden = _isClanPresident;
|
||||
// _detailView.hidden = !_isClanPresident;
|
||||
}
|
||||
#pragma mark - btnClick
|
||||
-(void)clickDetailViewAction{
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
if(self.type == IncomeRecord_Diamond){
|
||||
[self clickDiamondDetailAction];
|
||||
return;
|
||||
}
|
||||
@@ -113,10 +107,10 @@
|
||||
[self.delegate clickHandleWithType:ClickType_Diamond_Detail];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)clickBtnAction{
|
||||
///钻石充值
|
||||
-(void)clickDiamondPayAction{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(clickHandleWithType:)]){
|
||||
[self.delegate clickHandleWithType:self.type == IncomeRecord_Gold ? ClickType_Diamond_Pay : ClickType_Gold_Exchangel];
|
||||
[self.delegate clickHandleWithType:ClickType_Diamond_Pay];
|
||||
}
|
||||
}
|
||||
///金币明细
|
||||
@@ -125,7 +119,12 @@
|
||||
[self.delegate clickHandleWithType:ClickType_Gold_Detail];
|
||||
}
|
||||
}
|
||||
|
||||
///金币兑换
|
||||
-(void)clickGoldExchangelAction{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(clickHandleWithType:)]){
|
||||
[self.delegate clickHandleWithType:ClickType_Gold_Exchangel];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 懒加载
|
||||
- (UIImageView *)bgImageView{
|
||||
@@ -133,23 +132,19 @@
|
||||
_bgImageView = [UIImageView new];
|
||||
_bgImageView.userInteractionEnabled = YES;
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_bgImageView.image = self.type == IncomeRecord_Gold ? [UIImage imageNamed:@"income_record_gold_bg"]:[UIImage imageNamed:@"income_record_diamond_bg"];
|
||||
_bgImageView.layer.cornerRadius = 10.f;
|
||||
_bgImageView.clipsToBounds = YES;
|
||||
_bgImageView.image = self.type == IncomeRecord_Diamond ? [UIImage imageNamed:@"income_record_gold_bg"]:[UIImage imageNamed:@"income_record_diamond_bg"];
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
- (UIImageView *)coinView{
|
||||
if(!_coinView){
|
||||
_coinView = [UIImageView new];
|
||||
_coinView.image = self.type == IncomeRecord_Gold ? [UIImage imageNamed:@"ms_income_record_coin"]:[UIImage imageNamed:@"ms_income_recorddiamond"];
|
||||
}
|
||||
return _coinView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[UILabel alloc] init];
|
||||
_titleView.font = kFontBold(15);
|
||||
_titleView.textColor = self.type == IncomeRecord_Gold ? UIColorFromRGB(0x9F4805) : UIColorFromRGB(0xffffff);
|
||||
_titleView.text = self.type == IncomeRecord_Gold ? YMLocalizedString(@"XPDressUpShopViewController7"):YMLocalizedString(@"XPExchangeDiamondsItemView2");
|
||||
_titleView.font = [UIFont systemFontOfSize:20 weight:UIFontWeightMedium];
|
||||
_titleView.textColor = self.type == IncomeRecord_Diamond ? UIColorFromRGB(0x1B1558) : UIColorFromRGB(0x572714);
|
||||
_titleView.text = self.type == IncomeRecord_Diamond ? YMLocalizedString(@"XPIncomeRecordView4"):YMLocalizedString(@"XPIncomeRecordView5");
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
@@ -158,47 +153,68 @@
|
||||
if (!_detailView){
|
||||
_detailView = [UIButton new];
|
||||
[_detailView setTitle:YMLocalizedString(@"XPIncomeRecordView0") forState:UIControlStateNormal];
|
||||
[_detailView setTitleColor:self.type == IncomeRecord_Gold ? UIColorFromRGB(0xB38C3F):UIColorFromRGB(0x737D83) forState:UIControlStateNormal];
|
||||
[_detailView setTitleColor:self.type == IncomeRecord_Diamond ? UIColorFromRGB(0x1B1558):UIColorFromRGB(0x582815) forState:UIControlStateNormal];
|
||||
_detailView.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
|
||||
CGFloat width = [[NSBundle getLanguageText]hasPrefix:@"zh"] ? 40 : 50;
|
||||
_detailView.imageEdgeInsets = UIEdgeInsetsMake(0, kGetScaleWidth(width), 0, 0);
|
||||
_detailView.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
[_detailView setImage:self.type == IncomeRecord_Diamond ? [[UIImage imageNamed:@"income_record_arrow_1"]ms_SetImageForRTL]: [[UIImage imageNamed:@"income_record_arrow_2"]ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_detailView addTarget:self action:@selector(clickDetailViewAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _detailView;
|
||||
}
|
||||
- (UIButton *)detailArrowView{
|
||||
if(!_detailArrowView){
|
||||
_detailArrowView = [UIButton new];
|
||||
[_detailArrowView setBackgroundImage:self.type == IncomeRecord_Gold ? [[UIImage imageNamed:@"income_record_arrow_1"]ms_SetImageForRTL]: [[UIImage imageNamed:@"income_record_arrow_2"]ms_SetImageForRTL] forState:UIControlStateNormal];
|
||||
[_detailArrowView setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
[_detailArrowView addTarget:self action:@selector(clickDetailViewAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _detailArrowView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)numberView {
|
||||
if (!_numberView) {
|
||||
_numberView = [[UILabel alloc] init];
|
||||
_numberView.font = kFontHeavy(24);
|
||||
_numberView.textColor = self.type == IncomeRecord_Gold ? UIColorFromRGB(0xFFFBD5) : UIColorFromRGB(0xFFFBD5);
|
||||
_numberView.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
_numberView.textColor = self.type == IncomeRecord_Diamond ? UIColorFromRGB(0x1B1558) : UIColorFromRGB(0x572714);
|
||||
_numberView.text = @"0";
|
||||
}
|
||||
return _numberView;
|
||||
}
|
||||
|
||||
- (UIButton *)clickBtn{
|
||||
if(!_clickBtn){
|
||||
_clickBtn = [UIButton new];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x70E9FF),UIColorFromRGB(0xAE87FF),UIColorFromRGB(0xFF5CE1)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(303), kGetScaleWidth(48))];
|
||||
[_clickBtn setBackgroundImage:image forState:UIControlStateNormal];
|
||||
[_clickBtn setTitle:self.type == IncomeRecord_Gold ? YMLocalizedString(@"XPIncomeRecordView1") : YMLocalizedString(@"XPTreasureFairyShopingExchangeCell1") forState:UIControlStateNormal];
|
||||
[_clickBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_clickBtn.titleLabel.font = kFontHeavy(16);
|
||||
[_clickBtn addTarget:self action:@selector(clickBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
_clickBtn.layer.cornerRadius = kGetScaleWidth(48)/2;
|
||||
_clickBtn.layer.masksToBounds = YES;
|
||||
- (UIStackView *)btnStackView{
|
||||
if (!_btnStackView){
|
||||
_btnStackView = [[UIStackView alloc] init];
|
||||
_btnStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_btnStackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_btnStackView.alignment = UIStackViewAlignmentFill;
|
||||
_btnStackView.spacing = kGetScaleWidth(13);
|
||||
}
|
||||
return _clickBtn;
|
||||
return _btnStackView;
|
||||
}
|
||||
- (UIButton *)payBtn{
|
||||
if (!_payBtn){
|
||||
_payBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payBtn setTitle:YMLocalizedString(@"XPIncomeRecordView1") forState:UIControlStateNormal];
|
||||
|
||||
|
||||
_payBtn.hidden = self.type == IncomeRecord_Gold;
|
||||
[_payBtn setTitleColor:UIColorFromRGB(0x93570B) forState:UIControlStateNormal];
|
||||
_payBtn.layer.cornerRadius = kGetScaleWidth(20);
|
||||
_payBtn.layer.masksToBounds = YES;
|
||||
_payBtn.layer.borderWidth = 1;
|
||||
_payBtn.layer.borderColor = UIColorFromRGB(0x93570B).CGColor;
|
||||
[_payBtn addTarget:self action:@selector(clickDiamondPayAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _payBtn;
|
||||
}
|
||||
|
||||
|
||||
-(UIButton *)exchangeBtn{
|
||||
if (!_exchangeBtn){
|
||||
_exchangeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_exchangeBtn setTitle:YMLocalizedString(@"XPIncomeRecordView2") forState:UIControlStateNormal];
|
||||
_exchangeBtn.backgroundColor = UIColorFromRGB(0xB1BFFA);
|
||||
[_exchangeBtn setTitleColor:UIColorFromRGB(0x130C4F) forState:UIControlStateNormal];
|
||||
_exchangeBtn.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_exchangeBtn.layer.masksToBounds = YES;
|
||||
_exchangeBtn.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_exchangeBtn.hidden = self.type == IncomeRecord_Diamond;
|
||||
_exchangeBtn.layer.cornerRadius = kGetScaleWidth(20);
|
||||
[_exchangeBtn addTarget:self action:@selector(clickGoldExchangelAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _exchangeBtn;
|
||||
}
|
||||
@end
|
||||
|
@@ -15,7 +15,8 @@
|
||||
|
||||
/// 背景
|
||||
@property (nonatomic, strong) UIView *bgView;
|
||||
@property(nonatomic,strong) UIView *bgPriceView;
|
||||
/// 选中背景
|
||||
@property (nonatomic, strong) UIView *selectedBgView;
|
||||
/// 价格
|
||||
@property (nonatomic, strong) UILabel *priceLabel;
|
||||
/// 💎
|
||||
@@ -37,34 +38,33 @@
|
||||
|
||||
- (void)createUI {
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.bgView addSubview:self.bgPriceView];
|
||||
[self.bgPriceView addSubview:self.priceLabel];
|
||||
[self.bgView addSubview:self.selectedBgView];
|
||||
[self.bgView addSubview:self.priceLabel];
|
||||
[self.bgView addSubview:self.iconImageView];
|
||||
[self.bgView addSubview:self.numLabel];
|
||||
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.contentView);
|
||||
make.leading.trailing.equalTo(self.contentView).inset(kGetScaleWidth(16));
|
||||
make.top.mas_equalTo(kGetScaleWidth(0));
|
||||
make.height.mas_equalTo(kGetScaleWidth(60));
|
||||
|
||||
}];
|
||||
|
||||
[self.selectedBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.bgView);
|
||||
}];
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(13));
|
||||
make.width.mas_equalTo(kGetScaleWidth(55));
|
||||
make.height.mas_equalTo(kGetScaleWidth(48));
|
||||
make.centerX.equalTo(self.bgView);
|
||||
}];
|
||||
[self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(0));
|
||||
make.top.mas_equalTo(kGetScaleWidth(66));
|
||||
}];
|
||||
[self.bgPriceView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.equalTo(self.bgView);
|
||||
make.height.mas_equalTo(kGetScaleWidth(26));
|
||||
make.centerY.equalTo(self.bgView);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(24));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(18));
|
||||
}];
|
||||
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.bgPriceView);
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(18));
|
||||
make.centerY.equalTo(self.bgView);
|
||||
}];
|
||||
[self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.equalTo(self.bgView);
|
||||
make.leading.equalTo(self.iconImageView.mas_trailing).mas_offset(kGetScaleWidth(5));
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
- (void)setSelectedStyle:(BOOL)selectedStyle {
|
||||
_selectedStyle = selectedStyle;
|
||||
_bgView.layer.borderWidth = _selectedStyle ? 1 : 0;
|
||||
self.selectedBgView.hidden = !selectedStyle;
|
||||
}
|
||||
|
||||
#pragma mark - 懒加载
|
||||
@@ -88,29 +88,34 @@
|
||||
- (UIView *)bgView {
|
||||
if (!_bgView) {
|
||||
_bgView = [[UIView alloc] init];
|
||||
_bgView.backgroundColor = UIColorFromRGB(0xF3F0E6);
|
||||
_bgView.layer.cornerRadius = kGetScaleWidth(9);
|
||||
_bgView.backgroundColor = UIColorFromRGB(0xF0F5F6);
|
||||
_bgView.layer.cornerRadius = kGetScaleWidth(13);
|
||||
_bgView.layer.masksToBounds = YES;
|
||||
_bgView.layer.borderColor = UIColorFromRGB(0xFFB05E).CGColor;
|
||||
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
|
||||
- (UIView *)bgPriceView{
|
||||
if(!_bgPriceView){
|
||||
_bgPriceView = [UIView new];
|
||||
_bgPriceView.backgroundColor = UIColorFromRGB(0xFFF09C);
|
||||
- (UIView *)selectedBgView {
|
||||
if (!_selectedBgView) {
|
||||
_selectedBgView = [[UIView alloc] init];
|
||||
UIImage *bgImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6FDFF),UIColorFromRGB(0xFAEDFF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(343), kGetScaleWidth(60))];
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x13E2F5),UIColorFromRGB(0x9DB4FF),UIColorFromRGB(0xCC67FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(344), kGetScaleWidth(60))];
|
||||
_selectedBgView.backgroundColor = [UIColor colorWithPatternImage:bgImage];
|
||||
_selectedBgView.layer.cornerRadius = kGetScaleWidth(13);
|
||||
_selectedBgView.layer.masksToBounds = YES;
|
||||
_selectedBgView.layer.borderColor = [UIColor colorWithPatternImage:image].CGColor;
|
||||
_selectedBgView.layer.borderWidth = 1;
|
||||
_selectedBgView.hidden = YES;
|
||||
}
|
||||
return _bgPriceView;
|
||||
return _selectedBgView;
|
||||
}
|
||||
|
||||
- (UILabel *)priceLabel {
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [[UILabel alloc] init];
|
||||
_priceLabel.textColor = UIColorFromRGB(0x513C0B);
|
||||
_priceLabel.font = kFontBold(12);
|
||||
_priceLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_priceLabel.textColor = UIColorFromRGB(0x1F1B4F);
|
||||
_priceLabel.font = kFontMedium(18);
|
||||
|
||||
}
|
||||
return _priceLabel;
|
||||
}
|
||||
@@ -119,7 +124,7 @@
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[UIImageView alloc] init];
|
||||
_iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_iconImageView.image = [UIImage imageNamed:@"ms_mine_recharge_coin"];
|
||||
_iconImageView.image = [UIImage imageNamed:@"exchange_gold_icon"];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
@@ -127,8 +132,8 @@
|
||||
- (UILabel *)numLabel {
|
||||
if (!_numLabel) {
|
||||
_numLabel = [[UILabel alloc] init];
|
||||
_numLabel.textColor = UIColorFromRGB(0x8A4B00);
|
||||
_numLabel.font = kFontBold(15);
|
||||
_numLabel.textColor = UIColorFromRGB(0x1F1B4F);
|
||||
_numLabel.font = kFontBold(20);
|
||||
_numLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _numLabel;
|
||||
|
@@ -21,7 +21,8 @@
|
||||
@property (nonatomic, strong) UILabel *balanceTextLabel;
|
||||
/// 余额
|
||||
@property (nonatomic, strong) UILabel *balanceLabel;
|
||||
|
||||
/// 💎
|
||||
@property (nonatomic, strong) UIImageView *iconImageView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
- (void)createUI {
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView addSubview:self.balanceBgVeiw];
|
||||
|
||||
[self.balanceBgVeiw addSubview:self.iconImageView];
|
||||
[self.balanceBgVeiw addSubview:self.balanceTextLabel];
|
||||
[self.balanceBgVeiw addSubview:self.balanceLabel];
|
||||
|
||||
@@ -46,21 +47,27 @@
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
[self.balanceBgVeiw mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(339));
|
||||
make.height.mas_equalTo(kGetScaleWidth(118));
|
||||
make.width.mas_equalTo(kGetScaleWidth(343));
|
||||
make.height.mas_equalTo(kGetScaleWidth(86));
|
||||
make.centerX.equalTo(self.bgImageView);
|
||||
make.bottom.mas_equalTo(-kGetScaleWidth(0));
|
||||
make.bottom.mas_equalTo(-kGetScaleWidth(22));
|
||||
}];
|
||||
|
||||
[self.balanceTextLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(33));
|
||||
make.top.mas_equalTo(kGetScaleWidth(36));
|
||||
make.centerX.equalTo(self.balanceBgVeiw).mas_offset(kGetScaleWidth(13));
|
||||
make.top.mas_equalTo(kGetScaleWidth(14));
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
}];
|
||||
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(21));
|
||||
make.trailing.equalTo(self.balanceTextLabel.mas_leading).mas_offset(-kGetScaleWidth(5));
|
||||
make.centerY.equalTo(self.balanceTextLabel);
|
||||
|
||||
}];
|
||||
[self.balanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.balanceTextLabel.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(33));
|
||||
make.bottom.mas_equalTo(-kGetScaleWidth(14));
|
||||
make.centerX.equalTo(self.balanceBgVeiw);
|
||||
make.leading.trailing.equalTo(self.balanceBgVeiw).inset(kGetScaleWidth(10));
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -76,23 +83,23 @@
|
||||
- (UIImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] init];
|
||||
|
||||
_bgImageView.image = kImage(@"ms_mine_top_bg");
|
||||
UIImage *image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x13E2F5),UIColorFromRGB(0x9DB4FF),UIColorFromRGB(0xCC67FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth, kGetScaleWidth(123))];
|
||||
_bgImageView.image = image;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
- (UIImageView *)balanceBgVeiw{
|
||||
if(!_balanceBgVeiw){
|
||||
_balanceBgVeiw = [UIImageView new];
|
||||
_balanceBgVeiw.image = kImage(@"ms_mine_coin_bg");
|
||||
_balanceBgVeiw.image = kImage(@"mine_recharge_balance_bg");
|
||||
}
|
||||
return _balanceBgVeiw;
|
||||
}
|
||||
- (UILabel *)balanceTextLabel {
|
||||
if (!_balanceTextLabel) {
|
||||
_balanceTextLabel = [[UILabel alloc] init];
|
||||
_balanceTextLabel.textColor = UIColorFromRGB(0x9F4805);
|
||||
_balanceTextLabel.font = kFontBold(15);
|
||||
_balanceTextLabel.textColor = UIColorFromRGB(0x333333);
|
||||
_balanceTextLabel.font = kFontRegular(14);
|
||||
_balanceTextLabel.text = YMLocalizedString(@"XPIAPRechargeHeaderView0");
|
||||
}
|
||||
return _balanceTextLabel;
|
||||
@@ -101,14 +108,21 @@
|
||||
- (UILabel *)balanceLabel {
|
||||
if (!_balanceLabel) {
|
||||
_balanceLabel = [[UILabel alloc] init];
|
||||
_balanceLabel.textColor = UIColorFromRGB(0xFFFBD5);
|
||||
_balanceLabel.font = kFontBold(24);
|
||||
_balanceLabel.textColor = UIColorFromRGB(0x1F1B4F);
|
||||
_balanceLabel.font = kFontMedium(32);
|
||||
_balanceLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_balanceLabel.text = @"0";
|
||||
_balanceLabel.adjustsFontSizeToFitWidth = YES;
|
||||
}
|
||||
return _balanceLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[UIImageView alloc] init];
|
||||
_iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_iconImageView.image = [UIImage imageNamed:@"exchange_gold_icon"];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -64,7 +64,8 @@
|
||||
|
||||
/// 订单编号
|
||||
@property (nonatomic,copy) NSString *orderId;
|
||||
|
||||
//////充值banner位
|
||||
@property(nonatomic,copy) NSArray *bannerList;
|
||||
|
||||
|
||||
@end
|
||||
@@ -93,7 +94,7 @@
|
||||
[self initHttpData];
|
||||
}
|
||||
- (void)createUI {
|
||||
self.view.backgroundColor = UIColorFromRGB(0xF4F5FA);
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
[self.view addSubview:self.headerView];
|
||||
[self.view addSubview:self.collectionView];
|
||||
@@ -104,7 +105,7 @@
|
||||
|
||||
[self.stackView addArrangedSubview:self.agreeLabel];
|
||||
[self.stackView addArrangedSubview:self.protcoloButton];
|
||||
CGFloat height = kGetScaleWidth(236);
|
||||
CGFloat height = kGetScaleWidth(123)+kNavigationHeight;
|
||||
[self.headerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.mas_equalTo(0);
|
||||
make.height.mas_equalTo(height);
|
||||
@@ -124,7 +125,7 @@
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.headerView.mas_bottom).mas_offset(kGetScaleWidth(21));
|
||||
make.top.mas_equalTo(self.headerView.mas_bottom).mas_offset(-kGetScaleWidth(22));
|
||||
make.leading.trailing.mas_equalTo(0);
|
||||
make.bottom.equalTo(self.rechargeBtn.mas_top).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
@@ -169,7 +170,7 @@
|
||||
[self showSuccessToast:YMLocalizedString(@"XPIAPRechargeViewController11")];
|
||||
return;
|
||||
}
|
||||
NSInteger index = self.selectedIndex.row;
|
||||
NSInteger index = self.bannerList.count > 0 ? self.selectedIndex.row - 1 : self.selectedIndex.row;
|
||||
if(index < self.dataSource.count){
|
||||
RechargeListModel *model = [self.dataSource safeObjectAtIndex1:index];
|
||||
if (model.chargeProdId) {
|
||||
@@ -205,9 +206,12 @@
|
||||
[self.presenter getUserWalletInfo];
|
||||
}
|
||||
- (void)getBannerListSuccessWithList:(NSArray *)list{
|
||||
|
||||
self.selectedIndex = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
|
||||
self.bannerList = list;
|
||||
if(self.bannerList.count > 0){
|
||||
self.selectedIndex = [NSIndexPath indexPathForRow:1 inSection:0];
|
||||
}else{
|
||||
self.selectedIndex = [NSIndexPath indexPathForRow:0 inSection:0];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
///批量验证
|
||||
@@ -431,31 +435,41 @@
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
|
||||
if(self.bannerList.count > 0){
|
||||
return self.dataSource.count + 1;
|
||||
}
|
||||
return self.dataSource.count;
|
||||
}
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return CGSizeMake(kGetScaleWidth(108), kGetScaleWidth(121));
|
||||
return self.bannerList.count > 0 && indexPath.row == 0 ? CGSizeMake(KScreenWidth, kGetScaleWidth(114)) : CGSizeMake(KScreenWidth, kGetScaleWidth(80));
|
||||
}
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
|
||||
if(indexPath.row == 0 && self.bannerList.count > 0){
|
||||
XPIAPRechargeHeadCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPIAPRechargeHeadCell class]) forIndexPath:indexPath];
|
||||
cell.bannerList = self.bannerList;
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
|
||||
XPIAPRechargeCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPIAPRechargeCollectionViewCell.self) forIndexPath:indexPath];
|
||||
NSInteger count = indexPath.item;
|
||||
NSInteger count = self.bannerList.count > 0 ? indexPath.item - 1 : indexPath.item;
|
||||
cell.rechargeModel = [self.dataSource safeObjectAtIndex1:count];
|
||||
cell.selectedStyle = self.selectedIndex.item == indexPath.item;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
if(indexPath.row == 0 && self.bannerList.count > 0)return;
|
||||
self.selectedIndex = indexPath;
|
||||
[collectionView reloadData];
|
||||
}
|
||||
#pragma mark - XPIAPRechargeHeadCellDelegate
|
||||
- (void)xpIAPRechargeHeadCell:(XPIAPRechargeHeadCell *)cycleScrollView didSelectItemAtIndex:(NSInteger)index{
|
||||
|
||||
RechargeListModel *bannerModel = [self.bannerList safeObjectAtIndex1:index];
|
||||
XPWebViewController * webVC= [[XPWebViewController alloc] init];
|
||||
webVC.url = bannerModel.linkUrl;
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
|
||||
@@ -463,12 +477,12 @@
|
||||
if (!_collectionView) {
|
||||
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
layout.minimumLineSpacing = kGetScaleWidth(8);
|
||||
layout.minimumInteritemSpacing = kGetScaleWidth(8);
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, kGetScaleWidth(17), 0, kGetScaleWidth(17));
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.sectionInset = UIEdgeInsetsMake(kGetScaleWidth(16), 0, kGetScaleWidth(16), 0);
|
||||
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.backgroundColor = UIColor.clearColor;
|
||||
_collectionView.backgroundColor = UIColor.whiteColor;
|
||||
_collectionView.alwaysBounceVertical = YES;
|
||||
[_collectionView registerClass:[XPIAPRechargeCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass(XPIAPRechargeCollectionViewCell.self)];
|
||||
[_collectionView registerClass:[XPIAPRechargeHeadCell class] forCellWithReuseIdentifier:NSStringFromClass(XPIAPRechargeHeadCell.self)];
|
||||
@@ -476,7 +490,8 @@
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
|
||||
_collectionView.layer.cornerRadius = kGetScaleWidth(16);
|
||||
_collectionView.layer.masksToBounds = YES;
|
||||
// _collectionView.contentInset = UIEdgeInsetsMake(kHeaderViewHeight, 0, 0, 0);
|
||||
|
||||
}
|
||||
@@ -551,8 +566,8 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = YMLocalizedString(@"XPIAPRechargeViewController6");
|
||||
_titleLabel.textColor = UIColor.blackColor;
|
||||
_titleLabel.font = kFontBold(16);
|
||||
_titleLabel.textColor = UIColor.whiteColor;
|
||||
_titleLabel.font = kFontSemibold(17);
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
@@ -153,7 +153,7 @@
|
||||
}
|
||||
-(UIButton *)confirmBtn{
|
||||
if (!_confirmBtn){
|
||||
_confirmBtn = [UIButton buttonInitWithText:YMLocalizedString(@"TTAlertConfig0") font:kFontMedium(16) textColor:[DJDKMIMOMColor inputTextColor] image:nil bgImage:nil];
|
||||
_confirmBtn = [UIButton buttonInitWithText:YMLocalizedString(@"XPIncomeRecordGoldDetailsPickViewView1") font:kFontMedium(16) textColor:[DJDKMIMOMColor inputTextColor] image:nil bgImage:nil];
|
||||
[_confirmBtn addTarget:self action:@selector(confirmAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _confirmBtn;
|
||||
|
@@ -14,7 +14,6 @@
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
@property (nonatomic, strong) UILabel *coinLabel;
|
||||
@property (nonatomic, strong) UILabel *descLabel;
|
||||
@property(nonatomic,strong) UIImageView *arrowView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -35,37 +34,28 @@
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.coinLabel];
|
||||
[self addSubview:self.descLabel];
|
||||
[self addSubview:self.arrowView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(16);
|
||||
make.leading.mas_equalTo(16);
|
||||
make.top.mas_equalTo(13);
|
||||
make.leading.mas_equalTo(14);
|
||||
make.trailing.mas_equalTo(0);
|
||||
make.height.mas_equalTo(18);
|
||||
make.height.mas_equalTo(24);
|
||||
}];
|
||||
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(self.coinLabel);
|
||||
make.top.equalTo(self.coinLabel.mas_bottom).mas_offset(4);
|
||||
|
||||
}];
|
||||
|
||||
|
||||
[self.arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(5);
|
||||
make.height.mas_equalTo(7);
|
||||
make.leading.equalTo(self.descLabel.mas_trailing).mas_offset(2);
|
||||
make.centerY.equalTo(self.descLabel);
|
||||
make.top.mas_equalTo(self.coinLabel.mas_bottom);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setDiamonds:(NSString *)diamonds {
|
||||
|
||||
self.coinLabel.text = diamonds;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
@@ -80,9 +70,9 @@
|
||||
- (UILabel *)descLabel {
|
||||
if (!_descLabel) {
|
||||
_descLabel = [[UILabel alloc] init];
|
||||
_descLabel.font = [UIFont systemFontOfSize:9 weight:UIFontWeightRegular];
|
||||
_descLabel.textColor = UIColorFromRGB(0x628ebb);
|
||||
_descLabel.text = YMLocalizedString(@"XPMineAccountView1");
|
||||
_descLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
_descLabel.textColor = UIColorRGBAlpha(0x000000, 0.3);
|
||||
_descLabel.text = YMLocalizedString(@"XPMineAccountView0");
|
||||
}
|
||||
return _descLabel;
|
||||
}
|
||||
@@ -91,19 +81,12 @@
|
||||
- (UILabel *)coinLabel {
|
||||
if (!_coinLabel) {
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.text = YMLocalizedString(@"XPIncomeRecordVC1");
|
||||
_coinLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_coinLabel.textColor = UIColorFromRGB(0x185491);
|
||||
_coinLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
|
||||
_coinLabel.textColor = [DJDKMIMOMColor mainTextColor];
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
- (UIImageView *)arrowView{
|
||||
if(!_arrowView){
|
||||
_arrowView = [UIImageView new];
|
||||
_arrowView.image = [kImage(@"ms_mine_purse_arrow") ms_SetImageForRTL];
|
||||
}
|
||||
return _arrowView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -140,7 +140,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
}
|
||||
#pragma mark- 检查是否有转赠钻石权限
|
||||
|
||||
-(void)checkHaveGiveDiamondsPermission{
|
||||
-(void)checkHaveGiveDiamondsPermission{
|
||||
ClientConfig *config = [ClientConfig shareConfig];
|
||||
NSArray *uidList = config.configInfo.giveDiamondErbanNoList;
|
||||
for (id uid in uidList) {
|
||||
@@ -365,7 +365,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
return cell;
|
||||
}else if (indexPath.section == 1) {
|
||||
XPMinePersonalCenterCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMinePersonalCenterCell class])];
|
||||
cell.isHaveGiveDiamond = NO;
|
||||
// cell.isHaveGiveDiamond = self.isHavePermission;
|
||||
@kWeakify(self)
|
||||
cell.clickAction = ^(int type){
|
||||
@kStrongify(self)
|
||||
@@ -461,9 +461,11 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
}
|
||||
///点击充值
|
||||
-(void)pushThirdPartyPayVC{
|
||||
[self pushEarningsRecordVC];
|
||||
XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init];
|
||||
webVC.type = @"4";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
///点击钱包
|
||||
///点击收益记录
|
||||
-(void)pushEarningsRecordVC{
|
||||
|
||||
XPIncomeRecordVC *incomeRecordVC = [XPIncomeRecordVC new];
|
||||
|
@@ -46,6 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
//是否为周榜top1
|
||||
@property(nonatomic,assign) BOOL isWeekTop1;
|
||||
@property(nonatomic,copy) NSString *inRoomUid;
|
||||
|
||||
//是否在麦位
|
||||
@property(nonatomic,assign) BOOL inMic;
|
||||
///是否在线
|
||||
|
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,assign) CGFloat noCheckedWidth;
|
||||
@property(nonatomic,copy) NSString *name;
|
||||
@property(nonatomic,copy) NSString *id;
|
||||
@property(nonatomic,assign) BOOL isHomeRecommend;
|
||||
@property(nonatomic,assign) BOOL isHomeRecommen;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -197,7 +197,6 @@
|
||||
[[self getView] onGetLittleGameListSuccess:array];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getHomeRecommendDataFail];
|
||||
}errorToast:NO]
|
||||
roomUid:@""];
|
||||
}errorToast:NO]];
|
||||
}
|
||||
@end
|
||||
|
@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPNewHomePartyTableViewCell : UITableViewCell
|
||||
|
||||
@property (nonatomic,strong) HomePlayRoomModel *roomInfo;
|
||||
|
||||
@property (nonatomic,strong) HomeRecommendRoomModel *roomInfo1;
|
||||
@property(nonatomic,weak) id<XPNewHomePartyTableViewCellDelegate>delegate;
|
||||
///声音卡时,svga是否播放动画
|
||||
-(void)setPlaySoundStatus:(BOOL)isPlay;
|
||||
|
@@ -243,7 +243,14 @@
|
||||
-(void)setPlaySoundTime:(NSInteger)time{
|
||||
_audioView.voiceDura = @(time).stringValue;
|
||||
}
|
||||
|
||||
- (void)setRoomInfo1:(HomeRecommendRoomModel *)roomInfo1 {
|
||||
_roomInfo1 = roomInfo1;
|
||||
if (_roomInfo1) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)didSelectItemAction{
|
||||
|
||||
|
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,weak) id<XPHomeRecommendViewControllerDelegate>delegate;
|
||||
@property(nonatomic,copy) HeaderRefreshComplete refreshComplete;
|
||||
@property(nonatomic,strong) PIHomeCategoryTitleModel *tagModel;
|
||||
|
||||
- (void)headerRefresh;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -56,6 +56,8 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
|
||||
@property (nonatomic,strong) NSMutableArray<HomePlayRoomModel *> *personalRoomList;
|
||||
///房间信息
|
||||
@property (nonatomic,strong) RoomInfoModel * roomInfo;
|
||||
///是否正在请示数据,防止过多请求
|
||||
@property (nonatomic,assign) BOOL isRequestData;
|
||||
///倒计时
|
||||
@property (nonatomic,strong) CountDownHelper *countDownHelper;
|
||||
///正在播放声音的cell
|
||||
@@ -101,9 +103,53 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
#pragma mark - InitHttp
|
||||
|
||||
-(void)requestData{
|
||||
return;
|
||||
///正在播放声音,不能刷新数据
|
||||
if(self.pi_playAudioCell != nil){
|
||||
if(self.refreshComplete){
|
||||
self.refreshComplete();
|
||||
}
|
||||
return;
|
||||
}
|
||||
///正在请求数据,不用重新请求
|
||||
if(self.isRequestData == YES){
|
||||
if(self.refreshComplete){
|
||||
self.refreshComplete();
|
||||
}
|
||||
return;
|
||||
}
|
||||
self.isRequestData = YES;
|
||||
[self.presenter getHomeListDataWith:1 completeHandle:^(BOOL isSuccess, NSArray *playGameList, NSArray *friendList) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.isRequestData = NO;
|
||||
if(playGameList.count > 0){
|
||||
self.playTeamList = [NSMutableArray arrayWithArray:playGameList];
|
||||
}
|
||||
if(friendList.count > 0){
|
||||
[self getFriendList:friendList];
|
||||
}
|
||||
if(self.refreshComplete){
|
||||
self.refreshComplete();
|
||||
}
|
||||
if(self.pi_playAudioCell == nil){///播放音频时不能刷新数据
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
||||
}
|
||||
- (void)headerRefresh {
|
||||
self.isRequestData = NO;
|
||||
[self requestData];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shieldingNotification) name:kShieldingNotification object:nil];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -111,7 +157,9 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)shieldingNotification{
|
||||
[self requestData];
|
||||
}
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
@@ -384,7 +432,6 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
|
||||
-(void)xPNewHomePartyTableViewCell:(XPNewHomePartyTableViewCell *_Nullable)cell didSelectChat:(HomePlayRoomModel *_Nonnull)roomModel{
|
||||
if(roomModel.inMic == YES){
|
||||
[XPRoomViewController openRoom:roomModel.inRoomUid fromNick:roomModel.nick fromType:UserEnterRoomFromType_Follow_User fromUid:roomModel.uid viewController:self];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,9 @@ UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@interface XPNewHomeViewController ()<JXPagerViewDelegate,JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate,XPNewHomeHeadViewDelegate,XPHomeRecommendOtherRoomViewDelegate,XPHomeRecommendViewControllerDelegate>
|
||||
|
||||
{
|
||||
NSTimer * timer;
|
||||
}
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///导航
|
||||
@@ -87,11 +89,12 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
[timer fire];
|
||||
timer = nil;
|
||||
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
@@ -99,7 +102,6 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
- (XPHomeContainerPresenter *)createPresenter {
|
||||
return [[XPHomeContainerPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
if(self.isEmpty == NO){
|
||||
@@ -107,17 +109,27 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[self initHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self addTimer];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
if (timer) {
|
||||
[timer setFireDate:[NSDate distantPast]]; //很远的过去
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if (timer) {
|
||||
//关闭定时器
|
||||
[timer setFireDate:[NSDate distantFuture]]; //很远的将来
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)tokenInvalid {
|
||||
|
||||
[[AccountInfoStorage instance] saveAccountInfo:nil];
|
||||
@@ -133,11 +145,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)addTimer {
|
||||
// PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type];
|
||||
// XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]];
|
||||
// homeVC.tagModel = tagModel;
|
||||
@kWeakify(self);
|
||||
timer = [XPWeakTimer scheduledTimerWithTimeInterval:15 block:^(id userInfo) {
|
||||
@kStrongify(self);
|
||||
PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type];
|
||||
XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]];
|
||||
homeVC.tagModel = tagModel;
|
||||
[self.recommendVC headerRefresh];
|
||||
} userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
self.type = 0;
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#F3F5FA"];
|
||||
@@ -173,17 +189,25 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
header.lastUpdatedTimeLabel.textColor = [DJDKMIMOMColor secondTextColor];
|
||||
self.pagingView.mainTableView.mj_header = header;
|
||||
[ClientConfig shareConfig].inviteCode = @"";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[self.pagingView.mainTableView.mj_header beginRefreshing];
|
||||
@kWeakify(self);
|
||||
|
||||
self.recommendVC.refreshComplete = ^{
|
||||
@kStrongify(self);
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(homeVCRefreshComplete) name:@"khomeVCRefreshComplete" object:nil];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(logOut) name:@"kInLoginVC" object:nil];
|
||||
|
||||
|
||||
}
|
||||
-(void)homeVCRefreshComplete{
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
@@ -194,10 +218,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
-(void)headerRefresh{
|
||||
[self initHttp];
|
||||
|
||||
PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type];
|
||||
XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]];
|
||||
homeVC.tagModel = tagModel;
|
||||
// if(self.titleView.index == self.tagModelList.count - 1){
|
||||
// [self.recommendVC headerRefresh];
|
||||
// }else{
|
||||
PIHomeCategoryTitleModel *tagModel = [self.tagModelList safeObjectAtIndex1:self.type];
|
||||
XPHomePartyViewController *homeVC = [self.validListDict objectForKey:[NSNumber numberWithInteger:self.type]];
|
||||
homeVC.tagModel = tagModel;
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
-(void)openRoomNotification:(NSNotification *)notification{
|
||||
@@ -231,6 +260,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kGetScaleWidth(223));
|
||||
@@ -240,18 +270,25 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
make.leading.trailing.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
|
||||
|
||||
[self.pagingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.navView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
make.leading.bottom.trailing.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)initHttp {
|
||||
|
||||
[self.presenter getHomeTopData];
|
||||
|
||||
[self requestCheckIp];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPNewHomeNavViewDelegate
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickRank:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
@@ -262,12 +299,13 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickOpenRoom:(UIButton *)sender {
|
||||
NSString* roomUid = [AccountInfoStorage instance].getUid;
|
||||
[self opRoom:roomUid];
|
||||
|
||||
}
|
||||
|
||||
-(void)opRoom:(NSString *)roomUid{
|
||||
|
||||
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 401){
|
||||
|
||||
[self tokenInvalid];
|
||||
[self showErrorToast:msg];
|
||||
return;
|
||||
@@ -287,6 +325,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[self showErrorToast:msg];
|
||||
}
|
||||
} uid:roomUid intoUid:roomUid];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickSearch:(UIView *)sender {
|
||||
@@ -327,14 +367,23 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
|
||||
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
||||
id homeV = [self.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
if (homeV) {
|
||||
return homeV;
|
||||
}
|
||||
XPHomePartyViewController *homeVC = [[XPHomePartyViewController alloc] init];
|
||||
homeVC.tagModel = [self.tagModelList safeObjectAtIndex1:index];
|
||||
[self.validListDict setObject:homeVC forKey:@(index)];
|
||||
return homeVC;
|
||||
|
||||
|
||||
|
||||
// if (index == self.tagModelList.count - 1) {
|
||||
// self.recommendVC.tagModel = [self.tagModelList safeObjectAtIndex1:index];
|
||||
// return self.recommendVC;
|
||||
// } else {
|
||||
id homeV = [self.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
if (homeV) {
|
||||
return homeV;
|
||||
}
|
||||
XPHomePartyViewController *homeVC = [[XPHomePartyViewController alloc] init];
|
||||
homeVC.tagModel = [self.tagModelList safeObjectAtIndex1:index];
|
||||
[self.validListDict setObject:homeVC forKey:@(index)];
|
||||
return homeVC;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
@@ -359,7 +408,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
if(otherGestureRecognizer.view.tag == 98777){
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
||||
}
|
||||
#pragma mark - XPHomeContainerProtocol
|
||||
@@ -376,7 +426,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
NSMutableArray *list = [NSMutableArray new];
|
||||
NSMutableArray *titleArray = [NSMutableArray array];
|
||||
for (PIHomeCategoryTitleModel *model in array) {
|
||||
if (model.isHomeRecommend == YES){
|
||||
if (model.isHomeRecommen == YES){
|
||||
[list insertObject:model atIndex:0];
|
||||
[titleArray insertObject:model.name atIndex:0];
|
||||
}else{
|
||||
@@ -403,7 +453,10 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
|
||||
|
||||
|
||||
self.type = index;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - XPNewHomeHeadViewDelegate
|
||||
|
@@ -69,6 +69,7 @@
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
} showLoading:NO errorToast:NO] uid:roomUid intoUid:uid];
|
||||
}
|
||||
|
@@ -11,19 +11,16 @@
|
||||
#import "XPRedPacketModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "ActivityInfoModel.h"
|
||||
#import "LittleGameInfoModel.h"
|
||||
|
||||
typedef void(^OpenRedPacketHandle)(XPRedPacketModel *_Nullable,RoomType type ,BOOL isChangeRoom);
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomActivityContainerView : UIView<RoomGuestDelegate>
|
||||
@property(nonatomic,copy)OpenRedPacketHandle openRedPacketHandle;
|
||||
@property(nonatomic,strong) NSMutableArray *redPacketList;
|
||||
@property(nonatomic,copy)OpenRedPacketHandle openRedPacketHandle;
|
||||
@property(nonatomic,strong) NSMutableArray<ActivityInfoModel *> *playList;
|
||||
@property(nonatomic,strong) NSMutableArray<LittleGameInfoModel *> *littleGameList;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (void)updateView;
|
||||
- (instancetype)initWithdelegate:(id<RoomHostDelegate>)delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "Api+Room.h"
|
||||
#import "Api+TreasureFairy.h"
|
||||
#import "Api+LittleGame.h"
|
||||
#import "ClientConfig.h"
|
||||
#import "NetImageView.h"
|
||||
#import "TTPopup.h"
|
||||
@@ -27,7 +26,6 @@
|
||||
#import "FirstRechargeModel.h"
|
||||
#import "TreasureFairyLimitModel.h"
|
||||
#import "XPRedPacketResultModel.h"
|
||||
|
||||
///View
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPCandyTreeViewController.h"
|
||||
@@ -41,11 +39,10 @@
|
||||
#import "PIRoomEnterRedPacketView.h"
|
||||
#import "BaseNavigationController.h"
|
||||
#import "PIRoomActivityWebView.h"
|
||||
|
||||
#import "MSRoomMenuGameVC.h"
|
||||
|
||||
#import "PIRoomActivityClickView.h"
|
||||
#import "PIRoomActivityChoosePlayView.h"
|
||||
UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
@interface XPRoomActivityContainerView ()<SDCycleScrollViewDelegate,PIRoomEnterRedPacketViewDelegate>
|
||||
@interface XPRoomActivityContainerView ()<SDCycleScrollViewDelegate,PIRoomEnterRedPacketViewDelegate,PIRoomActivityClickViewDelegate,PIRoomActivityChoosePlayViewDelegate>
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///轮播图
|
||||
@@ -53,9 +50,8 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
|
||||
///红包
|
||||
@property(nonatomic,strong) PIRoomEnterRedPacketView *redPacketView;
|
||||
|
||||
///游戏菜单按钮
|
||||
@property(nonatomic, strong) UIButton *gameMenuButton;
|
||||
///玩法
|
||||
@property(nonatomic,strong) PIRoomActivityClickView *clickPlayView;
|
||||
|
||||
///参加相亲
|
||||
@property (nonatomic,strong) UIImageView *joinDatingView;
|
||||
@@ -65,31 +61,25 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
@property (nonatomic,strong) NSMutableArray<ActivityInfoModel *> *activityList;
|
||||
///是否加载了活动
|
||||
@property (nonatomic,assign) BOOL isLoadActivity;
|
||||
|
||||
@property(nonatomic,assign) BOOL isShowChoosePlayView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomActivityContainerView
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithdelegate:(id<RoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.hostDelegate = delegate;
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
[self requestActivityList];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)updateView {
|
||||
if (self.isLoadActivity) {
|
||||
[self configLittleGameActivity];
|
||||
} else {
|
||||
[self requestActivityList];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.stackView];
|
||||
@@ -98,7 +88,9 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
[self.stackView addArrangedSubview:emptyView];
|
||||
[self.stackView addArrangedSubview:self.redPacketView];
|
||||
[self.stackView addArrangedSubview:self.joinDatingView];
|
||||
[self.stackView addArrangedSubview:self.gameMenuButton];
|
||||
[self.stackView addArrangedSubview:self.clickPlayView];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -110,76 +102,68 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
[self.pi_cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth , itemWidth));
|
||||
}];
|
||||
|
||||
[self.redPacketView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(58));
|
||||
}];
|
||||
|
||||
[self.gameMenuButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
[self.clickPlayView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(0);
|
||||
make.size.mas_equalTo(CGSizeMake(76, 76));
|
||||
make.size.mas_equalTo(CGSizeMake(81, 66));
|
||||
}];
|
||||
|
||||
|
||||
[self.joinDatingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(35 * kScreenHeightScale);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)requestActivityList {
|
||||
@kWeakify(self);
|
||||
RACSubject* playRAC = [RACSubject subject];
|
||||
RACSubject* littleGameRAC = [RACSubject subject];
|
||||
[[RACSignal combineLatest:@[playRAC, littleGameRAC]
|
||||
reduce:^id(NSArray<ActivityInfoModel*> *playModels, NSArray<LittleGameInfoModel*> *littleGameModels){
|
||||
@kStrongify(self);
|
||||
self.playList = [NSMutableArray arrayWithArray:playModels];
|
||||
self.littleGameList = [NSMutableArray arrayWithArray:littleGameModels];
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {}];
|
||||
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
|
||||
[Api roomActivityList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
@kStrongify(self);
|
||||
if (code == 200) {
|
||||
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
self.activityList = [NSMutableArray arrayWithArray:array];
|
||||
[self dealWithData];
|
||||
}
|
||||
} roomId:roomId];
|
||||
|
||||
|
||||
RACSubject* list = [RACSubject subject];
|
||||
RACSubject* play = [RACSubject subject];
|
||||
[[RACSignal combineLatest:@[list, play] reduce:^id(NSArray<ActivityInfoModel*> * listModel, NSArray<ActivityInfoModel*> * playModel){
|
||||
self.activityList = [NSMutableArray arrayWithArray:listModel];
|
||||
self.playList = [NSMutableArray arrayWithArray:playModel];
|
||||
[self dealWithData];
|
||||
return nil;
|
||||
}] subscribeError:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
[Api roomActivityList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
[list sendNext:array];
|
||||
[list sendCompleted];
|
||||
return;
|
||||
}
|
||||
[list sendError:nil];
|
||||
} roomId:roomId];
|
||||
|
||||
|
||||
[Api getPlayList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
[playRAC sendNext:array];
|
||||
[playRAC sendCompleted];
|
||||
} else {
|
||||
[playRAC sendError:nil];
|
||||
[play sendNext:array];
|
||||
[play sendCompleted];
|
||||
return;
|
||||
}
|
||||
[play sendError:nil];
|
||||
} roomId:roomId];
|
||||
|
||||
|
||||
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
[Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSArray * array = [LittleGameInfoModel modelsWithArray:data.data];
|
||||
[littleGameRAC sendNext:array];
|
||||
[littleGameRAC sendCompleted];
|
||||
} else {
|
||||
[littleGameRAC sendError:nil];
|
||||
}
|
||||
}
|
||||
roomUid:roomUid];
|
||||
|
||||
}
|
||||
-(void)dealWithData{
|
||||
self.isLoadActivity = YES;
|
||||
self.pi_cycleScrollView.hidden = NO;
|
||||
|
||||
|
||||
|
||||
if (self.hostDelegate.getRoomInfo.type == RoomType_MiniGame) {
|
||||
[self configLittleGameActivity];
|
||||
} else {
|
||||
|
||||
NSMutableArray *picArray = [NSMutableArray array];
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.icon];
|
||||
@@ -191,10 +175,25 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
} else {
|
||||
[self.pi_cycleScrollView setAutoScroll:NO];
|
||||
}
|
||||
|
||||
if(self.playList.count > 0){
|
||||
ActivityInfoModel *playModel = self.playList.firstObject;
|
||||
self.clickPlayView.model = playModel;
|
||||
// if(self.isShowChoosePlayView == NO){
|
||||
// self.clickPlayView.hidden = NO;
|
||||
// }
|
||||
}else{
|
||||
self.clickPlayView.hidden = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (void)configLittleGameActivity {
|
||||
|
||||
|
||||
NSMutableArray *list = [NSMutableArray array];
|
||||
|
||||
[list addObjectsFromArray:self.activityList];
|
||||
@@ -220,29 +219,27 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
#pragma mark - RoomGuestDelegat
|
||||
- (void)onRoomUpdate {
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
if (roomInfo.type == RoomType_Anchor || roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
self.gameMenuButton.hidden = YES;
|
||||
} else {
|
||||
self.gameMenuButton.hidden = NO;
|
||||
}
|
||||
self.redPacketView.type = roomInfo.type;
|
||||
if (roomInfo.type == RoomType_MiniGame) {
|
||||
if(self.isShowChoosePlayView == YES){
|
||||
PIRoomActivityChoosePlayView *choosePlayView = [self.hostDelegate.getSuperView viewWithTag:98021];
|
||||
self.isShowChoosePlayView = NO;
|
||||
CGFloat y = self.frame.size.height + self.frame.origin.y - 124;
|
||||
[UIView animateWithDuration:0.1 animations:^{
|
||||
choosePlayView.frame = CGRectMake(KScreenWidth, y, 201, 124);
|
||||
}completion:^(BOOL finished) {
|
||||
[choosePlayView removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
self.redPacketView.hidden = YES;
|
||||
[self.gameMenuButton removeFromSuperview];
|
||||
[self.pi_cycleScrollView removeFromSuperview];
|
||||
[self.stackView insertArrangedSubview:self.gameMenuButton atIndex:0];
|
||||
[self.stackView addArrangedSubview:self.pi_cycleScrollView];
|
||||
[self.gameMenuButton bringSubviewToFront:self.stackView];
|
||||
self.clickPlayView.hidden = YES;
|
||||
|
||||
if (self.isLoadActivity) {
|
||||
[self configLittleGameActivity];
|
||||
} else {
|
||||
[self requestActivityList];
|
||||
}
|
||||
} else {
|
||||
[self.gameMenuButton removeFromSuperview];
|
||||
[self.pi_cycleScrollView removeFromSuperview];
|
||||
[self.stackView insertArrangedSubview:self.pi_cycleScrollView atIndex:0];
|
||||
[self.stackView addArrangedSubview:self.gameMenuButton];
|
||||
self.redPacketView.redPacketList = self.redPacketList;
|
||||
NSMutableArray *picArray = [NSMutableArray array];
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
@@ -255,7 +252,16 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
} else {
|
||||
[self.pi_cycleScrollView setAutoScroll:NO];
|
||||
}
|
||||
|
||||
|
||||
if(self.playList.count > 0){
|
||||
ActivityInfoModel *playModel = self.playList.firstObject;
|
||||
self.clickPlayView.model = playModel;
|
||||
// if(self.isShowChoosePlayView == NO){
|
||||
// self.clickPlayView.hidden = NO;
|
||||
// }
|
||||
}else{
|
||||
self.clickPlayView.hidden = YES;
|
||||
}
|
||||
if (roomInfo.roomModeType == RoomModeType_Open_Blind || roomInfo.roomModeType == RoomModeType_Open_PK_Mode || roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
|
||||
if (roomInfo.roomModeType == RoomModeType_Open_PK_Mode ) {
|
||||
self.joinDatingView.image = [UIImage getLanguageImage:@"room_pk_normal_member_enter"];
|
||||
@@ -278,6 +284,9 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
} else {
|
||||
self.joinDatingView.hidden = YES;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(self.openRedPacketHandle){
|
||||
@@ -366,7 +375,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
fairyVC.roomUid =[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
fairyVC.view.frame = CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight);
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC addChildViewController:fairyVC];
|
||||
// [fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[fairyVC.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.view addSubview:fairyVC.view];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
|
||||
@@ -400,10 +409,12 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}
|
||||
|
||||
-(void)jumpPlayActionWithIndex:(NSInteger)index imageUrlList:(NSArray *)imageUrlList{
|
||||
|
||||
if (imageUrlList.count > index) {
|
||||
NSString *pic = imageUrlList[index];
|
||||
NSMutableArray *inftList = [NSMutableArray array];
|
||||
NSMutableArray *modelList = [NSMutableArray array];
|
||||
[modelList addObjectsFromArray:self.playList];
|
||||
[modelList addObjectsFromArray:self.activityList];
|
||||
ActivityInfoModel * info;
|
||||
for (int i = 0 ; i < modelList.count; i++) {
|
||||
@@ -411,7 +422,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
if([getInfo.icon isEqualToString:pic]){
|
||||
info = getInfo;
|
||||
}
|
||||
if(getInfo.skipType == 3){
|
||||
if(getInfo.skipType == 3 && i > self.playList.count){
|
||||
[inftList addObject:getInfo];
|
||||
}
|
||||
}
|
||||
@@ -438,22 +449,25 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
|
||||
}];
|
||||
}else {
|
||||
// if(index < self.playList.count){
|
||||
// if(info.showType == ActivityShowType_Half){
|
||||
// XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
// webView.isPlayView = YES;
|
||||
// webView.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
// webView.url = info.skipContent;
|
||||
// [TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||
// return;
|
||||
// }
|
||||
// XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
// webVC.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
// webVC.url = info.skipContent;
|
||||
// [self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
if(index < self.playList.count){
|
||||
|
||||
if(info.showType == ActivityShowType_Half){
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
webView.isPlayView = YES;
|
||||
webView.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
webView.url = info.skipContent;
|
||||
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||
return;
|
||||
}
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
webVC.url = info.skipContent;
|
||||
[self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (info.skipType == ActivitySkipType_Room) {
|
||||
[self.hostDelegate exitRoom];
|
||||
|
||||
@@ -490,6 +504,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)firstRechargeTapRecognizer {
|
||||
@@ -529,20 +544,30 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
XPSailingViewController * sailingVC = [[XPSailingViewController alloc] initWithRoomUid:roomUid];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:sailingVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)didTapGameMenuButton {
|
||||
MSRoomMenuGameVC *vc = [[MSRoomMenuGameVC alloc] initWithDelegate:self.hostDelegate roomMenuType:MSRoomMenuTypeLittleGame];
|
||||
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark- PIRoomEnterRedPacketViewDelegate
|
||||
-(void)openRedPacketWithModel:(XPRedPacketModel *)redModel{
|
||||
-(void)openRedPacketWtihModel:(XPRedPacketModel *)redModel{
|
||||
if(self.openRedPacketHandle){
|
||||
self.openRedPacketHandle(redModel,self.hostDelegate.getRoomInfo.type,NO);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - PIRoomActivityClickViewDelegate
|
||||
- (void)showChoosePlayViewAction{
|
||||
self.clickPlayView.hidden = YES;
|
||||
self.isShowChoosePlayView = YES;
|
||||
|
||||
PIRoomActivityChoosePlayView *choosePlayView = [[PIRoomActivityChoosePlayView alloc]initWithFrame:CGRectZero];
|
||||
choosePlayView.delegate = self;
|
||||
choosePlayView.playList = self.playList;
|
||||
CGFloat y = self.frame.size.height + self.frame.origin.y - 124;
|
||||
choosePlayView.tag = 98021;
|
||||
[self.hostDelegate.getSuperView addSubview:choosePlayView];
|
||||
choosePlayView.frame = isMSRTL() ? CGRectMake(-201, y, 201, 124) : CGRectMake(KScreenWidth, y, 201, 124);
|
||||
|
||||
[UIView animateWithDuration:0.1 animations:^{
|
||||
|
||||
choosePlayView.frame = isMSRTL() ? CGRectMake(15, y, 201, 124) : CGRectMake(KScreenWidth - 201, y, 201, 124);
|
||||
}];
|
||||
}
|
||||
-(void)clickPlayTypeWithModel:(ActivityInfoModel *)model{
|
||||
if ([model.code isEqualToString:@"FIND_LOVE"]) {
|
||||
[self lookLoveTapRecognizer];
|
||||
@@ -577,7 +602,20 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
[self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark- PIRoomActivityChoosePlayViewDelegate
|
||||
-(void)choosePlayTypeWithView:(PIRoomActivityChoosePlayView *)view model:(ActivityInfoModel *)model{
|
||||
[self clickPlayTypeWithModel:model];
|
||||
}
|
||||
-(void)hiddenViewActionWithView:(PIRoomActivityChoosePlayView *)view{
|
||||
self.isShowChoosePlayView = NO;
|
||||
CGFloat y = self.frame.size.height + self.frame.origin.y - 124;
|
||||
[UIView animateWithDuration:0.1 animations:^{
|
||||
view.frame = isMSRTL() ? CGRectMake(-201, y, 201, 124) : CGRectMake(KScreenWidth, y, 201, 124);
|
||||
}completion:^(BOOL finished) {
|
||||
// self.clickPlayView.hidden = NO;
|
||||
[view removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (SDCycleScrollView *)pi_cycleScrollView {
|
||||
if (!_pi_cycleScrollView) {
|
||||
@@ -599,10 +637,14 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
for (UIView *subView in _pi_cycleScrollView.subviews) {
|
||||
subView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
||||
}
|
||||
|
||||
}
|
||||
return _pi_cycleScrollView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
@@ -610,10 +652,14 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentCenter;
|
||||
_stackView.spacing = 0;
|
||||
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (UIImageView *)joinDatingView {
|
||||
if (!_joinDatingView) {
|
||||
_joinDatingView = [[UIImageView alloc] init];
|
||||
@@ -634,6 +680,10 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
return _activityList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- (PIRoomEnterRedPacketView *)redPacketView{
|
||||
if(!_redPacketView){
|
||||
_redPacketView = [[PIRoomEnterRedPacketView alloc]initWithFrame:CGRectZero];
|
||||
@@ -642,17 +692,13 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}
|
||||
return _redPacketView;
|
||||
}
|
||||
|
||||
- (UIButton *)gameMenuButton {
|
||||
if (!_gameMenuButton) {
|
||||
UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[b setImage:[UIImage imageNamed:@"ms_room_game_button"] forState:UIControlStateNormal];
|
||||
[b addTarget:self action:@selector(didTapGameMenuButton) forControlEvents:UIControlEventTouchUpInside];
|
||||
b.hidden = YES;
|
||||
_gameMenuButton = b;
|
||||
- (PIRoomActivityClickView *)clickPlayView{
|
||||
if(!_clickPlayView){
|
||||
_clickPlayView = [[PIRoomActivityClickView alloc]initWithFrame:CGRectZero];
|
||||
_clickPlayView.hidden = YES;
|
||||
_clickPlayView.delegate = self;
|
||||
}
|
||||
return _gameMenuButton;
|
||||
return _clickPlayView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.emptyImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.addButton];
|
||||
|
@@ -224,8 +224,7 @@ UIKIT_EXTERN NSString * kRoomBackMusicCaptureVolumeKey;
|
||||
}
|
||||
|
||||
#pragma mark - XPRoomMusicLibraryEmptyTableViewCellDelegate
|
||||
- (void)xPRoomMusicLibraryEmptyTableViewCell:(XPRoomMusicLibraryEmptyTableViewCell *)cell
|
||||
didClickAdd:(UIButton *)sender {
|
||||
- (void)xPRoomMusicLibraryEmptyTableViewCell:(XPRoomMusicLibraryEmptyTableViewCell *)cell didClickAdd:(UIButton *)sender {
|
||||
XPRoomTransferMusicViewController * transferVC = [[XPRoomTransferMusicViewController alloc] init];
|
||||
[self.navigationController pushViewController:transferVC animated:YES];
|
||||
}
|
||||
|
@@ -22,9 +22,6 @@
|
||||
#import "NSArray+Safe.h"
|
||||
///Model
|
||||
#import "Music+CoreDataClass.h"
|
||||
|
||||
static NSInteger spacing = 47 * 2;
|
||||
|
||||
@interface XPRoomTransferMusicViewController ()<MyHTTPConnectionDelegate>
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
@@ -43,10 +40,9 @@ static NSInteger spacing = 47 * 2;
|
||||
///描述
|
||||
@property (nonatomic,strong) UILabel *descriptionLabel;
|
||||
///歌曲的数量
|
||||
@property (nonatomic,strong) UIButton *musicCountButton;
|
||||
@property (nonatomic,strong) UIButton *musiceCountButton;
|
||||
///保存
|
||||
@property (nonatomic,strong) UIButton *saveButton;
|
||||
@property (nonatomic,strong) UIButton *copyButton;
|
||||
@property (nonatomic,strong) HTTPServer *httpServer;
|
||||
@property (strong, nonatomic) NSString *ipAddress;
|
||||
///歌曲的个数
|
||||
@@ -75,10 +71,9 @@ static NSInteger spacing = 47 * 2;
|
||||
[self.stackView addArrangedSubview:self.singleTypeLabel];
|
||||
[self.stackView addArrangedSubview:self.computerImageView];
|
||||
[self.stackView addArrangedSubview:self.descriptionLabel];
|
||||
[self.stackView addArrangedSubview:self.musicCountButton];
|
||||
[self.stackView addArrangedSubview:self.musiceCountButton];
|
||||
[self.stackView addArrangedSubview:self.saveButton];
|
||||
[self.stackView addArrangedSubview:self.copyButton];
|
||||
|
||||
|
||||
[self.wifiView addSubview:self.wifiImaegView];
|
||||
[self.wifiView addSubview:self.wifiLabel];
|
||||
}
|
||||
@@ -108,7 +103,7 @@ static NSInteger spacing = 47 * 2;
|
||||
}];
|
||||
|
||||
[self.ipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(KScreenWidth - spacing);
|
||||
make.width.mas_equalTo(KScreenWidth - 47 * 2);
|
||||
}];
|
||||
|
||||
[self.singleTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -120,20 +115,16 @@ static NSInteger spacing = 47 * 2;
|
||||
}];
|
||||
|
||||
[self.descriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(KScreenWidth - spacing);
|
||||
make.width.mas_equalTo(KScreenWidth - 47 * 2);
|
||||
}];
|
||||
|
||||
[self.musicCountButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.musiceCountButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(178, 35));
|
||||
}];
|
||||
|
||||
[self.saveButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(KScreenWidth - spacing, 45));
|
||||
make.size.mas_equalTo(CGSizeMake(KScreenWidth - 47* 2, 45));
|
||||
}];
|
||||
|
||||
[self.copyButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(KScreenWidth - spacing, 45));
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)monitorNet {
|
||||
@@ -149,7 +140,7 @@ static NSInteger spacing = 47 * 2;
|
||||
self.ipAddress = YMLocalizedString(@"XPRoomTransferMusicViewController3");
|
||||
self.wifiLabel.text = YMLocalizedString(@"XPRoomTransferMusicViewController2");
|
||||
} else {
|
||||
self.ipAddress = [NSString stringWithFormat:@"http://%@:%d/?lang=%@",[SJXCSMIPHelper deviceIPAddress],[self.httpServer listeningPort],[NSBundle getLanguageText]];
|
||||
self.ipAddress = [NSString stringWithFormat:@"http://%@:%d/?lang=%@",[SJXCSMIPHelper deviceIPAdress],[self.httpServer listeningPort],[NSBundle getLanguageText]];
|
||||
self.wifiLabel.text = YMLocalizedString(@"XPRoomTransferMusicViewController5");
|
||||
}
|
||||
self.ipLabel.text = self.ipAddress;
|
||||
@@ -245,7 +236,7 @@ static NSInteger spacing = 47 * 2;
|
||||
[[XPCoreDataManager shareInstance] save];
|
||||
dispatch_main_sync_safe(^{
|
||||
self.numberSong++;
|
||||
[self.musicCountButton setTitle:[NSString stringWithFormat:YMLocalizedString(@"XPRoomTransferMusicViewController13"), self.numberSong] forState:UIControlStateNormal];
|
||||
[self.musiceCountButton setTitle:[NSString stringWithFormat:YMLocalizedString(@"XPRoomTransferMusicViewController13"), self.numberSong] forState:UIControlStateNormal];
|
||||
self.currentMusic = nil;
|
||||
});
|
||||
}
|
||||
@@ -266,13 +257,6 @@ static NSInteger spacing = 47 * 2;
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)didTapCopyButton {
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
pasteboard.string = self.ipLabel.text;
|
||||
|
||||
[self showSuccessToast:YMLocalizedString(@"XPRoomTransferMusicViewController20")];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
@@ -357,31 +341,17 @@ static NSInteger spacing = 47 * 2;
|
||||
return _descriptionLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)musicCountButton {
|
||||
if (!_musicCountButton) {
|
||||
_musicCountButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_musicCountButton setTitle:YMLocalizedString(@"XPRoomTransferMusicViewController17") forState:UIControlStateNormal];
|
||||
[_musicCountButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_musicCountButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[_musicCountButton setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.4]];
|
||||
_musicCountButton.layer.masksToBounds = YES;
|
||||
_musicCountButton.layer.cornerRadius = 35/2;
|
||||
- (UIButton *)musiceCountButton {
|
||||
if (!_musiceCountButton) {
|
||||
_musiceCountButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_musiceCountButton setTitle:YMLocalizedString(@"XPRoomTransferMusicViewController17") forState:UIControlStateNormal];
|
||||
[_musiceCountButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_musiceCountButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[_musiceCountButton setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.4]];
|
||||
_musiceCountButton.layer.masksToBounds = YES;
|
||||
_musiceCountButton.layer.cornerRadius = 35/2;
|
||||
}
|
||||
return _musicCountButton;
|
||||
}
|
||||
|
||||
- (UIButton *)copyButton {
|
||||
if (!_copyButton) {
|
||||
_copyButton = [[UIButton alloc] init];
|
||||
[_copyButton setTitle:YMLocalizedString(@"XPRoomTransferMusicViewController19") forState:UIControlStateNormal];
|
||||
[_copyButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
_copyButton.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[_copyButton addTarget:self action:@selector(didTapCopyButton) forControlEvents:UIControlEventTouchUpInside];
|
||||
_copyButton.layer.cornerRadius = 45/2;
|
||||
_copyButton.layer.masksToBounds = YES;
|
||||
[_copyButton setBackgroundColor:[DJDKMIMOMColor alertBackgroundColor]];
|
||||
}
|
||||
return _copyButton;
|
||||
return _musiceCountButton;
|
||||
}
|
||||
|
||||
- (UIButton *)saveButton {
|
||||
|
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPRoomFunctionContainerView : UIView <RoomGuestDelegate>
|
||||
///是否第一次更新在线人数
|
||||
@property(nonatomic,assign) BOOL isFirstUpdate;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (instancetype)initWithdelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (void)hiddenSudGamePostionView;
|
||||
///获取当前的音乐
|
||||
- (Music *)getCurrentMusic;
|
||||
|