如何仅使用情节提要为 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.
它将下划线文本
这篇关于为情节提要中的部分文本 UILabel 添加下划线属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
出现键盘时如何在iOS上调整UITextView的大小?How to resize UITextView on iOS when a keyboard appears?(出现键盘时如何在iOS上调整UITextView的大小?)
如何可靠地检测 iOS 9 上是否连接了外部键盘?How to reliably detect if an external keyboard is connected on iOS 9?(如何可靠地检测 iOS 9 上是否连接了外部键盘?)
如何在 iOS 7 上模拟键盘动画以添加“完成"数How to mimic Keyboard animation on iOS 7 to add quot;Donequot; button to numeric keyboard?(如何在 iOS 7 上模拟键盘动画以添加“完成数字键
如何关闭 iOS 键盘?How do I dismiss the iOS keyboard?(如何关闭 iOS 键盘?)
是否可以在 ios 越狱后使用外部键盘模拟触摸事件Is possible to simulate touch event using an external keyboard on ios jailbroken?(是否可以在 ios 越狱后使用外部键盘模拟触摸事件?)
如何从 iOS 应用程序上的自定义键盘检索击键?How do I retrieve keystrokes from a custom keyboard on an iOS app?(如何从 iOS 应用程序上的自定义键盘检索击键?)