Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #566 from ralfvdz/patch-2
Browse files Browse the repository at this point in the history
Fix URL navigation within modal view controller
  • Loading branch information
jwang committed Jul 9, 2011
2 parents ad32d4d + f266876 commit a07e9d6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Three20UINavigator/Sources/TTBaseNavigator.m
Expand Up @@ -933,6 +933,16 @@ - (UIViewController*)visibleViewController {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (UIViewController*)topViewController {
UIViewController* controller = _rootViewController;

// Modal view controllers are presented (and stacked) from TTRootViewController
// Use its modalViewController when available as start to find top view controller
if (self.rootContainer != nil) {
UIViewController *modalRootController = [self.rootContainer rootViewController];
if (modalRootController.modalViewController) {
controller = modalRootController.modalViewController;
}
}

while (controller) {
UIViewController* child = controller.popupViewController;
if (!child || ![child canBeTopViewController]) {
Expand Down

0 comments on commit a07e9d6

Please sign in to comment.