Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

iOS 3.1 compatibility changes #695

Merged
merged 2 commits into from

2 participants

@aporat

This request advances three20 iOS 3.1 compatibility (I'm using it in few of my apps)

  • Using TTUIPopoverControllerClass() function to create the UIPopController
  • Fixed a direct call to userInterfaceIdiom, which was changed to TTIsPad()

The only issue left with three20 and iOS 3.1 compatibility is the TTSplitViewController controller, which can be easily removed (or replaced)

@jwang

Ideally, the TTSplitViewController issue will go away soon with iOS 5 being released. In all likelihood I am anticipating Apple only really supporting iOS4 and 5 and dropping support for iOS3.x and below. As I understand it, there's a small subset that will be left out. Likely anyone with a 3GS that doesn't upgrade to iOS5 or the new iPhone. If there's anyone still running on a 3G at that point, it's probably not going to be many developers' target audience. This is good, I'm hoping to start dropping support slowly for older OS versions. I think I outlined them in milestones, but need to make it clearer in the Wiki.

@aporat

merged into development (1.0.11-dev)

@aporat aporat merged commit 1135b57 into facebookarchive:development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 3, 2011
  1. @aporat

    use TTisPad() instead of UIUserInterfaceIdiomPad

    aporat authored aporat committed
  2. @aporat

    TTUIPopoverControllerClass() to create UIPopoverController

    aporat authored aporat committed
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.