Tag: nsattributedstring
-
Adjust Baseline of Text Using NSAttributedString
Fix Urdu font issues in iOS
-
Strip HTML tags in Swift
There are many cases where we need to clean out text from an HTML source. Many people have solved this in their own way. But I have come across a simple solution to this problem. The solution was to use NSAttributedString with setting NSDocumentTypeDocumentAttribute to NSHTMLTextDocumentType. Let’s start with the following HTML: Below is a…