为情节提要中的部分文本 UILabel 添加下划线属性
- 作者: Kop杰拉德
- 来源: 51数据库
- 2022-12-30
问题描述
如何仅使用情节提要为 UILabel 的部分文本添加下划线?我可以在代码中执行此操作,并且可以在标签的整个文本下划线,但不仅仅是字符串中的一两个单词.
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.
推荐答案
选择 UILabel 并转到 Attribute Inspector 部分.
将文本值从 plain 更改为 Attributed .
select the UILabel and go to Attribute Inspector section.
Change the text value from plain to Attributed .
选择您想要下划线的特定文本部分.
Select the particular part of text which you want to Underline .
注意:如果您希望全文为下划线,请选择全文.
Note: If u want full text to be Underline select full text.
现在右键单击并将字体更改为下划线.
Now right click and change the font to Underline.
它将下划线文本
推荐阅读
热点文章
检查拆分键盘
0
带有“上一个"的工具栏和“下一个"用于键盘输入AccessoryView
0
Activity 启动时显示软键盘
0
UIWebView 键盘 - 摆脱“上一个/下一个/完成"酒吧
0
在 iOS7 中边缘滑动时,使键盘与 UIView 同步动画
0
我的 iOS 应用程序中的键盘在 iPhone 6 上太高了.如何在 XCode 中调整键盘的分辨率?
0
android:inputType="textEmailAddress";- '@' 键和 '.com' 键?
0
禁用 iPhone 中键盘的方向
0
Android 2.3 模拟器上的印地语键盘问题
0
keyDown 没有被调用
0
