Tagged Questions

NSAttributedString objects manage character strings and associated sets of attributes (for example, font and kerning) that apply to individual characters or ranges of characters in the string. An association of characters and their attributes is called an attributed string.

Currently I'm working on an academic app, where I need to handle nearly 1000 mathematical formulas. So, I have prepared an excel sheet with all the formulas in it. Most of the formula has subscript ...

I have a UITextView and there are certain words I'm casting with NSString stringWithFormat that I'd like to be bolded.
I have looked around Stack Overflow and tried to follow the the postings but I ...

I simply want to add an objetive-c action to be called upon a tap on a certain range in my UILabel using NSAttributedString.
But I don't know how to do it. I don't want to open a URL, I just wanna to ...

I want to have the first line in an NSAttributedString for a UITextView indented from the right side on the first line.
So the firstLineHeadIndent in NSParagraphStyle will indent the first line from ...

I am assigning HTML text to NSAttributedString. This attributed string is then assigned to one of the UILabel in UitableViewCell in cellForRowAtIndexPath Method. Due to cell reuse initWithData: method ...

I am trying to emulate the pasteboard behavior of the iOS Pages and Keynote apps. In short, allowing basic NSAttributedString text formatting (i.e. BIU) to be pasted into a UITextView, but not images, ...

In iOS 8 (or possibly even in iOS 7/7.1) NSAttributedString on iOS added the ability to render text tables. This API is public on OS X but not on iOS. However, it is possible to create an attributed ...

According to the documentation (AttributedString programming guide p23) it should be possible to read Word files (and others). However, there doesn't appear to be a document type for it in the allowed ...

I am using NSAttributedstring with the attribute kCTUnderlineStyleSingle.
Character is underlining properly. But some character like g, q, p are not visible properly.
Even user cannot differentiate ...

I am writing an app that requires labels w/ musical accidental symbols, called sharp and flat (♯ and ♭, respectively). Specifically, I need a label that says c♯. It is irrelevant to the question what ...

Suppose I have a text like this: "Meet me today at 3 p.m", and I want to animate zoom the "today" part from original size to x1.2 then back (just a visual effect to attract the user attention to that ...

I have various crashes showing up in my reports that are reporting the following reason:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'failed to generate ...

I've read about this annoying bug on Stackoverflow, where if you don't make your UITextView selectable, setting the text will cause the font to reset, which is super annoying.
This seems to only work ...

As User enter some text in UITextview, User applies some operation like Bold, italic, Underline, Bullet, Background and Foreground color to the specific text.When Undo/redo operation is applied, it ...

I have an NSAttributedString below:
NSMutableAttributedString *myString = [[NSMutableAttributedString alloc] initWithString:@"This is my attributed text. Click on here to go to a new controller."];
...

What is the best way to implement a UILabel with advanced autolayout and HTML capability for iOS7 or above?
I have used a native UILabel with NSAttributedStrings and it works everything except links. ...

I have a chat application where I need to send Images(Emoticons) along with text.
Now, I can add image via NSTextAttatchment (Below Code)
NSTextAttachment *textAttachment = [[NSTextAttachment alloc] ...

I have a uilabel in tableviewcell ,and the label use NSAttributeString to support both image and text. But I found when the label contains image or text only , the height of label is correct ,but when ...

I want to draw a line before and after a string in UILabel exactly like the following image:
PS: the text is not static, so i can't tell what is the exact text width, otherwise i would put two static ...

I'm using NSAttributedString to include images in a string. However, the images are sometimes blurry like if were draw on a non-integer frame.
I tried to make sure the bound of each NSTextAttachment ...

I have an existing NSAttributedString that may include user edited attributes (i.e. Bold, Italic, Underline). I need to be able to change the base font from say Georgia to Helvetica, while maintaining ...