0

我有一个使用 AFNetworking 从服务器加载 json 数据(文件夹数组)的应用程序。该应用程序在表格视图中显示解析的数据(文件夹),当用户滑动表格单元格时,该应用程序将三个按钮(删除、编辑、取消)添加到滑动的单元格中。

做以下事情的最佳方法是什么。

  1. 当用户点击单元格应用程序中的“编辑”按钮时,会打开新视图以编辑编辑文件夹名称。重命名文件夹后,应用程序使用 AFNetworking 将新文件夹名称保存到服务器。

  2. 当用户点击“删除”按钮时,应用程序会确认操作并从服务器中删除文件夹。

4

1 回答 1

0

Okay, set action for both buttons. You can call delegate method on view controller to Push/present a view controller where user can edit. And after taping on done, send a request to server with updated data. There should be a web page which receive and process your request. Same is for delete, but you don't need new view controller you can just handle delete button tap and send a request to the web server with id of record to be deleted. And handle delete process from the web page in the web server.

于 2013-09-25T10:31:19.137 回答