Skip to content
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
13 changes: 9 additions & 4 deletions Classes/MGSplitViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ - (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrienta
} else if ([_cornerViews count] == 2) {
leadingCorners = [_cornerViews objectAtIndex:0];
trailingCorners = [_cornerViews objectAtIndex:1];
}
} else {
leadingCorners = nil;
trailingCorners = nil;
}

// Configure and layout the corner-views.
leadingCorners.cornersPosition = (_vertical) ? MGCornersPositionLeadingVertical : MGCornersPositionLeadingHorizontal;
Expand Down Expand Up @@ -935,7 +938,7 @@ - (void)setViewControllers:(NSArray *)controllers
- (UIViewController *)masterViewController
{
if (_viewControllers && [_viewControllers count] > 0) {
NSObject *controller = [_viewControllers objectAtIndex:0];
UIViewController *controller = [_viewControllers objectAtIndex:0];
if ([controller isKindOfClass:[UIViewController class]]) {
return [[controller retain] autorelease];
}
Expand Down Expand Up @@ -977,7 +980,7 @@ - (void)setMasterViewController:(UIViewController *)master
- (UIViewController *)detailViewController
{
if (_viewControllers && [_viewControllers count] > 1) {
NSObject *controller = [_viewControllers objectAtIndex:1];
UIViewController *controller = [_viewControllers objectAtIndex:1];
if ([controller isKindOfClass:[UIViewController class]]) {
return [[controller retain] autorelease];
}
Expand Down Expand Up @@ -1078,7 +1081,9 @@ - (void)setDividerStyle:(MGSplitViewDividerStyle)newStyle
cornerRadius = MG_PANESPLITTER_CORNER_RADIUS;
_splitWidth = MG_PANESPLITTER_SPLIT_WIDTH;
self.allowsDraggingDivider = YES;
}
} else {
cornerRadius = 0;
}

// Update divider and corners.
[_dividerView setNeedsDisplay];
Expand Down
3 changes: 3 additions & 0 deletions MGSplitView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MGSplitView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Expand Down Expand Up @@ -235,6 +236,7 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "MGSplitView-Info.plist";
PRODUCT_NAME = MGSplitView;
RUN_CLANG_STATIC_ANALYZER = YES;
};
name = Debug;
};
Expand All @@ -248,6 +250,7 @@
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "MGSplitView-Info.plist";
PRODUCT_NAME = MGSplitView;
RUN_CLANG_STATIC_ANALYZER = YES;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down