How to allow NSAttributedString text be typed into a UITextView?

前端 未结 2 1959
迷失自我
迷失自我 2020-12-28 22:06

I\'m trying to allow different styles of text to be typed into a UITextView, a bit like a text editor using simple attributes such as bold or italics. I understand by using

2条回答
  •  再見小時候
    2020-12-28 22:35

    This is what setTypingAttributes: is for. Set this to your attribute dictionary whenever the user presses one of your attribute buttons and new characters will pick up the requested attributes.

提交回复
热议问题