Skip to content

Commit 7727b64

Browse files
committed
Merge pull request #1 from stevemoser/super-unwind-segue
Fix unwind segues that don’t have to do with anchoring to the left or ri...
2 parents 6733c44 + b5e391f commit 7727b64

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ECSlidingViewController/ECSlidingViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ - (BOOL)shouldAutomaticallyForwardRotationMethods {
200200
}
201201

202202
- (UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier {
203+
if (!([self.underLeftViewController isMemberOfClass:[toViewController class]] || [self.underRightViewController isMemberOfClass:[toViewController class]])) {
204+
return [super segueForUnwindingToViewController:toViewController fromViewController:fromViewController identifier:identifier];
205+
}
203206
ECSlidingSegue *unwindSegue = [[ECSlidingSegue alloc] initWithIdentifier:identifier source:fromViewController destination:toViewController];
204207
[unwindSegue setValue:@YES forKey:@"isUnwinding"];
205208
return unwindSegue;

0 commit comments

Comments
 (0)