修复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
|
||||
|
||||
@property (nonatomic, assign) long long startTime;
|
||||
///背景
|
||||
@property (nonatomic, strong) UIImageView *backImageView;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -14,8 +14,6 @@
|
||||
|
||||
@interface XPAcrossRoomPKCountDownView()
|
||||
|
||||
///背景
|
||||
@property (nonatomic, strong) UIImageView *backImageView;
|
||||
///标题
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
///显示倒计时
|
||||
|
@@ -585,20 +585,7 @@
|
||||
} roomUid:roomUid];
|
||||
}
|
||||
if (roomInfo.showPkBeginTime && roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode) {//显示PK倒计时
|
||||
if (!self.acrossPKCountView.superview) {
|
||||
[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 handleAcrollPKCountView];
|
||||
}
|
||||
[self updateRoomTopic];
|
||||
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
|
||||
@@ -1657,19 +1644,36 @@
|
||||
if ([self.delegate getRoomInfo].roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
|
||||
return;
|
||||
}
|
||||
[self handleAcrollPKCountView];
|
||||
}
|
||||
|
||||
- (void)handleAcrollPKCountView {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
if (roomInfo.hasOpenWishGift) {
|
||||
if (!self.acrossPKCountView.superview) {
|
||||
[self addSubview:self.acrossPKCountView];
|
||||
self.acrossPKCountView.startTime = time;
|
||||
[self bringSubviewToFront:self.acrossPKCountView];
|
||||
self.acrossPKCountView.startTime = roomInfo.pkBeginTime;
|
||||
self.acrossPKCountView.backImageView.image = [UIImage imageNamed:@"acrossPK_countDown_left_bg"];
|
||||
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kNavigationHeight+4+24+4);
|
||||
make.left.mas_equalTo(0);
|
||||
make.height.mas_equalTo(52);
|
||||
make.width.mas_equalTo(52);
|
||||
make.top.mas_equalTo(self.contributeEnterView.mas_bottom).mas_offset(4);
|
||||
make.width.height.mas_equalTo(52);
|
||||
}];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
CGRect frame = self.acrossPKCountView.frame;
|
||||
frame.origin.x = 0;
|
||||
self.acrossPKCountView.frame = frame;
|
||||
}
|
||||
} 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 - 心愿礼物
|
||||
@@ -1930,7 +1934,7 @@
|
||||
|
||||
- (XPAcrossRoomPKCountDownView *)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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user