diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..fed559a Binary files /dev/null and b/.DS_Store differ diff --git a/Classes/MGSplitViewAppDelegate.m b/Classes/MGSplitViewAppDelegate.m index 8a70601..8db81e7 100644 --- a/Classes/MGSplitViewAppDelegate.m +++ b/Classes/MGSplitViewAppDelegate.m @@ -20,7 +20,7 @@ @implementation MGSplitViewAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Add the split view controller's view to the window and display. - [window addSubview:splitViewController.view]; + [window setRootViewController:splitViewController]; [window makeKeyAndVisible]; [rootViewController performSelector:@selector(selectFirstRow) withObject:nil afterDelay:0]; diff --git a/Classes/MGSplitViewController.m b/Classes/MGSplitViewController.m index 09ffe17..e35cd3f 100644 --- a/Classes/MGSplitViewController.m +++ b/Classes/MGSplitViewController.m @@ -424,8 +424,8 @@ - (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrienta } // Create corner views if necessary. - MGSplitCornersView *leadingCorners; // top/left of screen in vertical/horizontal split. - MGSplitCornersView *trailingCorners; // bottom/right of screen in vertical/horizontal split. + MGSplitCornersView *leadingCorners = nil; // top/left of screen in vertical/horizontal split. + MGSplitCornersView *trailingCorners = nil; // bottom/right of screen in vertical/horizontal split. if (!_cornerViews) { CGRect cornerRect = CGRectMake(0, 0, 10, 10); // arbitrary, will be resized below. leadingCorners = [[MGSplitCornersView alloc] initWithFrame:cornerRect]; @@ -507,7 +507,7 @@ - (void)viewWillAppear:(BOOL)animated [self.detailViewController viewWillAppear:animated]; _reconfigurePopup = YES; - [self layoutSubviews]; + } @@ -519,6 +519,7 @@ - (void)viewDidAppear:(BOOL)animated [self.masterViewController viewDidAppear:animated]; } [self.detailViewController viewDidAppear:animated]; + [self layoutSubviews]; } @@ -940,7 +941,7 @@ - (void)setViewControllers:(NSArray *)controllers - (UIViewController *)masterViewController { if (_viewControllers && [_viewControllers count] > 0) { - NSObject *controller = [_viewControllers objectAtIndex:0]; + id controller = [_viewControllers objectAtIndex:0]; if ([controller isKindOfClass:[UIViewController class]]) { return [[controller retain] autorelease]; } @@ -982,7 +983,7 @@ - (void)setMasterViewController:(UIViewController *)master - (UIViewController *)detailViewController { if (_viewControllers && [_viewControllers count] > 1) { - NSObject *controller = [_viewControllers objectAtIndex:1]; + id controller = [_viewControllers objectAtIndex:1]; if ([controller isKindOfClass:[UIViewController class]]) { return [[controller retain] autorelease]; } @@ -1073,7 +1074,7 @@ - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle _dividerStyle = newStyle; // Reconfigure general appearance and behaviour. - float cornerRadius; + float cornerRadius = 0.0; if (_dividerStyle == MGSplitViewDividerStyleThin) { cornerRadius = MG_DEFAULT_CORNER_RADIUS; _splitWidth = MG_DEFAULT_SPLIT_WIDTH; diff --git a/MGSplitView-Info.plist b/MGSplitView-Info.plist index 5d1d17a..e7ee989 100644 --- a/MGSplitView-Info.plist +++ b/MGSplitView-Info.plist @@ -33,5 +33,10 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + diff --git a/MGSplitView.xcodeproj/project.pbxproj b/MGSplitView.xcodeproj/project.pbxproj index b0a889d..2767074 100755 --- a/MGSplitView.xcodeproj/project.pbxproj +++ b/MGSplitView.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ isa = PBXProject; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MGSplitView" */; compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, @@ -234,6 +235,7 @@ GCC_PREFIX_HEADER = MGSplitView_Prefix.pch; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "MGSplitView-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; PRODUCT_NAME = MGSplitView; }; name = Debug; @@ -247,6 +249,7 @@ GCC_PREFIX_HEADER = MGSplitView_Prefix.pch; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = "MGSplitView-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 5.0; PRODUCT_NAME = MGSplitView; VALIDATE_PRODUCT = YES; }; diff --git a/MGSplitView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MGSplitView.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ebc0610 --- /dev/null +++ b/MGSplitView.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MGSplitView.xcodeproj/project.xcworkspace/xcuserdata/Arthur.xcuserdatad/UserInterfaceState.xcuserstate b/MGSplitView.xcodeproj/project.xcworkspace/xcuserdata/Arthur.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6c39449 Binary files /dev/null and b/MGSplitView.xcodeproj/project.xcworkspace/xcuserdata/Arthur.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/MGSplitView.xcscheme b/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/MGSplitView.xcscheme new file mode 100644 index 0000000..ad45a9c --- /dev/null +++ b/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/MGSplitView.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/xcschememanagement.plist b/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..c50a34a --- /dev/null +++ b/MGSplitView.xcodeproj/xcuserdata/Arthur.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + MGSplitView.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 1D6058900D05DD3D006BFB54 + + primary + + + + +