糖果树UI

This commit is contained in:
fengshuo
2023-03-17 18:05:35 +08:00
parent 7587847043
commit af01a00641
4 changed files with 11 additions and 20 deletions

View File

@@ -70,11 +70,11 @@
if (candyInfo) {
CandyTreeGiftInfoModel * giftInfo = [CandyTreeGiftInfoModel modelWithDictionary:candyInfo];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
CGFloat fontSize = self.isMaxLargeGift ? 22 : 12;
CGFloat fontSize = self.isMaxLargeGift ? 26 : 13;
[attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor] fontSize:fontSize]];
NSString * nick = giftInfo.nick;
if (nick.length > 6) {
nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:6]];
if (nick.length > 10) {
nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:10]];
}
[attribute appendAttributedString:[self createAttribute:nick color:[ThemeColor colorWithHexString:@"#FFF691"] fontSize:fontSize]];
[attribute appendAttributedString:[self createAttribute:@"在魔法帽中获得 " color:[UIColor whiteColor] fontSize:fontSize]];

View File

@@ -52,6 +52,7 @@
_emptyImageView.userInteractionEnabled = YES;
_emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder];
_emptyImageView.layer.masksToBounds = YES;
_emptyImageView.hidden = YES;
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _emptyImageView;
@@ -61,7 +62,7 @@
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"暂无数据";
_titleLabel.font = [UIFont systemFontOfSize:22];
_titleLabel.font = [UIFont systemFontOfSize:11];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = [ThemeColor colorWithHexString:@"#dcc3ff"];
}

View File

@@ -128,7 +128,7 @@
if (!_secondLabel) {
_secondLabel = [[UILabel alloc] init];
_secondLabel.font = [UIFont systemFontOfSize:10];
_secondLabel.textColor = [ThemeColor colorWithHexString:@"#F8CBFF"];
_secondLabel.textColor = [UIColor whiteColor];
_secondLabel.text = @"每次许愿100%获得礼物。";
}
return _secondLabel;

View File

@@ -330,7 +330,7 @@
}];
[self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.backView).offset(7);
make.left.mas_equalTo(self.backView).offset(0);
make.bottom.mas_equalTo(self.backView).offset(-106);
make.width.mas_equalTo(150);
make.height.mas_equalTo(KitemHeight * 5);
@@ -397,16 +397,6 @@
} else {
if (self.isPicking) return;
self.isPicking = YES;
@kWeakify(self);
[self.parser parseWithNamed:@"candyTree_open" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
self.candyTreeOpenView.loops = 1;
self.candyTreeOpenView.clearsAfterStop = YES;
self.candyTreeOpenView.videoItem = videoItem;
[self.candyTreeOpenView startAnimation];
} failureBlock:^(NSError * _Nonnull error) {
}];
///
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSString * candyNumber = [NSString stringWithFormat:@"%ld", self.numberCandy];
@@ -428,10 +418,10 @@
}
#pragma mark - Getters And Setters
- (void)setIsPicking:(BOOL)isPicking {
_isPicking = isPicking;
self.pickButton.enabled = !_isPicking;
}
//- (void)setIsPicking:(BOOL)isPicking {
// _isPicking = isPicking;
// self.pickButton.enabled = !_isPicking;
//}
- (UIView *)topTapView {
if (!_topTapView) {