Skip to content

Commit 72ece41

Browse files
committed
Increase width of master view
1 parent 4d2d464 commit 72ece41

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

WorldFacts/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
=======================================================================
22
WorldFacts
33

4+
Version 3.1 25 May 2015 Increase width of split view master view
45
Version 3.0 27 Mar 2015 Add OS X application to create core data
56
Version 2.0 16 Feb 2014 Update for iOS 8 and UISearchController
67
Version 1.5 20 Feb 2013 Move core data file to App Support dir
@@ -49,6 +50,11 @@ interface to Core Data are covered in the following post:
4950

5051
useyourloaf.com/blog/2015/03/25/creating-an-os-x-core-data-helper-app.html
5152

53+
To see details on how to increase the width of the master view of the split
54+
view controller see the following post:
55+
56+
useyourloaf.com/blog/2015/05/25/change-the-width-of-master-view-in-split-view-controller.html
57+
5258
The geographic data used in this App is from GeoNames and used under
5359
the Creative Commons Attributions License (see www.geonames.org).
5460

WorldFacts/WorldFacts/UYLAppDelegate.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// WorldFacts
44
//
55
// Created by Keith Harrison http://useyourloaf.com
6-
// Copyright (c) 2012-2014 Keith Harrison. All rights reserved.
6+
// Copyright (c) 2012-2015 Keith Harrison. All rights reserved.
77
//
88
// Redistribution and use in source and binary forms, with or without
99
// modification, are permitted provided that the following conditions are met:
@@ -56,6 +56,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
5656
splitViewController.delegate = self;
5757
splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
5858

59+
CGFloat minimumWidth = MIN(CGRectGetWidth(splitViewController.view.bounds),CGRectGetHeight(splitViewController.view.bounds));
60+
splitViewController.minimumPrimaryColumnWidth = minimumWidth / 2;
61+
splitViewController.maximumPrimaryColumnWidth = minimumWidth;
62+
5963
UINavigationController *masterNavigationController = splitViewController.viewControllers[0];
6064
UYLCountryTableViewController *controller = (UYLCountryTableViewController *)masterNavigationController.topViewController;
6165
controller.managedObjectContext = self.managedObjectContext;

0 commit comments

Comments
 (0)