views:

273

answers:

1

I've an application in which each row contains an uiimageview and an uibutton. I have created them using custom cells, uitableviewcells. The button is to trigger the method, uiimagepickercontroller to pick an image from the library and show it in the imageview. I need that any user who uses the application can rearrange the rows as they wish so that they decide the order of the photos. code here

A: 

Reordering of rows in a tableview is pretty straightforward, you just need to implement a few methods of the UITableViewDataSource Protocol and your good to go. Have a look at the Table View Programming Guide for info & code.

http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/TableView%5FiPhone/ManageReorderRow/ManageReorderRow.html

You could show an Edit button in the navigation bar if your using a navigation controller, which switches the table view to edit mode, causing the reordering control to be shown. This edit button could be changed to done, once the table is in edit mode of course. Don't forget to set the showsReorderControl property of the cell to YES. From then on, it's just a matter of implementing the right methods.

Yannick Compernol
have u seen the code for me? it seems to be very much complicated for me..
Nithin
Yannick Compernol