Renaming a plist value programmatically?

半腔热情 提交于 2019-12-24 20:41:07

问题


I've got a plist and I'm loading it into a table view, what I'm trying to do is when I click on a table cell, it'll bring up a keyboard and allow me to edit the text in the table cells (hence editing the plist value)

Would anyone be able to point me in the right direction as to how to complete this?

If I drew a text field in the cell, then I could edit the text, but would anyone know how then to send that newly typed in value to the plist to update the value that was just edited?


回答1:


You have:

  1. a plist file
  2. a container (for example, NSMutableArray) in which you load this plist
  3. a table view which takes values from this container.

To modify plist through table view:

  1. change value in container
  2. write container back to plist file.


来源:https://stackoverflow.com/questions/10949993/renaming-a-plist-value-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!