I am having table view in my iPhone application. The requirement is that I have to use gestures for that table view so that when user tap+hold on a row then a dialogue box should come up confirming user to save the data of that specific row to iPhone core data or nsuserdefaults.
I want to know that what option would be the best to save the data i.e., core data or nsuserdefaults?
And the most important How can I achieve it?
I need any example or code snippet to get accomplish this…
thanx
I would go for NSUserDefault if I am sure that will be no more than 10-20 rows of data, otherwise I would go for CoreData so it can be scaled in the future. I would use the LongPressGestureRecognizer in the cell to get the indexPath of the cell and display the dialog as shown in sample code below.