美文网首页
Label多字体

Label多字体

作者: 行走在北方 | 来源:发表于2019-05-06 15:19 被阅读0次

NSAttributedString *fenString = [[NSAttributedString alloc] initWithString:@" 积分" attributes:@{ NSFontAttributeName: App_font(12),NSForegroundColorAttributeName:kColor_333333 }];

                    NSAttributedString *pointBonusString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",[[result objectForKey:@"data"] objectForKey:@"pointPrice"]] attributes:@{ NSFontAttributeName: PBDinotFont(20),NSForegroundColorAttributeName:kColor_ff8240 }];
                    
                    NSMutableAttributedString *goodsPriceString = [[NSMutableAttributedString alloc] init];
                    [goodsPriceString appendAttributedString: pointBonusString];
                    [goodsPriceString appendAttributedString: fenString];
                    
                    wself.goodsPointPriceLabel.attributedText = goodsPriceString;

相关文章

网友评论

      本文标题:Label多字体

      本文链接:https://www.haomeiwen.com/subject/ihtdoqtx.html