Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.

Bye iOS6 #2

Open
wants to merge 1 commit into
base: FSPanes
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FSPanes/FSPanesSplitView/FSPanesSplitView.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (void)_setupView
// on the iPad in landscape width is 20 and height is 1024 :)
CGFloat statusBarHeight = MIN(CGRectGetHeight(statusBarFrame), CGRectGetWidth(statusBarFrame));

NSDictionary *metrics = @{@"spacing": [FSPanesSplitViewController isRunningIOS6] ? @0 : @(statusBarHeight)};
NSDictionary *metrics = @{@"spacing": @(statusBarHeight)};
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"|[content]|"
options:0
metrics:metrics
Expand Down
2 changes: 0 additions & 2 deletions src/FSPanes/FSPanesSplitView/FSPanesSplitViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

@interface FSPanesSplitViewController : UIViewController

+ (BOOL)isRunningIOS6;

/**
View class used by controller. Defaults to `[FSPanesSplitView class]`.
Subclasses may override this method to return their custom view classes.
Expand Down
10 changes: 0 additions & 10 deletions src/FSPanes/FSPanesSplitView/FSPanesSplitViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ @implementation FSPanesSplitViewController
@synthesize panesMenuViewController = _panesMenuViewController;
@synthesize panesNavigationController = _panesNavigationController;

+ (BOOL)isRunningIOS6
{
static NSUInteger _deviceSystemMajorVersion = -1;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_deviceSystemMajorVersion = [[[[[UIDevice currentDevice] systemVersion] componentsSeparatedByString:@"."] objectAtIndex:0] intValue];
});
return _deviceSystemMajorVersion < 7;
}

- (NSUInteger)selectedIndex
{
return [self.panesMenuViewController.menuDataSource indexOfViewController:self.panesNavigationController.rootViewController];
Expand Down