All Questions

279
votes
13answers
213794 views

How do you use NSAttributedString?

Multiple colours in an NSString or NSMutableStrings are not possible. So I've heard a little about the NSAttributedString which was introduced with the iPad SDK 3.2 (or around 3.2) and is available on...
162
votes
25answers
134765 views

Create tap-able "links" in the NSAttributedString of a UILabel?

I have been searching this for hours but I've failed. I probably don't even know what I should be looking for. Many applications have text and in this text are web hyperlinks in rounded rect. When I ...
218
votes
12answers
128512 views

Bold & Non-Bold Text In A Single UILabel?

How would it be possible to include both bold and non-bold text in a uiLabel? I'd rather not use a UIWebView.. I've also read this may be possible using NSAttributedString but I have no idea how to u...
191
votes
16answers
161168 views

How do I make an attributed string using Swift?

I am trying to make a simple Coffee Calculator. I need to display the amount of coffee in grams. The "g" symbol for grams needs to be attached to my UILabel that I am using to display the amount. The ...
100
votes
9answers
90777 views

iphone/ipad: How exactly use NSAttributedString?

Yes, many people are saying about Rich Text in iPhone/iPad and many knows about NSAttributedString. But how to use NSAttributedString? I searched for much time, no extract clues for this. I know ho...
128
votes
20answers
128214 views

How to make a clickable link in an NSAttributedString for a

It's trivial to make hyperlinks clickable in a UITextView. You just set the "detect links" checkbox on the view in IB, and it detects http links and turns them into hyperlinks. However, that still m...
119
votes
13answers
74366 views

Convert HTML to NSAttributedString in iOS

I am using a instance of UIWebView to process some text and color it correctly, it gives the result as HTML but rather than displaying it in the UIWebView I want to display it using Core Text with a N...
39
votes
1answers
13026 views

NSAttributedString background color and rounded corners

I have a question regarding rounded corners and text background color for a custom UIView. Basically, I need to achieve an effect like this (image attached - notice the rounded corners on one side) i...
57
votes
12answers
45588 views

Use multiple font colors in a single label

Is there a way to use two, or even three font colors in a single label in iOS? If the text "hello, how are you" were used as an example, the "hello," would be blue, and the "how are you" would be gr...
29
votes
8answers
22423 views

Is it possible to change color of single word in UITextView and UITextField

Is it possible to change color of single word in UITextView and UITextField ? If i have typed a word with a symbol infront (eg: @word) , can it's color be changed ?

Previous Next