steipete/PSStackedView — Issue #11: Remove top view controller if user slides stack to the right
Author: intruder
Created: 2011-11-23 10:48:09+00:00
State: open

It is not an issue but will be nice if there is possibility to remove the top view controller when user slides stack to the right.

I'm sure that is not the right solution but the workaround I've found is to check in handlePanFrom method if the top most view controller is completely invisible and remove it.

- (void)handlePanFrom:(UIPanGestureRecognizer *)recognizer {
....
if (lastDragOption_ == SVSnapOptionRight) {
self.floatIndex = [self nearestValidFloatIndex:self.floatIndex round:PSSVRoundDown];

if ( ![self isViewControllerVisible:self.topViewController completely:NO])
[self popViewController:self.topViewController animated:YES];
....