Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ECSlidingViewController Bounces Back , not Rigid #86

Closed
ghost opened this Issue Feb 14, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Feb 14, 2013

When you make the gesture for the MainECSlidingViewController to go to the leftECSlidingViewController /RightECSlidingViewController , shutter view act as rubber band. can Suggest me how to make it non rubber band or hard stop as to not expose the hidden behind the main view.

Use shouldAllowPanningPastAnchor property. Although it didn't quite work for me without tweaking.

Owner

enriquez commented Sep 12, 2013

Instead of

[self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
  CGRect frame = self.slidingViewController.topViewController.view.frame;
  self.slidingViewController.topViewController = newTopViewController;
  self.slidingViewController.topViewController.view.frame = frame;
  [self.slidingViewController resetTopView];
}];

Do this

CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = newTopViewController;
self.slidingViewController.topViewController.view.frame = frame;
[self.slidingViewController resetTopView];

Removing the call to anchorTopViewOffScreenTo:animations:onComplete: will prevent the top view from sliding off the screen. It will now replace the top view controller, then reset.

@enriquez enriquez closed this Sep 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment