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.

Add "...Read More" to the end of UILabel

I have a UILabel and in some cases the text is longer then the UILabel itself, so I see the …

ios objective-c uilabel nsattributedstring
Replace substring of NSAttributedString with another NSAttributedString

I want to replace a substring (e.g. @"replace") of an NSAttributedString with another NSAttributedString. I am looking for an …

string cocoa replace nsattributedstring foundation
Converting a NSAttributedString into a NSString using Swift

I have a NSMutableAttributedString and want to convert it back into a simple String. var attributedString = NSMutableAttributedString(string: "hello w0…

swift string nsattributedstring nsmutableattributedstring
Swift : tap on a part of text of UILabel

I have a problem that "boundingRectForGlyphRange" always returns CGRect.zero "0.0, 0.0, 0.0, 0.0". "boundingRectForGlyphRange" is not working. For example, I am coding for …

ios swift uilabel nsattributedstring nslayoutmanager
How to add spacing to lines in NSAttributedString

I am making an app that formats screenplays, I am using a NSAttributedString to format the text entered into a …

ios nsattributedstring
centering text in a UILabel with an NSAttributedString

Going through some basic improvements to a application I am working on. Still new to the iOS swift development scene. …

ios swift uilabel nsattributedstring
Make link in UILabel.attributedText *not* blue and *not* underlined

I want some words within my OHAttributedLabel to be links, but I want them to be colors other than blue …

ios objective-c xcode nsattributedstring
Replace UITextViews text with attributed string

I have a UITextView and when the user is entering text into it, I want to format the text on …

ios uitextview core-text nsattributedstring
Change attributes of substrings in a NSAttributedString

This question may be a duplicate of this one. But the answers don't work for me and I want to …

ios objective-c replace nsattributedstring
How to get NSRange(s) for a substring in NSString?

NSString *str = @" My name is Mike, I live in California and I work in Texas. Weather in California is nice …

ios nsstring uitextview nsattributedstring nsrange