iPhone OS 语法突出显示 UITextField
我正在开发一个应用程序,希望对某些用户输入的文本应用语法突出显示。我环顾四周,有些人建议这可以在 iOS 3.2+ 中完成,但帖子似乎是在 NDA 解除之前发布的。有人对如何做到这一点有任何建议吗?
如果我能很好地实现它,我有兴趣在 github 上发布代码,因为我以前从未这样做过。
谢谢
I am working on an application and would like to apply syntax highlighting to some user-entered text. I have looked around, and some people are suggesting that this can be done in iOS 3.2+ but posts seem to be from before the NDA was lifted. Does anyone have any suggestions as to how to go about doing this?
I would be interested in releasing the code on github if I could get it implemented well, as I have never done so before.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在开发 3.2 及更高版本,则可以使用 NSAttributedString 来实现此目的。
如果您想支持早期版本,使用 UIWebView 可能是最简单的方法。
If you're developing for 3.2 and later, you can use NSAttributedString for this.
If you want to support earlier versions, using a UIWebView would probably be the easiest way.