Underline / Bold in UITextView

Is it possible to underline or embolden certain bits of text in a UITextView?

For example my Text View has headings in it, and would like those underlined...

Random Mode In random mode, you can generate numbers...

Sweepstake Mode In sweepstake mode...

If not, what is the best way to achieve this?

Thanks

Answers


Use should use NSAttributedString... and use controllers for drawing NSAttributesString..

Controller for NSAttributedString

Note: u cant use UITextView to display a NSAttributedString

PS:From iOS6, UILabel now support NSAttributedString, you should use UILabel directly instead of OHAttributedLabel as it is now natively supported by the OS.


I believe NSAttributedString is what you're after, it's available in iOS 3.2 or later: look at this question


Need Your Help

Oracle PL/SQL - Raise User-Defined Exception With Custom SQLERRM

oracle exception plsql custom-exceptions

Is it possible to create user-defined exceptions and be able to change the SQLERRM?

Command Prompt Directory Styling

git shell command zsh prompt

I have a particular need for adjusting the command prompt. At the moment i am using Holmans Dotfiles and I want to further customize it in order to create a prompt that's more readable and clear. W...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.