修复PK预约和心愿礼物入口重叠问题
This commit is contained in:
22
xplan-ios/Assets.xcassets/Room/AcrossRoomPK/acrossPK_countDown_left_bg.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Room/AcrossRoomPK/acrossPK_countDown_left_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "acrossPK_countDown_left_bg@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "acrossPK_countDown_left_bg@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@interface XPAcrossRoomPKCountDownView : UIView
|
@interface XPAcrossRoomPKCountDownView : UIView
|
||||||
|
|
||||||
@property (nonatomic, assign) long long startTime;
|
@property (nonatomic, assign) long long startTime;
|
||||||
|
///背景
|
||||||
|
@property (nonatomic, strong) UIImageView *backImageView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
@interface XPAcrossRoomPKCountDownView()
|
@interface XPAcrossRoomPKCountDownView()
|
||||||
|
|
||||||
///背景
|
|
||||||
@property (nonatomic, strong) UIImageView *backImageView;
|
|
||||||
///标题
|
///标题
|
||||||
@property (nonatomic, strong) UILabel *titleLabel;
|
@property (nonatomic, strong) UILabel *titleLabel;
|
||||||
///显示倒计时
|
///显示倒计时
|
||||||
|
@@ -585,20 +585,7 @@
|
|||||||
} roomUid:roomUid];
|
} roomUid:roomUid];
|
||||||
}
|
}
|
||||||
if (roomInfo.showPkBeginTime && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode) {//显示PK倒计时
|
if (roomInfo.showPkBeginTime && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode) {//显示PK倒计时
|
||||||
if (!self.acrossPKCountView.superview) {
|
[self handleAcrollPKCountView];
|
||||||
[self addSubview:self.acrossPKCountView];
|
|
||||||
self.acrossPKCountView.startTime = roomInfo.pkBeginTime;
|
|
||||||
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.right.mas_equalTo(0);
|
|
||||||
make.top.mas_equalTo(self.contributeEnterView.mas_bottom).mas_offset(4);
|
|
||||||
make.size.mas_equalTo(CGSizeMake(52, 52));
|
|
||||||
}];
|
|
||||||
[UIView animateWithDuration:0.5 animations:^{
|
|
||||||
CGRect frame = self.acrossPKCountView.frame;
|
|
||||||
frame.origin.x = KScreenWidth-frame.size.width;
|
|
||||||
self.acrossPKCountView.frame = frame;
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
[self updateRoomTopic];
|
[self updateRoomTopic];
|
||||||
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
|
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
|
||||||
@@ -1657,19 +1644,36 @@
|
|||||||
if ([self.delegate getRoomInfo].roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
|
if ([self.delegate getRoomInfo].roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
[self addSubview:self.acrossPKCountView];
|
[self handleAcrollPKCountView];
|
||||||
self.acrossPKCountView.startTime = time;
|
}
|
||||||
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
||||||
make.left.mas_equalTo(0);
|
- (void)handleAcrollPKCountView {
|
||||||
make.height.mas_equalTo(52);
|
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||||
make.width.mas_equalTo(52);
|
if (roomInfo.hasOpenWishGift) {
|
||||||
make.top.mas_equalTo(self.contributeEnterView.mas_bottom).mas_offset(4);
|
if (!self.acrossPKCountView.superview) {
|
||||||
}];
|
[self addSubview:self.acrossPKCountView];
|
||||||
[UIView animateWithDuration:0.5 animations:^{
|
[self bringSubviewToFront:self.acrossPKCountView];
|
||||||
CGRect frame = self.acrossPKCountView.frame;
|
self.acrossPKCountView.startTime = roomInfo.pkBeginTime;
|
||||||
frame.origin.x = 0;
|
self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_left_bg"];
|
||||||
self.acrossPKCountView.frame = frame;
|
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
}];
|
make.top.mas_equalTo(kNavigationHeight+4+24+4);
|
||||||
|
make.left.mas_equalTo(0);
|
||||||
|
make.width.height.mas_equalTo(52);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!self.acrossPKCountView.superview) {
|
||||||
|
[self addSubview:self.acrossPKCountView];
|
||||||
|
[self bringSubviewToFront:self.acrossPKCountView];
|
||||||
|
self.acrossPKCountView.startTime = roomInfo.pkBeginTime;
|
||||||
|
self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_bg"];
|
||||||
|
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(kNavigationHeight+4+24+4);
|
||||||
|
make.left.mas_equalTo(KScreenWidth-52);
|
||||||
|
make.width.height.mas_equalTo(52);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - 心愿礼物
|
#pragma mark - 心愿礼物
|
||||||
@@ -1930,7 +1934,7 @@
|
|||||||
|
|
||||||
- (XPAcrossRoomPKCountDownView *)acrossPKCountView {
|
- (XPAcrossRoomPKCountDownView *)acrossPKCountView {
|
||||||
if (!_acrossPKCountView) {
|
if (!_acrossPKCountView) {
|
||||||
_acrossPKCountView = [[XPAcrossRoomPKCountDownView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight+4+22+4, 52, 52)];
|
_acrossPKCountView = [[XPAcrossRoomPKCountDownView alloc] initWithFrame:CGRectMake(-52, kNavigationHeight+4+24+4, 52, 52)];
|
||||||
}
|
}
|
||||||
return _acrossPKCountView;
|
return _acrossPKCountView;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user