PDA

View Full Version : Native Contact app : how they make the animation ?




namanhams
Jul 29, 2011, 02:28 AM
Regarding the iPhone native Contact app, when you are in a contact detail view, you click the edit, it will do some nice animation and fade into edit mode.

I'm trying to do something similar but not successful so far.
Clearly, it's not simply calling [UITableView setEditing:animated:] , because it's almost totally unrelated table in edit mode.

I also try to insert/delete row/section animated, but not successful.

Anyone can give me a hint ? Thanks.



jnoxx
Jul 29, 2011, 06:08 AM
what you are saying there is wrong.
have you tried using the self.accessor for your tableView?


- (void) setEditing:(BOOL)editing animated:(BOOL)animated
{

[super setEditing:editing animated:animated];
[self.tableView setEditing:editing animated:animated];
}

NSIndexPath *indexie = [self.tableView indexPathForSelectedRow];
NSIndexPath *index = [NSIndexPath indexPathForRow:indexie.row+1 inSection:0];
NSArray* lastIndex = [NSArray arrayWithObject:index];

[self.tableView insertRowsAtIndexPaths:lastIndex withRowAnimation:UITableViewRowAnimationTop];

ACtually you are able to find all of it on google too.