Commits

Anonymous committed 1135b57 Merge

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

iOS 3.1 compatibility changes

Comments (0)

Files changed (3)

src/Three20UI/Sources/UITableViewAdditions.m

 
 // UICommon
 #import "Three20UICommon/UIWindowAdditions.h"
+#import "Three20UICommon/TTGlobalUICommon.h"
 
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 - (CGFloat)tableCellMargin {
   if (self.style == UITableViewStyleGrouped) {
-      if (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)) {
+      if (TTIsPad()) {
           return 45.0;
       }
       else {

src/Three20UINavigator/Headers/TTBaseNavigator.h

 
   UIViewController*           _rootViewController;
   NSMutableArray*             _delayedControllers;
-  UIPopoverController*        _popoverController;
+  id        _popoverController;
 
   NSString*                   _persistenceKey;
   TTNavigatorPersistenceMode  _persistenceMode;

src/Three20UINavigator/Sources/TTBaseNavigator.m

 #import "Three20Core/TTDebug.h"
 #import "Three20Core/TTDebugFlags.h"
 #import "Three20Core/NSDateAdditions.h"
+#import "Three20Core/TTAvailability.h"
 
 static TTBaseNavigator* gNavigator = nil;
 
     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