Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

adapter for iOS7 #90

Closed
wants to merge 1 commit into from

3 participants

@answer-huang

adapter for iOS7's statusBar。

answer-huang adapter for iOS7
adapter for iOS7's statusBar
4783d9d
@HanClinto

This works perfectly for me, thanks! I was having trouble with an unusable (blank) 20 pixel bar at the bottom of my screen in iOS7 when using MGSplitViewController, and this fixed me problem.

Thanks so very very much!

@fatuhoku

Is this issue still open then?

@HanClinto

It was still an issue for me, yes. My problems with iOS7 weren't fixed until I used this patch.

@answer-huang

It seems that the auth has not update this response for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2013
  1. adapter for iOS7

    answer-huang authored
    adapter for iOS7's statusBar
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +11 −1 Classes/MGSplitViewController.m
View
12 Classes/MGSplitViewController.m
@@ -5,6 +5,16 @@
// Created by Matt Gemmell on 26/07/2010.
// Copyright 2010 Instinctive Code.
//
+NSUInteger DeviceSystemMajorVersion() {
+ static NSUInteger _deviceSystemMajorVersion = -1;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ _deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue];
+ });
+ return _deviceSystemMajorVersion;
+}
+#define MY_MACRO_NAME (DeviceSystemMajorVersion() < 7)
+//判断 MY_MACRO_NAME 是否为YES 或者 NO
#import "MGSplitViewController.h"
#import "MGSplitDividerView.h"
@@ -247,7 +257,7 @@ - (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation
}
// Account for status bar, which always subtracts from the height (since it's always at the top of the screen).
- height -= statusBarHeight;
+ height -= (MY_MACRO_NAME?statusBarHeight:0);
return CGSizeMake(width, height);
}
Something went wrong with that request. Please try again.