修复PK预约和心愿礼物入口重叠问题
This commit is contained in:
@@ -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 addSubview:self.acrossPKCountView];
|
||||
self.acrossPKCountView.startTime = time;
|
||||
[self.acrossPKCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
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);
|
||||
}];
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
CGRect frame = self.acrossPKCountView.frame;
|
||||
frame.origin.x = 0;
|
||||
self.acrossPKCountView.frame = frame;
|
||||
}];
|
||||
[self handleAcrollPKCountView];
|
||||
}
|
||||
|
||||
- (void)handleAcrollPKCountView {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
if (roomInfo.hasOpenWishGift) {
|
||||
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_left_bg"];
|
||||
[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 - 心愿礼物
|
||||
@@ -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