app年龄,星座,寻爱飘屏优化
This commit is contained in:
@@ -54,7 +54,10 @@
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.backImageView);
|
||||
make.top.bottom.equalTo(self.backImageView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(84));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(70.5));
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -74,35 +77,36 @@
|
||||
if(giftInfo.nick.length > 5){
|
||||
giftInfo.nick = [NSString stringWithFormat:@"%@...",[giftInfo.nick substringToIndex:5]];
|
||||
}
|
||||
CGFloat fontSize = self.isMaxLargeGift ? 20 : 12;
|
||||
CGFloat fontSize = self.isMaxLargeGift ? 12 : 12;
|
||||
[attribute appendAttributedString:[self createAttribute:YMLocalizedString(@"XPRoomCandyGiftView0") color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:UIColorFromRGB(0xFEF23E) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:UIColorFromRGB(0xFFE44E) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:YMLocalizedString(@"XPRoomCandyGiftView1") color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:UIColorFromRGB(0x00EAFF) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:UIColorFromRGB(0xFFE44E) fontSize:fontSize]];
|
||||
if (giftInfo.prizeNum > 1) {
|
||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:UIColorFromRGB(0x00EAFF) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
}
|
||||
|
||||
self.titleLabel.attributedText = attribute;
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
if (self.isMaxLargeGift) {
|
||||
self.backImageView.hidden = YES;
|
||||
self.candyTreeView.hidden = NO;
|
||||
@kWeakify(self);
|
||||
NSString * anatomiser1Name = [NSString stringWithFormat:@"%@/candyTree_banner.svga", API_Image_URL];
|
||||
[self.parser parseWithURL:[NSURL URLWithString:anatomiser1Name] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
|
||||
[self.parser parseWithNamed:@"pi_room_game_fine_love" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.candyTreeView.loops = 1;
|
||||
self.candyTreeView.loops = 2;
|
||||
self.candyTreeView.clearsAfterStop = NO;
|
||||
self.candyTreeView.videoItem = videoItem;
|
||||
[self.candyTreeView setAttributedText:attribute forKey:@"noble_text_tx"];
|
||||
[self.candyTreeView startAnimation];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
} else {
|
||||
self.backImageView.hidden = NO;
|
||||
self.candyTreeView.hidden = YES;
|
||||
self.titleLabel.attributedText = attribute;
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,6 +140,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.numberOfLines = 2;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user