I can't find an example of resetTopViewWithAnimations being used anywhere. The sample app doesn't use animations, and every forum I've seen doesn't mention how to actually implement animations using this method. Can someone explain how I would achieve a basic bounce effect (view resets to center and then bounces a few times) by using this?
https://github.com/edgecase/ECSlidingViewController
- (void)resetTopViewWithAnimations:(void(^)())animations onComplete:(void(^)())complete
{
[self topViewHorizontalCenterWillChange:self.resettedCenter];
[UIView animateWithDuration:0.25f animations:^{
if (animations) {
animations();
}
[self updateTopViewHorizontalCenter:self.resettedCenter];
} completion:^(BOOL finished) {
if (complete) {
complete();
}
[self topViewHorizontalCenterDidChange:self.resettedCenter];
}];
}