So when a user taps on a cell in my table I don't actually push to a new view controller I just reload the data inside of that tableView.
However, I want to get an effect simular to what it would look like if I did push a new view controller.
Does anybody know how I can slide old content off old content off the screen and new content onto the screen for an entire table?
Depending on how many sections you have you can use - (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
So you could do something like this:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
[tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0,[self numberOfSectionsInTableView])] withRowAnimation:UITableViewRowAnimationRight];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With