Is there any help to make selected string of text view Bold, Italic, Underline like native \"Notes\" app of iOS. Please give me helpful links. I am tired of searching for th
Take a look at NSAttributedString
. You can use that to create strings that have mixed attributes at different ranges.
In Objective-C, the mutable version, NSMutableAttributedString
has methods like setAttributes(_:range:)
that let you change the attributes of an attributed string in a specified range.
So you'd initialize an NSMutableAttributedString starting from a normal String object, and then use setAttributes(_:range:)
function to set different attributes like Bold, Italic, etc on a range of the string.
(No, I don't have sample code handy.)