开发者

Changing font formattings of selected word/line in a UITextView

Has anyone tried to change the font formatting(bold/italic/color) of a selected word or sentence in a UITextView, like a text editor app开发者_开发技巧lication? I have been trying to do this but it seems formatting is applied only to the whole text, not on individual words or sentences.


you can change any specific word font, style and size also,

Make UITextView text to "Attributed", by default it was "Plain" and then you can perform edition on selected text.


UITextView cannot style text fragments. Styles, colors and fonts are applied to the entire text. You may wish to use a UIWebView or Core Text to render your text instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜