iphone - move an UITableViewCell with animation between 2 sections in a UITableView -


In an app, there is 2 sections in a UITableView, I move a UTable viewpoint from one section to another section of the aviation in UITableView I hope to do it, is it possible?

Any comment

thanks

UITableView is the answer: - (zero) insertRowsAtIndexPaths: (NSArray *) indexPaths withRowAnimation: (UITableViewRowAnimation) animation - (zero) deleteRowsAtIndexPaths: (NSArray *) indexPaths withRowAnimation: (UITableViewRowAnimation ) Animation

Then, remove the entry from the first row and add it to the second. There are many animations that you can choose from.

As an example (Sorry to do this without memory without a compiler) Beliefs: section0Data holds data for its first section, section1Data holds it for its second

  [self.section0Data removeObjectAtIndex: removeIdx]. [Self- insert section 1Object: entry on index: dot idx]; [Self.tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject: [NSIndexPath indexPathForRow: removeIdx insection: 0]] withRowAnimation: UITableViewRowAnimationFade; [Self.tableView insertRowsAtIndexPaths: [NSArray arrayWithObject: [NSIndexPath indexPathForRow: insertIdx insection: 1]] withRowAnimation: UITableViewRowAnimationFade;    

Comments