From d393da103f6ff1e94e8c3e3320d9d70c17703518 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Thu, 8 Mar 2012 14:39:22 +0100 Subject: [PATCH] Fix crash when initializing a popover from TTBaseNavigator The UIPopoverController designated initializer is -initWithContentViewController:. Sending -init throws an exception (tested on iOS 4.3 and 5.1). --- src/Three20UINavigator/Sources/TTBaseNavigator.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Three20UINavigator/Sources/TTBaseNavigator.m b/src/Three20UINavigator/Sources/TTBaseNavigator.m index d754a37153..594983dc0c 100644 --- a/src/Three20UINavigator/Sources/TTBaseNavigator.m +++ b/src/Three20UINavigator/Sources/TTBaseNavigator.m @@ -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]; }