Skip to content

Commit 6fb8b4c

Browse files
author
Edward Smith
committed
Merge branch 'staging' of ssh://github.com/BranchMetrics/ios-branch-deep-linking into QA
2 parents bece3d1 + dd5ccb6 commit 6fb8b4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Branch-SDK/Branch-SDK/BNCStrongMatchHelper.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ - (UIWindow*) keyWindow {
254254
}
255255

256256
/**
257-
Find the top view controller that is not of type UINavigationController or UITabBarController
257+
Find the top view controller that is not of type UINavigationController, UITabBarController, UISplitViewController
258258
*/
259259
- (UIViewController *)topViewController:(UIViewController *)baseViewController {
260260
if ([baseViewController isKindOfClass:[UINavigationController class]]) {
@@ -265,6 +265,10 @@ - (UIViewController *)topViewController:(UIViewController *)baseViewController {
265265
return [self topViewController: ((UITabBarController *)baseViewController).selectedViewController];
266266
}
267267

268+
if ([baseViewController isKindOfClass:[UISplitViewController class]]) {
269+
return [self topViewController: ((UISplitViewController *)baseViewController).viewControllers.firstObject];
270+
}
271+
268272
if ([baseViewController presentedViewController] != nil) {
269273
return [self topViewController: [baseViewController presentedViewController]];
270274
}

0 commit comments

Comments
 (0)