Finish 2.7.34
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
|
||||
// Constants
|
||||
static const CGFloat kBannerWidth = 346.5f;
|
||||
static const CGFloat kBannerHeight = 82.5f;
|
||||
static const CGFloat kBannerHeight = 55.0;
|
||||
static const CGFloat kBannerTopMargin = 0;// 80.0f;
|
||||
static const CGFloat kAvatarSize = 43.0f;
|
||||
static const CGFloat kAnimationDuration = 0.25f;
|
||||
static const CGFloat kDisplayDuration = 2.0f;
|
||||
static const CGFloat kRoomTransitionDelay = 2.0f;
|
||||
//static const CGFloat kAvatarSize = 43.0f;
|
||||
//static const CGFloat kAnimationDuration = 0.25f;
|
||||
//static const CGFloat kDisplayDuration = 2.0f;
|
||||
//static const CGFloat kRoomTransitionDelay = 2.0f;
|
||||
|
||||
@interface LuckyGiftWinningBannerViewModel : PIBaseModel
|
||||
|
||||
@@ -91,8 +91,8 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
#endif
|
||||
LuckyGiftWinningBannerViewModel *model = [LuckyGiftWinningBannerViewModel modelWithDictionary:attachment.data];
|
||||
|
||||
CGFloat width = kGetScaleWidth(kBannerWidth);
|
||||
CGFloat height = kGetScaleWidth(kBannerHeight);
|
||||
CGFloat width = KScreenWidth;//kGetScaleWidth(kBannerWidth);
|
||||
CGFloat height = kBannerHeight;// kGetScaleWidth(kBannerHeight);
|
||||
CGRect frame = CGRectMake(KScreenWidth, kBannerTopMargin, width, height);
|
||||
|
||||
LuckyGiftWinningBannerView *bannerView = [[LuckyGiftWinningBannerView alloc] initWithFrame:frame];
|
||||
@@ -173,23 +173,23 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
self.timesLabel.text = model.times;
|
||||
self.coinsLabel.text = model.coins;
|
||||
|
||||
if (self.coinsLabel.text.integerValue > 9999) {
|
||||
self.bigBallImageView.hidden = NO;
|
||||
} else {
|
||||
self.ballImageView.hidden = NO;
|
||||
}
|
||||
// if (self.coinsLabel.text.integerValue > 9999) {
|
||||
// self.bigBallImageView.hidden = NO;
|
||||
// } else {
|
||||
// self.ballImageView.hidden = NO;
|
||||
// }
|
||||
|
||||
[self.coinsLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
if (self.bigBallImageView.hidden == NO) {
|
||||
make.centerX.mas_equalTo(self.bigBallImageView);
|
||||
make.width.mas_lessThanOrEqualTo(self.bigBallImageView).multipliedBy(0.8);
|
||||
} else {
|
||||
make.centerX.mas_equalTo(self.ballImageView);
|
||||
make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8);
|
||||
}
|
||||
make.top.mas_equalTo(self).offset(kGetScaleWidth(18));
|
||||
make.height.mas_equalTo(kGetScaleWidth(28));
|
||||
}];
|
||||
// [self.coinsLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
// if (self.bigBallImageView.hidden == NO) {
|
||||
// make.centerX.mas_equalTo(self.bigBallImageView);
|
||||
// make.width.mas_lessThanOrEqualTo(self.bigBallImageView).multipliedBy(0.8);
|
||||
// } else {
|
||||
// make.centerX.mas_equalTo(self.ballImageView);
|
||||
// make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8);
|
||||
// }
|
||||
// make.top.mas_equalTo(self).offset(kGetScaleWidth(18));
|
||||
// make.height.mas_equalTo(kGetScaleWidth(28));
|
||||
// }];
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
@@ -230,30 +230,36 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self addSubview:self.bigBallImageView];
|
||||
[self.bigBallImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.trailing.mas_equalTo(self);
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(91));
|
||||
}];
|
||||
// [self addSubview:self.bigBallImageView];
|
||||
// [self.bigBallImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.centerY.trailing.mas_equalTo(self);
|
||||
// make.width.height.mas_equalTo(kGetScaleWidth(91));
|
||||
// }];
|
||||
|
||||
[self addSubview:self.ballImageView];
|
||||
[self.ballImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.bottom.top.mas_equalTo(self);
|
||||
make.width.mas_equalTo(self.ballImageView.mas_height);
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.trailing.mas_equalTo(self).offset(-30);
|
||||
make.width.height.mas_equalTo(59);
|
||||
}];
|
||||
|
||||
[self addSubview:self.avatarImageView];
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(8));
|
||||
make.top.mas_equalTo(kGetScaleWidth(24));
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(43));
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(36));
|
||||
if (iPhoneXSeries) {
|
||||
make.width.height.mas_equalTo(34);
|
||||
} else {
|
||||
make.width.height.mas_equalTo(29);
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
UILabel *titleLabel_1 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_0") font:kFontSemibold(14) textColor:[UIColor whiteColor]];
|
||||
[self addSubview:titleLabel_1];
|
||||
[titleLabel_1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.avatarImageView).offset(2);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(10);
|
||||
make.top.mas_equalTo(self.avatarImageView).offset(-3);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(5);
|
||||
}];
|
||||
|
||||
[self addSubview:self.giftNameLabel];
|
||||
@@ -265,8 +271,8 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
UILabel *titleLabel_2 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_4") font:kFontSemibold(14) textColor:[UIColor whiteColor]];
|
||||
[self addSubview:titleLabel_2];
|
||||
[titleLabel_2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_bottom).offset(-2);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(10);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_bottom).offset(3);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(5);
|
||||
}];
|
||||
|
||||
[self addSubview:self.timesLabel];
|
||||
@@ -285,16 +291,16 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
[self addSubview:self.coinsLabel];
|
||||
[self.coinsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.ballImageView);
|
||||
make.top.mas_equalTo(self).offset(kGetScaleWidth(18));
|
||||
make.height.mas_equalTo(kGetScaleWidth(28));
|
||||
make.top.mas_equalTo(self).offset(14);
|
||||
make.height.mas_equalTo(22);
|
||||
make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8);
|
||||
}];
|
||||
|
||||
UILabel *titleLabel_4 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_5") font:kFontSemibold(14) textColor:[UIColor whiteColor]];
|
||||
UILabel *titleLabel_4 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_5") font:kFontMedium(12) textColor:[UIColor whiteColor]];
|
||||
[self addSubview:titleLabel_4];
|
||||
[titleLabel_4 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.coinsLabel);
|
||||
make.top.mas_equalTo(self.coinsLabel.mas_bottom);
|
||||
make.top.mas_equalTo(self.coinsLabel.mas_bottom).offset(-2);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -302,7 +308,7 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
- (UIImageView *)backgroundImageView {
|
||||
if (!_backgroundImageView) {
|
||||
_backgroundImageView = [[UIImageView alloc] initWithImage:[kImage(@"luck_gift_flag") ms_SetImageForRTL]];
|
||||
_backgroundImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backgroundImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _backgroundImageView;
|
||||
}
|
||||
@@ -311,7 +317,7 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
if (!_ballImageView) {
|
||||
_ballImageView = [[UIImageView alloc] initWithImage:kImage(@"luck_gift_flag_ball")];
|
||||
_ballImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_ballImageView.hidden = YES;
|
||||
// _ballImageView.hidden = YES;
|
||||
}
|
||||
return _ballImageView;
|
||||
}
|
||||
@@ -333,7 +339,10 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.backgroundColor = [UIColor clearColor];
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[_avatarImageView setCornerRadius:kGetScaleWidth(43/2)];
|
||||
[_avatarImageView setCornerRadius: iPhoneXSeries ? 34/2 : 29/2
|
||||
corners:kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMinXMinYCorner
|
||||
borderWidth:1
|
||||
borderColor:[UIColor whiteColor]];
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
@@ -347,7 +356,7 @@ exitCurrentRoom:(void(^)(void))exit {
|
||||
|
||||
- (UILabel *)coinsLabel {
|
||||
if (!_coinsLabel) {
|
||||
_coinsLabel = [UILabel labelInitWithText:@"" font:kFontSemibold(20) textColor:UIColorFromRGB(0xffe375)];
|
||||
_coinsLabel = [UILabel labelInitWithText:@"" font:kFontSemibold(15) textColor:UIColorFromRGB(0xffe375)];
|
||||
_coinsLabel.adjustsFontSizeToFitWidth = YES;
|
||||
_coinsLabel.minimumScaleFactor = 0.5;
|
||||
_coinsLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
Reference in New Issue
Block a user