开发者

Duplicate a table row with UITableViewCellEditingStyleInsert?

开发者 https://www.devze.com 2022-12-13 05:34 出处:网络
I have an application based on the Core Data Books example, and I\'m coming to the conclusion that I need to give the user the ability to duplicate a row in the table - a set of data - and then let th

I have an application based on the Core Data Books example, and I'm coming to the conclusion that I need to give the user the ability to duplicate a row in the table - a set of data - and then let them edit this data, rather than always have them create a new record from scratch.

I was considering using the UITableViewCellEditingStyleInsert editing control to do this - the user would figure it out after one press that it duplicates an entry and does not insert a new one - since I use an "+" button in the Navigation Bar to add new records.

I cannot do this with a standard TableCell definition though - since I can only have Delete or Insert and not both, so I assume I'll have to create a custom table cell to do this.

Any other su开发者_高级运维ggestions that will not clog up the UI with a bunch of extra "stuff?" Since I already have an "Edit" button in the Navigation Bar, it seems a logical extension to the Delete action to somehow add a Copy action.

Thanks,

-t


Maybe have an editing-like state, where hitting the "+" button or whatever UI you currently have for creating a new item instead puts the table in editing mode with all Inserts instead of Deletes, with a "Add new" row, Contacts-style, at the bottom?

0

精彩评论

暂无评论...
验证码 换一张
取 消