如何使用 NSUserdefaults 在 textview 上保存文本颜色
我是iphone开发者的初学者,我的问题是如何在textview上保存textcolor。 我想在每个按钮中设置一种颜色。当我点击按钮时。按钮的颜色文本会写在文本视图上,同时也保存该功能。当我打开应用程序时,它不会丢失旧功能。那么如何解决这个问题请帮助我。
谢谢...
I am the beginner of iphone developer,my problem is how to save the textcolor on textview.
i want to taken 3buttons in each one set one color.when i tap the button.what the button had color text write on textview and at the same time save the feature also.when i open the application it does not lose the old feature.so how can solve the problem please help me.
thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以归档任何对象并将其存储在用户默认值中。设置它:
并检索它:
You can archive any object and store it in user defaults. To set it:
And to retreive it: