Skip to content

Commit

Permalink
Fix crash when initializing a popover from TTBaseNavigator
Browse files Browse the repository at this point in the history
The UIPopoverController designated initializer is -initWithContentViewController:.
Sending -init throws an exception (tested on iOS 4.3 and 5.1).
  • Loading branch information
kemenaran committed Mar 8, 2012
1 parent e62e213 commit d393da1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Three20UINavigator/Sources/TTBaseNavigator.m
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,9 @@ - (void)presentPopoverController: (UIViewController*)controller
TT_RELEASE_SAFELY(_popoverController);
}

_popoverController = [[TTUIPopoverControllerClass() alloc] init];
_popoverController = [[TTUIPopoverControllerClass() alloc]
initWithContentViewController: controller];
if (_popoverController != nil) {
[_popoverController setContentViewController:controller];
[_popoverController setDelegate:self];
}

Expand Down

0 comments on commit d393da1

Please sign in to comment.