相关疑难解决方法(0)

如何在标签内的单个字符串上使用多种字体样式?

我有一个由 - 组成的字符串 -

lblWithText.backgroundColor = [UIColor clearColor];
    lblWithText.textColor = [UIColor blackColor];
    lblWithText.font = [UIFont fontWithName:@"Helvetica" size:12.0];
    lblWithText.text = [NSString stringWithFormat:@"Blah1:blah-blah%d. Blah2:-%d%%", [currentCoupon.couponPrice intValue],[currentCoupon.couponDiscountPercent intValue]];
Run Code Online (Sandbox Code Playgroud)

请告诉我怎么做"Blah2: - %d %%""是Bolden?先谢谢你

iphone objective-c uilabel

-5
推荐指数
1
解决办法
1510
查看次数

标签 统计

iphone ×1

objective-c ×1

uilabel ×1