Permalink
Browse files

Merge pull request #695 from kosher-penguin/ios-3.1

iOS 3.1 compatibility changes
  • Loading branch information...
2 parents f371d14 + b032b73 commit 1135b5754cb69affff73c2ee7e9abd1d983cc77e Adar Porat committed Jan 9, 2012
View
3 src/Three20UI/Sources/UITableViewAdditions.m
@@ -24,6 +24,7 @@
// UICommon
#import "Three20UICommon/UIWindowAdditions.h"
+#import "Three20UICommon/TTGlobalUICommon.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -53,7 +54,7 @@ - (UIView*)indexView {
///////////////////////////////////////////////////////////////////////////////////////////////////
- (CGFloat)tableCellMargin {
if (self.style == UITableViewStyleGrouped) {
- if (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)) {
+ if (TTIsPad()) {
return 45.0;
}
else {
View
2 src/Three20UINavigator/Headers/TTBaseNavigator.h
@@ -37,7 +37,7 @@
UIViewController* _rootViewController;
NSMutableArray* _delayedControllers;
- UIPopoverController* _popoverController;
+ id _popoverController;
NSString* _persistenceKey;
TTNavigatorPersistenceMode _persistenceMode;
View
9 src/Three20UINavigator/Sources/TTBaseNavigator.m
@@ -39,6 +39,7 @@
#import "Three20Core/TTDebug.h"
#import "Three20Core/TTDebugFlags.h"
#import "Three20Core/NSDateAdditions.h"
+#import "Three20Core/TTAvailability.h"
static TTBaseNavigator* gNavigator = nil;
@@ -344,8 +345,12 @@ - (void)presentPopoverController: (UIViewController*)controller
TT_RELEASE_SAFELY(_popoverController);
}
- _popoverController = [[UIPopoverController alloc] initWithContentViewController:controller];
- _popoverController.delegate = self;
+ _popoverController = [[TTUIPopoverControllerClass() alloc] init];
+ if (_popoverController != nil) {
+ [_popoverController setContentViewController:controller];
+ [_popoverController setDelegate:self];
+ }
+
if (nil != sourceButton) {
[_popoverController presentPopoverFromBarButtonItem: sourceButton
permittedArrowDirections: UIPopoverArrowDirectionAny

0 comments on commit 1135b57

Please sign in to comment.