修复了糖果树飘屏
This commit is contained in:
@@ -54,12 +54,13 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.edges.mas_equalTo(self.backImageView);
|
make.left.right.mas_equalTo(self).inset(10);
|
||||||
|
make.top.mas_equalTo(self).offset(23);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSAttributedString *)createAttribute:(NSString * )text color:(UIColor *)color fontSize:(CGFloat)fonSize {
|
- (NSAttributedString *)createAttribute:(NSString * )text color:(UIColor *)color fontSize:(CGFloat)fonSize {
|
||||||
NSDictionary * attribute = @{NSFontAttributeName:[UIFont systemFontOfSize:fonSize], NSForegroundColorAttributeName:color};
|
NSDictionary * attribute = @{NSFontAttributeName:[UIFont systemFontOfSize:fonSize weight:UIFontWeightMedium], NSForegroundColorAttributeName:color};
|
||||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text attributes:attribute];
|
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text attributes:attribute];
|
||||||
return attr;
|
return attr;
|
||||||
}
|
}
|
||||||
@@ -71,11 +72,15 @@
|
|||||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||||
CGFloat fontSize = self.isMaxLargeGift ? 22 : 12;
|
CGFloat fontSize = self.isMaxLargeGift ? 22 : 12;
|
||||||
[attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor] fontSize:fontSize]];
|
[attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor] fontSize:fontSize]];
|
||||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:[ThemeColor messageNickColor] fontSize:fontSize]];
|
NSString * nick = giftInfo.nick;
|
||||||
[attribute appendAttributedString:[self createAttribute:@"摘下糖果得 " color:[UIColor whiteColor] fontSize:fontSize]];
|
if (nick.length > 6) {
|
||||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:[ThemeColor appEmphasizeColor] fontSize:fontSize]];
|
nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:6]];
|
||||||
|
}
|
||||||
|
[attribute appendAttributedString:[self createAttribute:nick color:[ThemeColor colorWithHexString:@"#FFF691"] fontSize:fontSize]];
|
||||||
|
[attribute appendAttributedString:[self createAttribute:@"在魔法帽中获得 " color:[UIColor whiteColor] fontSize:fontSize]];
|
||||||
|
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:[ThemeColor colorWithHexString:@"#FFF691"] fontSize:fontSize]];
|
||||||
if (giftInfo.prizeNum > 1) {
|
if (giftInfo.prizeNum > 1) {
|
||||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:[UIColor whiteColor] fontSize:fontSize]];
|
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:[ThemeColor colorWithHexString:@"#FFF691"] fontSize:fontSize]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.isMaxLargeGift) {
|
if (self.isMaxLargeGift) {
|
||||||
@@ -87,7 +92,7 @@
|
|||||||
self.candyTreeView.loops = 1;
|
self.candyTreeView.loops = 1;
|
||||||
self.candyTreeView.clearsAfterStop = NO;
|
self.candyTreeView.clearsAfterStop = NO;
|
||||||
self.candyTreeView.videoItem = videoItem;
|
self.candyTreeView.videoItem = videoItem;
|
||||||
[self.candyTreeView setAttributedText:attribute forKey:@"tgs_copywriting"];
|
[self.candyTreeView setAttributedText:attribute forKey:@"msm_copywriting"];
|
||||||
[self.candyTreeView startAnimation];
|
[self.candyTreeView startAnimation];
|
||||||
} failureBlock:^(NSError * _Nonnull error) {
|
} failureBlock:^(NSError * _Nonnull error) {
|
||||||
|
|
||||||
|
@@ -8,5 +8,9 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>Default</string>
|
<string>Default</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>com.apple.developer.associated-domains</key>
|
||||||
|
<array>
|
||||||
|
<string>applinks:f02efc69cbad775287063e8ee37733a5.share2dlink.com</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@@ -8,5 +8,9 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>Default</string>
|
<string>Default</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>com.apple.developer.associated-domains</key>
|
||||||
|
<array>
|
||||||
|
<string>applinks:f02efc69cbad775287063e8ee37733a5.share2dlink.com</string>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
Reference in New Issue
Block a user