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.

UILabel + AutoLayout = error in baseline alignment

I'm having problem while aligning two labels. Two examples to illustrate the problem Example 1 (OK) [leftLabel setText:@"03"]; [rightLabel setText:@"Description3"]; …

ios autolayout nsattributedstring
NSAttributedString initWithData and NSHTMLTextDocumentType crash if not on main thread

calling NSAttributedString * as = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUTF8StringEncoding] options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: @(NSUTF8StringEncoding)} documentAttributes:nil error:nil]; …

ios cocoa cocoa-touch nsattributedstring nsoperationqueue
How do I uses addAttribute and NSRANGE in swift 3

Hi I'm trying to use addAttribute in Swift3. I want set bold only IDNAME. Here is what I am trying …

swift swift3 nsattributedstring nsrange addattribute
NSUnderlineStyleAttributeName Underline spacing

I want the underline to be below the text like any other normal underlining mechanism. However, with NSAttributed string it …

ios nsattributedstring underline
Storing NSAttributedString Core Data

I am trying to store an NSAttributedString to a Core Data SQL store. I have the property set as a "…

iphone objective-c core-data nsattributedstring
ios7 font size change when create nsattributedstring from html

I have a UITextView where I'm managing an NSAttributedString, initially entered as normal via the keyboard. I save the attributed …

html fonts ios7 nsattributedstring
NSAttributedString tail truncation in UILabel

I'm using ContextLabel to parse @ , # and URL's. This is the best solution i found, cause it sizes correctly and dont …

ios swift uilabel nsattributedstring hashtag
Setting NSForegroundColorAttributeName on an attributed string shifts the text down on iOS 6

I'm using attributed strings in my iOS app to give the text some style: NSDictionary *titleAttributes = @{NSFontAttributeName: [UIFont fontWithName:@"Raleway" …

ios ios6 uilabel nsattributedstring nsmutableattributedstring
iOS NSAttributedString to HTML

I have an NSAttributed string (coming from HTML) that I set for a UITextView. - (void)setHtml:(NSString *)html { NSData *…

ios objective-c uitextview nsattributedstring textkit
Different font size in the same label?

Is it possible to have different fontsize or weight in the same UILabel? I can do it in the storyboard …

ios uilabel nsattributedstring uifont