Top "Nsattributedstring" 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.

UITextView linkTextAttributes font attribute not applied to NSAttributedString

I have an NSAttributedString generated from HTML which includes some links. The attributed string is shown in a UITextView. I …

swift uitextview nsattributedstring
Swift NSAttributedString custom fonts

I've read around for different solutions but nothing seems to work. This code creates a nil exception: [NSFontAttributeName: UIFont(name: "…

ios swift nsattributedstring custom-font
NSAttributedString, change the font overall BUT keep all other attributes?

Say I have an NSMutableAttributedString . The string has a varied mix of formatting throughout: Here is an example: This string …

swift nsattributedstring
NSMutableAttributedStrings - objectAtIndex:effectiveRange:: Out of bounds

I'm trying to add some fancy text to a label, but I've run into some problems with the NSMutableAttributedString class. …

objective-c macos nsattributedstring nsrange
How do i convert NSAttributedString into HTML string?

As the title tells,now i can simple convert HTML into NSAttributedString with initWithHTML:documentAttributes: , but what i want to …

html cocoa nsattributedstring
What is the equivalent of NSLineBreakMode in iOS 7 attributed strings drawing methods?

There was a method - (CGSize)drawInRect:(CGRect)rect withFont:(UIFont *)font lineBreakMode:(NSLineBreakMode)lineBreakMode alignment:(NSTextAlignment)alignment; which I …

ios nsstring uikit nsattributedstring
NSTextView and NSAttributedString

I'm trying to stick an attributed string into my NSTextView, but it's just showing as plain text, no attributes. I …

cocoa nstextview nsattributedstring
UILabel appearance font and attributed string font

In my app I have a global custom font applied to all labels like so: UIFont *font = [UIFont fontWithName:kMyFontName …

ios objective-c uilabel nsattributedstring uiappearance
CoreText and strikethrough on iPhone

I'm currently struggling with the need to display strikethrough text in many UITableViewCells. Something that written in HTML would looke …

iphone ios nsattributedstring strikethrough core-text
Add a tap gesture to a part of a UILabel

I have a NSAttributedString like so: NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"testing it out @clickhere"]; NSInteger length = str.length; [str …

ios iphone uilabel nsattributedstring uitapgesturerecognizer