如何在iOS中的UITextView中添加toggleBoldface选项? [英] How to add toggleBoldface option to a UITextView in iOS?

查看:318
本文介绍了如何在iOS中的UITextView中添加toggleBoldface选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将toggleBoldface,toggleItalics和toggleUnderline添加到UITextView的编辑选项中。如何才能做到这一点?请更好地在Swift中。

I wish to add toggleBoldface, toggleItalics and toggleUnderline to the editting options of a UITextView. How can this be done? Preferrably in Swift please.

推荐答案

启用文本视图的 allowsEditingTextAttributes 属性。

Enable the text view's allowsEditingTextAttributes property.

这篇关于如何在iOS中的UITextView中添加toggleBoldface选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆