UILabel 显示多种字体。


NSDictionary
 *infoDict   = [[NSBundle mainBundle]infoDictionary];

    NSString *currentVersion = [infoDict objectForKey:@"CFBundleShortVersionString"];

    NSString *resultString = [NSString stringWithFormat:@"有更新  V%@",currentVersion];

    

    NSDictionary *tempDict = @{ NSForegroundColorAttributeName:[UIColor redColor]};

    NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:resultString];

    [attrString addAttributes:tempDict range:NSMakeRange(03)];

 

    _versionLabel.attributedText = attrString;

你可能感兴趣的:(UILabel,两种颜色,多种字体)