美文网首页
UILabel(下滑\删除线)

UILabel(下滑\删除线)

作者: _wxx | 来源:发表于2016-04-19 17:17 被阅读65次

    设置label中划线、下划线

    ``` python

    //设置中划线(删除线)

    NSDictionary*dic = @{NSStrikethroughStyleAttributeName:[NSNumbernumberWithInteger:NSUnderlineStyleSingle],NSFontAttributeName:KSYSTEM_FONT_12,NSForegroundColorAttributeName:KCOLOR_GRAY_LIGHT};NSString*str = [NSStringstringWithFormat:@"¥%.2f",[list.marketPricefloatValue]];NSMutableAttributedString*oldPriceAtt = [[NSMutableAttributedStringalloc] initWithString:str attributes:dic];

    //设置下划线

    NSDictionary*dic = @{NSUnderlineStyleAttributeName:[NSNumbernumberWithInteger:NSUnderlineStyleSingle]};NSMutableAttributedString*attribtStr = [[NSMutableAttributedStringalloc]initWithString:@"123"attributes:dic];

    ``` 

    相关文章

      网友评论

          本文标题:UILabel(下滑\删除线)

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