添加在故事板下划线属性部分文本的UILabel [英] Adding underline attribute to partial text UILabel in storyboard

查看:1430
本文介绍了添加在故事板下划线属性部分文本的UILabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何强调只用故事情节的UILabel 的部分文本?我能做到这一点在code和我能够强调标签的整个文本,但不只是一个或字符串中的两个词。


解决方案

  1. 选择的UILabel 并转至属性检查器部分。结果
    平原文本值更改为归属


  2. 选择您想要的文本的特定部分为下划线

    注意:如果妳想要全文为下划线选择全文。


  3. 现在右击并更改字体为下划线


它将下划线文本

How can I underline partial text of UILabel using only storyboard? I am able to do this in code and I'm able to underline the entire text of a label, but not just one or two words in the string.

解决方案

  1. select the UILabel and go to Attribute Inspector section.
    Change the text value from plain to Attributed .

  2. Select the particular part of text which you want to Underline .

    Note: If u want full text to be Underline select full text.

  3. Now right click and change the font to Underline.

It will Underline the text

这篇关于添加在故事板下划线属性部分文本的UILabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆