├── .gitignore
├── .gitmodules
├── .travis.yml
├── IntelSplitDemo
├── Classes
│ ├── DemoDetailViewController.h
│ ├── DemoDetailViewController.m
│ ├── DemoMasterViewController.h
│ ├── DemoMasterViewController.m
│ ├── IntelSplitDemoAppDelegate.h
│ └── IntelSplitDemoAppDelegate.m
├── IntelSplitDemo-Info.plist
├── IntelSplitDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IntelSplitDemo.xccheckout
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── IntelSplitDemo.xcscheme
├── IntelSplitDemo_Prefix.pch
├── IntelSplitTests
│ ├── IntelSplitTests-Info.plist
│ ├── IntelSplitTests-Prefix.pch
│ ├── IntelSplitTests.m
│ └── en.lproj
│ │ └── InfoPlist.strings
├── Resources
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── IntelSplitDemo.storyboard
│ ├── LaunchScreen.xib
│ └── en.lproj
│ │ ├── Split-A.png
│ │ ├── Split-A@2x.png
│ │ ├── Split-B.png
│ │ ├── Split-B@2x.png
│ │ ├── Split-C.png
│ │ └── Split-C@2x.png
└── main.m
├── IntelligentSplitViewController.h
├── IntelligentSplitViewController.m
├── IntelligentSplitViewController.podspec
├── LICENSE.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.pbxuser
3 | build
4 | /IntelSplitDemo/IntelSplitDemo.xcodeproj/xcuserdata
5 | /IntelSplitDemo/IntelSplitDemo.xcodeproj/project.xcworkspace/xcuserdata
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/.gitmodules
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | before_script:
3 | - export LANG=en_US.UTF-8
4 | before_install:
5 | - brew update
6 | - brew uninstall xctool
7 | - brew install xctool
8 | - gem update cocoapods
9 | script:
10 | - xctool -project ./IntelSplitDemo/IntelSplitDemo.xcodeproj -scheme IntelSplitDemo -sdk iphonesimulator test
11 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/DemoDetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoDetailViewController.h
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 8/5/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface DemoDetailViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/DemoDetailViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoDetailViewController.m
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 8/5/14.
6 | //
7 | //
8 |
9 | #import "DemoDetailViewController.h"
10 |
11 | @interface DemoDetailViewController ()
12 | @property (nonatomic,weak) IBOutlet UILabel *viewLabel;
13 | @property (nonatomic,strong) UIPopoverController *masterPopover;
14 | @end
15 |
16 | @implementation DemoDetailViewController
17 |
18 | - (void)viewDidLoad
19 | {
20 | [super viewDidLoad];
21 | if (self.splitViewController)
22 | {
23 | self.splitViewController.delegate = self;
24 | self.viewLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Detail View in Split-%@", @""), self.splitViewController.title];
25 | }
26 | }
27 |
28 | - (void)didReceiveMemoryWarning
29 | {
30 | [super didReceiveMemoryWarning];
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 | - (BOOL)shouldAutorotate
35 | {
36 | return YES;
37 | }
38 |
39 | - (NSUInteger)supportedInterfaceOrientations
40 | {
41 | return (UIInterfaceOrientationMaskAll);
42 | }
43 |
44 | /*
45 | #pragma mark - Navigation
46 |
47 | // In a storyboard-based application, you will often want to do a little preparation before navigation
48 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
49 | {
50 | // Get the new view controller using [segue destinationViewController].
51 | // Pass the selected object to the new view controller.
52 | }
53 | */
54 |
55 | #pragma mark -
56 | #pragma mark SplitViewDelegate
57 |
58 | - (void)splitViewController: (UISplitViewController*)svc
59 | willHideViewController:(UIViewController *)aViewController
60 | withBarButtonItem:(UIBarButtonItem*)barButtonItem
61 | forPopoverController: (UIPopoverController*)pc
62 | {
63 | barButtonItem.title = @"Master View";
64 | [self.navigationItem setRightBarButtonItem:barButtonItem animated:YES];
65 | self.masterPopover = pc;
66 | }
67 |
68 |
69 | // Called when the view is shown again in the split view, invalidating the button and popover controller.
70 | - (void)splitViewController:(UISplitViewController *)svc
71 | willShowViewController:(UIViewController *)aViewController
72 | invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem
73 | {
74 | [self.navigationItem setRightBarButtonItem:nil animated:YES];
75 | self.masterPopover = nil;
76 | }
77 |
78 | - (void)splitViewController:(UISplitViewController *)svc
79 | popoverController:(UIPopoverController *)pc
80 | willPresentViewController:(UIViewController *)aViewController
81 | {
82 | if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
83 | NSLog(@"ERR_POPOVER_IN_LANDSCAPE");
84 | }
85 | }
86 |
87 | @end
88 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/DemoMasterViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoMasterViewController.h
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 8/5/14.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @interface DemoMasterViewController : UIViewController
12 |
13 | @property (nonatomic, readonly) UIViewController *detailViewController;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/DemoMasterViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoMasterViewController.m
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 8/5/14.
6 | //
7 | //
8 |
9 | #import "DemoMasterViewController.h"
10 |
11 | @interface DemoMasterViewController ()
12 |
13 | @property (nonatomic, weak) IBOutlet UILabel *viewLabel;
14 |
15 | @end
16 |
17 | @implementation DemoMasterViewController
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 |
23 | self.viewLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Master View in Split-%@", @""), self.splitViewController.title];
24 | }
25 |
26 | - (void)didReceiveMemoryWarning
27 | {
28 | [super didReceiveMemoryWarning];
29 | // Dispose of any resources that can be recreated.
30 | }
31 |
32 | - (BOOL)shouldAutorotate
33 | {
34 | return YES;
35 | }
36 |
37 | - (NSUInteger)supportedInterfaceOrientations
38 | {
39 | return (UIInterfaceOrientationMaskAll);
40 | }
41 |
42 | - (UIViewController *)detailViewController
43 | {
44 | if (!self.splitViewController || !self.splitViewController.viewControllers.count == 2)
45 | return nil;
46 | return self.splitViewController.viewControllers[1];
47 | }
48 |
49 | /*
50 | #pragma mark - Navigation
51 |
52 | // In a storyboard-based application, you will often want to do a little preparation before navigation
53 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
54 | {
55 | // Get the new view controller using [segue destinationViewController].
56 | // Pass the selected object to the new view controller.
57 | }
58 | */
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/IntelSplitDemoAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // IntelSplitDemoAppDelegate.h
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 5/22/11.
6 | // Released under the Creative Commons Attribution 3.0 Unported License
7 | // Please see the included license page for more information.
8 | //
9 |
10 | #import
11 |
12 | @class MasterViewController;
13 |
14 | @interface IntelSplitDemoAppDelegate : NSObject
15 |
16 | @property (nonatomic, strong) IBOutlet UITabBarController *tabBarController;
17 |
18 | // Convenience Methods / Accessors
19 | @property (nonatomic, readonly) UISplitViewController *splitViewController;
20 | @property (nonatomic, readonly) UIViewController *currentMasterViewController;
21 | @property (nonatomic, readonly) UINavigationController *masterNavigationController;
22 | @property (nonatomic, readonly) UINavigationController *detailNavigationController;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Classes/IntelSplitDemoAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // IntelSplitDemoAppDelegate.m
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 5/22/11.
6 | // Released under the Creative Commons Attribution 3.0 Unported License
7 | // Please see the included license page for more information.
8 | //
9 |
10 | #import "IntelSplitDemoAppDelegate.h"
11 | #import "DemoMasterViewController.h"
12 |
13 | @implementation IntelSplitDemoAppDelegate
14 | @synthesize window = _window;
15 |
16 | #pragma mark -
17 | #pragma mark Convenience Methods / Accessors
18 |
19 | ////// IPAD ONLY
20 | - (UISplitViewController *) splitViewController {
21 | if (![self.tabBarController.selectedViewController isKindOfClass:[UISplitViewController class]]) {
22 | NSLog(@"Unexpected navigation controller class in tab bar controller hierarchy, check nib.");
23 | return nil;
24 | }
25 | return (UISplitViewController *)self.tabBarController.selectedViewController;
26 | }
27 |
28 | - (UINavigationController *) masterNavigationController {
29 | UISplitViewController *split = [self splitViewController];
30 | if (split && split.viewControllers && [split.viewControllers count])
31 | return split.viewControllers[0];
32 | return nil;
33 | }
34 |
35 | - (UINavigationController *) detailNavigationController {
36 | UISplitViewController *split = [self splitViewController];
37 | if (split && split.viewControllers && [split.viewControllers count]>1)
38 | return split.viewControllers[1];
39 | return nil;
40 | }
41 |
42 | - (UIViewController *) currentMasterViewController {
43 | UINavigationController *nav = [self masterNavigationController];
44 | if (nav && nav.viewControllers && [nav.viewControllers count])
45 | return nav.viewControllers[0];
46 | return nil;
47 | }
48 |
49 | #pragma mark -
50 | #pragma mark UITabBarControllerDelegate methods
51 |
52 | - (BOOL)tabBarController:(UITabBarController *)tbc shouldSelectViewController:(UIViewController *)viewController {
53 | if (!viewController.tabBarItem.enabled)
54 | return NO;
55 |
56 | if (![viewController isEqual:tbc.selectedViewController]) {
57 | UINavigationController *nav = [self detailNavigationController];
58 | if (nav && [nav.viewControllers count]>1)
59 | [nav popToRootViewControllerAnimated:YES];
60 | }
61 |
62 | return YES;
63 | }
64 |
65 | #pragma mark -
66 | #pragma mark Setup App Tabs / Splits
67 |
68 | - (void)setupSplitViews {
69 | UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"IntelSplitDemo" bundle:[NSBundle mainBundle]];
70 | self.tabBarController = [storyboard instantiateViewControllerWithIdentifier:@"DemoTabController"];
71 | self.window.rootViewController = self.tabBarController;
72 | [self.window makeKeyAndVisible];
73 | }
74 |
75 | #pragma mark -
76 | #pragma mark Application lifecycle
77 |
78 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
79 |
80 | if (!self.window)
81 | {
82 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
83 | }
84 |
85 | [self setupSplitViews];
86 |
87 | return YES;
88 | }
89 |
90 |
91 | - (void)applicationWillResignActive:(UIApplication *)application {
92 | /*
93 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
94 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
95 | */
96 | }
97 |
98 |
99 | - (void)applicationDidBecomeActive:(UIApplication *)application {
100 | /*
101 | Restart any tasks that were paused (or not yet started) while the application was inactive.
102 | */
103 | }
104 |
105 |
106 | - (void)applicationWillTerminate:(UIApplication *)application {
107 | /*
108 | Called when the application is about to terminate.
109 | */
110 | }
111 |
112 |
113 | #pragma mark -
114 | #pragma mark Memory management
115 |
116 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
117 | /*
118 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
119 | */
120 | NSLog(@"LOW_MEMORY_WARNING");
121 | }
122 |
123 | @end
124 |
125 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.2
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.2
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | IntelSplitDemo
31 | UIMainStoryboardFile~ipad
32 | IntelSplitDemo
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationPortraitUpsideDown
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1D3623260D0F684500981E51 /* IntelSplitDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* IntelSplitDemoAppDelegate.m */; };
11 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
12 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
13 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
14 | 288765080DF74369002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765070DF74369002DB57D /* CoreGraphics.framework */; };
15 | 370A54521991586A002387DE /* DemoDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 370A54511991586A002387DE /* DemoDetailViewController.m */; };
16 | 370A545519915AB9002387DE /* DemoMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 370A545419915AB9002387DE /* DemoMasterViewController.m */; };
17 | 370A545719916F9D002387DE /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 370A545619916F9D002387DE /* Images.xcassets */; };
18 | 372BDEFE13C2CC8B00D40544 /* Split-A.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0013C2CC8B00D40544 /* Split-A.png */; };
19 | 372BDF0113C2CC9200D40544 /* Split-A@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0313C2CC9200D40544 /* Split-A@2x.png */; };
20 | 372BDF0413C2CC9800D40544 /* Split-B.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0613C2CC9800D40544 /* Split-B.png */; };
21 | 372BDF0713C2CC9C00D40544 /* Split-B@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0913C2CC9C00D40544 /* Split-B@2x.png */; };
22 | 372BDF0A13C2CCA000D40544 /* Split-C.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0C13C2CCA000D40544 /* Split-C.png */; };
23 | 372BDF0D13C2CCA300D40544 /* Split-C@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 372BDF0F13C2CCA300D40544 /* Split-C@2x.png */; };
24 | 3787FE801991373400DE814D /* IntelSplitDemo.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3787FE7F1991373400DE814D /* IntelSplitDemo.storyboard */; };
25 | 37A18D38138A14DF00ED157B /* IntelligentSplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 37A18D37138A14DF00ED157B /* IntelligentSplitViewController.m */; };
26 | 37C59F6F1A7FD7BC00336E22 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 37C59F6E1A7FD7BC00336E22 /* LaunchScreen.xib */; };
27 | 37F9AC091991741B00972304 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37F9ABF2199173FE00972304 /* XCTest.framework */; };
28 | 37F9AC0A1991741B00972304 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
29 | 37F9AC0B1991741B00972304 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
30 | 37F9AC111991741B00972304 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 37F9AC0F1991741B00972304 /* InfoPlist.strings */; };
31 | 37F9AC131991741B00972304 /* IntelSplitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 37F9AC121991741B00972304 /* IntelSplitTests.m */; };
32 | /* End PBXBuildFile section */
33 |
34 | /* Begin PBXContainerItemProxy section */
35 | 37F9AC151991741B00972304 /* PBXContainerItemProxy */ = {
36 | isa = PBXContainerItemProxy;
37 | containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
38 | proxyType = 1;
39 | remoteGlobalIDString = 1D6058900D05DD3D006BFB54;
40 | remoteInfo = IntelSplitDemo;
41 | };
42 | /* End PBXContainerItemProxy section */
43 |
44 | /* Begin PBXFileReference section */
45 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
46 | 1D3623240D0F684500981E51 /* IntelSplitDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntelSplitDemoAppDelegate.h; sourceTree = ""; };
47 | 1D3623250D0F684500981E51 /* IntelSplitDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IntelSplitDemoAppDelegate.m; sourceTree = ""; };
48 | 1D6058910D05DD3D006BFB54 /* IntelSplitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IntelSplitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
50 | 288765070DF74369002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
51 | 28A0AB4B0D9B1048005BE974 /* IntelSplitDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntelSplitDemo_Prefix.pch; sourceTree = ""; };
52 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
53 | 370A54501991586A002387DE /* DemoDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoDetailViewController.h; sourceTree = ""; };
54 | 370A54511991586A002387DE /* DemoDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoDetailViewController.m; sourceTree = ""; };
55 | 370A545319915AB9002387DE /* DemoMasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoMasterViewController.h; sourceTree = ""; };
56 | 370A545419915AB9002387DE /* DemoMasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoMasterViewController.m; sourceTree = ""; };
57 | 370A545619916F9D002387DE /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Resources/Images.xcassets; sourceTree = ""; };
58 | 372BDEFF13C2CC8B00D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-A.png"; sourceTree = ""; };
59 | 372BDF0213C2CC9200D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-A@2x.png"; sourceTree = ""; };
60 | 372BDF0513C2CC9800D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-B.png"; sourceTree = ""; };
61 | 372BDF0813C2CC9C00D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-B@2x.png"; sourceTree = ""; };
62 | 372BDF0B13C2CCA000D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-C.png"; sourceTree = ""; };
63 | 372BDF0E13C2CCA300D40544 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = "en.lproj/Split-C@2x.png"; sourceTree = ""; };
64 | 3787FE7F1991373400DE814D /* IntelSplitDemo.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = IntelSplitDemo.storyboard; path = Resources/IntelSplitDemo.storyboard; sourceTree = ""; };
65 | 37A18D36138A14DF00ED157B /* IntelligentSplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IntelligentSplitViewController.h; path = ../IntelligentSplitViewController.h; sourceTree = SOURCE_ROOT; };
66 | 37A18D37138A14DF00ED157B /* IntelligentSplitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IntelligentSplitViewController.m; path = ../IntelligentSplitViewController.m; sourceTree = SOURCE_ROOT; };
67 | 37C59F6E1A7FD7BC00336E22 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = LaunchScreen.xib; path = Resources/LaunchScreen.xib; sourceTree = ""; };
68 | 37F9ABF2199173FE00972304 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
69 | 37F9AC081991741B00972304 /* IntelSplitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntelSplitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
70 | 37F9AC0E1991741B00972304 /* IntelSplitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "IntelSplitTests-Info.plist"; sourceTree = ""; };
71 | 37F9AC101991741B00972304 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
72 | 37F9AC121991741B00972304 /* IntelSplitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IntelSplitTests.m; sourceTree = ""; };
73 | 37F9AC141991741B00972304 /* IntelSplitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IntelSplitTests-Prefix.pch"; sourceTree = ""; };
74 | 8D1107310486CEB800E47090 /* IntelSplitDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "IntelSplitDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; };
75 | /* End PBXFileReference section */
76 |
77 | /* Begin PBXFrameworksBuildPhase section */
78 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
79 | isa = PBXFrameworksBuildPhase;
80 | buildActionMask = 2147483647;
81 | files = (
82 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
83 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
84 | 288765080DF74369002DB57D /* CoreGraphics.framework in Frameworks */,
85 | );
86 | runOnlyForDeploymentPostprocessing = 0;
87 | };
88 | 37F9AC051991741B00972304 /* Frameworks */ = {
89 | isa = PBXFrameworksBuildPhase;
90 | buildActionMask = 2147483647;
91 | files = (
92 | 37F9AC091991741B00972304 /* XCTest.framework in Frameworks */,
93 | 37F9AC0B1991741B00972304 /* UIKit.framework in Frameworks */,
94 | 37F9AC0A1991741B00972304 /* Foundation.framework in Frameworks */,
95 | );
96 | runOnlyForDeploymentPostprocessing = 0;
97 | };
98 | /* End PBXFrameworksBuildPhase section */
99 |
100 | /* Begin PBXGroup section */
101 | 080E96DDFE201D6D7F000001 /* Classes */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 1D3623240D0F684500981E51 /* IntelSplitDemoAppDelegate.h */,
105 | 1D3623250D0F684500981E51 /* IntelSplitDemoAppDelegate.m */,
106 | 37A18D36138A14DF00ED157B /* IntelligentSplitViewController.h */,
107 | 37A18D37138A14DF00ED157B /* IntelligentSplitViewController.m */,
108 | 370A54501991586A002387DE /* DemoDetailViewController.h */,
109 | 370A54511991586A002387DE /* DemoDetailViewController.m */,
110 | 370A545319915AB9002387DE /* DemoMasterViewController.h */,
111 | 370A545419915AB9002387DE /* DemoMasterViewController.m */,
112 | );
113 | path = Classes;
114 | sourceTree = "";
115 | };
116 | 19C28FACFE9D520D11CA2CBB /* Products */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 1D6058910D05DD3D006BFB54 /* IntelSplitDemo.app */,
120 | 37F9AC081991741B00972304 /* IntelSplitTests.xctest */,
121 | );
122 | name = Products;
123 | sourceTree = "";
124 | };
125 | 29B97314FDCFA39411CA2CEA /* IntelSplitDemo */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 080E96DDFE201D6D7F000001 /* Classes */,
129 | 29B97315FDCFA39411CA2CEA /* Other Sources */,
130 | 29B97317FDCFA39411CA2CEA /* Resources */,
131 | 37F9AC0C1991741B00972304 /* IntelSplitTests */,
132 | 29B97323FDCFA39411CA2CEA /* Frameworks */,
133 | 19C28FACFE9D520D11CA2CBB /* Products */,
134 | );
135 | name = IntelSplitDemo;
136 | sourceTree = "";
137 | };
138 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
139 | isa = PBXGroup;
140 | children = (
141 | 28A0AB4B0D9B1048005BE974 /* IntelSplitDemo_Prefix.pch */,
142 | 29B97316FDCFA39411CA2CEA /* main.m */,
143 | );
144 | name = "Other Sources";
145 | sourceTree = "";
146 | };
147 | 29B97317FDCFA39411CA2CEA /* Resources */ = {
148 | isa = PBXGroup;
149 | children = (
150 | 370A545619916F9D002387DE /* Images.xcassets */,
151 | 8D1107310486CEB800E47090 /* IntelSplitDemo-Info.plist */,
152 | 372BDF0013C2CC8B00D40544 /* Split-A.png */,
153 | 372BDF0313C2CC9200D40544 /* Split-A@2x.png */,
154 | 372BDF0613C2CC9800D40544 /* Split-B.png */,
155 | 372BDF0913C2CC9C00D40544 /* Split-B@2x.png */,
156 | 372BDF0C13C2CCA000D40544 /* Split-C.png */,
157 | 372BDF0F13C2CCA300D40544 /* Split-C@2x.png */,
158 | 3787FE7F1991373400DE814D /* IntelSplitDemo.storyboard */,
159 | 37C59F6E1A7FD7BC00336E22 /* LaunchScreen.xib */,
160 | );
161 | name = Resources;
162 | sourceTree = "";
163 | };
164 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
165 | isa = PBXGroup;
166 | children = (
167 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
168 | 1D30AB110D05D00D00671497 /* Foundation.framework */,
169 | 288765070DF74369002DB57D /* CoreGraphics.framework */,
170 | 37F9ABF2199173FE00972304 /* XCTest.framework */,
171 | );
172 | name = Frameworks;
173 | sourceTree = "";
174 | };
175 | 37F9AC0C1991741B00972304 /* IntelSplitTests */ = {
176 | isa = PBXGroup;
177 | children = (
178 | 37F9AC121991741B00972304 /* IntelSplitTests.m */,
179 | 37F9AC0D1991741B00972304 /* Supporting Files */,
180 | );
181 | path = IntelSplitTests;
182 | sourceTree = "";
183 | };
184 | 37F9AC0D1991741B00972304 /* Supporting Files */ = {
185 | isa = PBXGroup;
186 | children = (
187 | 37F9AC0E1991741B00972304 /* IntelSplitTests-Info.plist */,
188 | 37F9AC0F1991741B00972304 /* InfoPlist.strings */,
189 | 37F9AC141991741B00972304 /* IntelSplitTests-Prefix.pch */,
190 | );
191 | name = "Supporting Files";
192 | sourceTree = "";
193 | };
194 | /* End PBXGroup section */
195 |
196 | /* Begin PBXNativeTarget section */
197 | 1D6058900D05DD3D006BFB54 /* IntelSplitDemo */ = {
198 | isa = PBXNativeTarget;
199 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "IntelSplitDemo" */;
200 | buildPhases = (
201 | 1D60588D0D05DD3D006BFB54 /* Resources */,
202 | 1D60588E0D05DD3D006BFB54 /* Sources */,
203 | 1D60588F0D05DD3D006BFB54 /* Frameworks */,
204 | );
205 | buildRules = (
206 | );
207 | dependencies = (
208 | );
209 | name = IntelSplitDemo;
210 | productName = IntelSplitDemo;
211 | productReference = 1D6058910D05DD3D006BFB54 /* IntelSplitDemo.app */;
212 | productType = "com.apple.product-type.application";
213 | };
214 | 37F9AC071991741B00972304 /* IntelSplitTests */ = {
215 | isa = PBXNativeTarget;
216 | buildConfigurationList = 37F9AC171991741B00972304 /* Build configuration list for PBXNativeTarget "IntelSplitTests" */;
217 | buildPhases = (
218 | 37F9AC041991741B00972304 /* Sources */,
219 | 37F9AC051991741B00972304 /* Frameworks */,
220 | 37F9AC061991741B00972304 /* Resources */,
221 | );
222 | buildRules = (
223 | );
224 | dependencies = (
225 | 37F9AC161991741B00972304 /* PBXTargetDependency */,
226 | );
227 | name = IntelSplitTests;
228 | productName = IntelSplitTests;
229 | productReference = 37F9AC081991741B00972304 /* IntelSplitTests.xctest */;
230 | productType = "com.apple.product-type.bundle.unit-test";
231 | };
232 | /* End PBXNativeTarget section */
233 |
234 | /* Begin PBXProject section */
235 | 29B97313FDCFA39411CA2CEA /* Project object */ = {
236 | isa = PBXProject;
237 | attributes = {
238 | LastUpgradeCheck = 0510;
239 | ORGANIZATIONNAME = "Gregory S Combs";
240 | TargetAttributes = {
241 | 37F9AC071991741B00972304 = {
242 | TestTargetID = 1D6058900D05DD3D006BFB54;
243 | };
244 | };
245 | };
246 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "IntelSplitDemo" */;
247 | compatibilityVersion = "Xcode 3.2";
248 | developmentRegion = English;
249 | hasScannedForEncodings = 1;
250 | knownRegions = (
251 | English,
252 | Japanese,
253 | French,
254 | German,
255 | en,
256 | );
257 | mainGroup = 29B97314FDCFA39411CA2CEA /* IntelSplitDemo */;
258 | projectDirPath = "";
259 | projectRoot = "";
260 | targets = (
261 | 1D6058900D05DD3D006BFB54 /* IntelSplitDemo */,
262 | 37F9AC071991741B00972304 /* IntelSplitTests */,
263 | );
264 | };
265 | /* End PBXProject section */
266 |
267 | /* Begin PBXResourcesBuildPhase section */
268 | 1D60588D0D05DD3D006BFB54 /* Resources */ = {
269 | isa = PBXResourcesBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | 372BDEFE13C2CC8B00D40544 /* Split-A.png in Resources */,
273 | 370A545719916F9D002387DE /* Images.xcassets in Resources */,
274 | 372BDF0113C2CC9200D40544 /* Split-A@2x.png in Resources */,
275 | 372BDF0413C2CC9800D40544 /* Split-B.png in Resources */,
276 | 3787FE801991373400DE814D /* IntelSplitDemo.storyboard in Resources */,
277 | 372BDF0713C2CC9C00D40544 /* Split-B@2x.png in Resources */,
278 | 372BDF0A13C2CCA000D40544 /* Split-C.png in Resources */,
279 | 37C59F6F1A7FD7BC00336E22 /* LaunchScreen.xib in Resources */,
280 | 372BDF0D13C2CCA300D40544 /* Split-C@2x.png in Resources */,
281 | );
282 | runOnlyForDeploymentPostprocessing = 0;
283 | };
284 | 37F9AC061991741B00972304 /* Resources */ = {
285 | isa = PBXResourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 37F9AC111991741B00972304 /* InfoPlist.strings in Resources */,
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | };
292 | /* End PBXResourcesBuildPhase section */
293 |
294 | /* Begin PBXSourcesBuildPhase section */
295 | 1D60588E0D05DD3D006BFB54 /* Sources */ = {
296 | isa = PBXSourcesBuildPhase;
297 | buildActionMask = 2147483647;
298 | files = (
299 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
300 | 1D3623260D0F684500981E51 /* IntelSplitDemoAppDelegate.m in Sources */,
301 | 370A54521991586A002387DE /* DemoDetailViewController.m in Sources */,
302 | 37A18D38138A14DF00ED157B /* IntelligentSplitViewController.m in Sources */,
303 | 370A545519915AB9002387DE /* DemoMasterViewController.m in Sources */,
304 | );
305 | runOnlyForDeploymentPostprocessing = 0;
306 | };
307 | 37F9AC041991741B00972304 /* Sources */ = {
308 | isa = PBXSourcesBuildPhase;
309 | buildActionMask = 2147483647;
310 | files = (
311 | 37F9AC131991741B00972304 /* IntelSplitTests.m in Sources */,
312 | );
313 | runOnlyForDeploymentPostprocessing = 0;
314 | };
315 | /* End PBXSourcesBuildPhase section */
316 |
317 | /* Begin PBXTargetDependency section */
318 | 37F9AC161991741B00972304 /* PBXTargetDependency */ = {
319 | isa = PBXTargetDependency;
320 | target = 1D6058900D05DD3D006BFB54 /* IntelSplitDemo */;
321 | targetProxy = 37F9AC151991741B00972304 /* PBXContainerItemProxy */;
322 | };
323 | /* End PBXTargetDependency section */
324 |
325 | /* Begin PBXVariantGroup section */
326 | 372BDF0013C2CC8B00D40544 /* Split-A.png */ = {
327 | isa = PBXVariantGroup;
328 | children = (
329 | 372BDEFF13C2CC8B00D40544 /* en */,
330 | );
331 | name = "Split-A.png";
332 | path = Resources;
333 | sourceTree = "";
334 | };
335 | 372BDF0313C2CC9200D40544 /* Split-A@2x.png */ = {
336 | isa = PBXVariantGroup;
337 | children = (
338 | 372BDF0213C2CC9200D40544 /* en */,
339 | );
340 | name = "Split-A@2x.png";
341 | path = Resources;
342 | sourceTree = "";
343 | };
344 | 372BDF0613C2CC9800D40544 /* Split-B.png */ = {
345 | isa = PBXVariantGroup;
346 | children = (
347 | 372BDF0513C2CC9800D40544 /* en */,
348 | );
349 | name = "Split-B.png";
350 | path = Resources;
351 | sourceTree = "";
352 | };
353 | 372BDF0913C2CC9C00D40544 /* Split-B@2x.png */ = {
354 | isa = PBXVariantGroup;
355 | children = (
356 | 372BDF0813C2CC9C00D40544 /* en */,
357 | );
358 | name = "Split-B@2x.png";
359 | path = Resources;
360 | sourceTree = "";
361 | };
362 | 372BDF0C13C2CCA000D40544 /* Split-C.png */ = {
363 | isa = PBXVariantGroup;
364 | children = (
365 | 372BDF0B13C2CCA000D40544 /* en */,
366 | );
367 | name = "Split-C.png";
368 | path = Resources;
369 | sourceTree = "";
370 | };
371 | 372BDF0F13C2CCA300D40544 /* Split-C@2x.png */ = {
372 | isa = PBXVariantGroup;
373 | children = (
374 | 372BDF0E13C2CCA300D40544 /* en */,
375 | );
376 | name = "Split-C@2x.png";
377 | path = Resources;
378 | sourceTree = "";
379 | };
380 | 37F9AC0F1991741B00972304 /* InfoPlist.strings */ = {
381 | isa = PBXVariantGroup;
382 | children = (
383 | 37F9AC101991741B00972304 /* en */,
384 | );
385 | name = InfoPlist.strings;
386 | sourceTree = "";
387 | };
388 | /* End PBXVariantGroup section */
389 |
390 | /* Begin XCBuildConfiguration section */
391 | 1D6058940D05DD3E006BFB54 /* Debug */ = {
392 | isa = XCBuildConfiguration;
393 | buildSettings = {
394 | ALWAYS_SEARCH_USER_PATHS = NO;
395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
396 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
397 | COPY_PHASE_STRIP = NO;
398 | GCC_DYNAMIC_NO_PIC = NO;
399 | GCC_OPTIMIZATION_LEVEL = 0;
400 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
401 | GCC_PREFIX_HEADER = IntelSplitDemo_Prefix.pch;
402 | INFOPLIST_FILE = "IntelSplitDemo-Info.plist";
403 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
404 | PRODUCT_NAME = IntelSplitDemo;
405 | TARGETED_DEVICE_FAMILY = "1,2";
406 | };
407 | name = Debug;
408 | };
409 | 1D6058950D05DD3E006BFB54 /* Release */ = {
410 | isa = XCBuildConfiguration;
411 | buildSettings = {
412 | ALWAYS_SEARCH_USER_PATHS = NO;
413 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
414 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
415 | COPY_PHASE_STRIP = YES;
416 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
417 | GCC_PREFIX_HEADER = IntelSplitDemo_Prefix.pch;
418 | INFOPLIST_FILE = "IntelSplitDemo-Info.plist";
419 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
420 | PRODUCT_NAME = IntelSplitDemo;
421 | TARGETED_DEVICE_FAMILY = "1,2";
422 | VALIDATE_PRODUCT = YES;
423 | };
424 | name = Release;
425 | };
426 | 37F9AC181991741B00972304 /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | buildSettings = {
429 | ALWAYS_SEARCH_USER_PATHS = NO;
430 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/IntelSplitDemo.app/IntelSplitDemo";
431 | CLANG_CXX_LIBRARY = "libc++";
432 | CLANG_WARN_BOOL_CONVERSION = YES;
433 | CLANG_WARN_CONSTANT_CONVERSION = YES;
434 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
435 | CLANG_WARN_EMPTY_BODY = YES;
436 | CLANG_WARN_ENUM_CONVERSION = YES;
437 | CLANG_WARN_INT_CONVERSION = YES;
438 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
439 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
440 | COPY_PHASE_STRIP = NO;
441 | FRAMEWORK_SEARCH_PATHS = (
442 | "$(SDKROOT)/Developer/Library/Frameworks",
443 | "$(inherited)",
444 | "$(DEVELOPER_FRAMEWORKS_DIR)",
445 | );
446 | GCC_C_LANGUAGE_STANDARD = gnu99;
447 | GCC_DYNAMIC_NO_PIC = NO;
448 | GCC_OPTIMIZATION_LEVEL = 0;
449 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
450 | GCC_PREFIX_HEADER = "IntelSplitTests/IntelSplitTests-Prefix.pch";
451 | GCC_PREPROCESSOR_DEFINITIONS = (
452 | "DEBUG=1",
453 | "$(inherited)",
454 | );
455 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
456 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
457 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
458 | GCC_WARN_UNDECLARED_SELECTOR = YES;
459 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
460 | GCC_WARN_UNUSED_FUNCTION = YES;
461 | INFOPLIST_FILE = "IntelSplitTests/IntelSplitTests-Info.plist";
462 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
463 | PRODUCT_NAME = "$(TARGET_NAME)";
464 | TEST_HOST = "$(BUNDLE_LOADER)";
465 | WRAPPER_EXTENSION = xctest;
466 | };
467 | name = Debug;
468 | };
469 | 37F9AC191991741B00972304 /* Release */ = {
470 | isa = XCBuildConfiguration;
471 | buildSettings = {
472 | ALWAYS_SEARCH_USER_PATHS = NO;
473 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/IntelSplitDemo.app/IntelSplitDemo";
474 | CLANG_CXX_LIBRARY = "libc++";
475 | CLANG_WARN_BOOL_CONVERSION = YES;
476 | CLANG_WARN_CONSTANT_CONVERSION = YES;
477 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
478 | CLANG_WARN_EMPTY_BODY = YES;
479 | CLANG_WARN_ENUM_CONVERSION = YES;
480 | CLANG_WARN_INT_CONVERSION = YES;
481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
483 | COPY_PHASE_STRIP = YES;
484 | ENABLE_NS_ASSERTIONS = NO;
485 | FRAMEWORK_SEARCH_PATHS = (
486 | "$(SDKROOT)/Developer/Library/Frameworks",
487 | "$(inherited)",
488 | "$(DEVELOPER_FRAMEWORKS_DIR)",
489 | );
490 | GCC_C_LANGUAGE_STANDARD = gnu99;
491 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
492 | GCC_PREFIX_HEADER = "IntelSplitTests/IntelSplitTests-Prefix.pch";
493 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
494 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
495 | GCC_WARN_UNDECLARED_SELECTOR = YES;
496 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
497 | GCC_WARN_UNUSED_FUNCTION = YES;
498 | INFOPLIST_FILE = "IntelSplitTests/IntelSplitTests-Info.plist";
499 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
500 | PRODUCT_NAME = "$(TARGET_NAME)";
501 | TEST_HOST = "$(BUNDLE_LOADER)";
502 | VALIDATE_PRODUCT = YES;
503 | WRAPPER_EXTENSION = xctest;
504 | };
505 | name = Release;
506 | };
507 | C01FCF4F08A954540054247B /* Debug */ = {
508 | isa = XCBuildConfiguration;
509 | buildSettings = {
510 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
511 | CLANG_ENABLE_MODULES = YES;
512 | CLANG_ENABLE_OBJC_ARC = YES;
513 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
514 | GCC_C_LANGUAGE_STANDARD = gnu11;
515 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
516 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
517 | GCC_WARN_UNUSED_VARIABLE = YES;
518 | ONLY_ACTIVE_ARCH = YES;
519 | SDKROOT = iphoneos;
520 | TARGETED_DEVICE_FAMILY = 2;
521 | };
522 | name = Debug;
523 | };
524 | C01FCF5008A954540054247B /* Release */ = {
525 | isa = XCBuildConfiguration;
526 | buildSettings = {
527 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
528 | CLANG_ENABLE_MODULES = YES;
529 | CLANG_ENABLE_OBJC_ARC = YES;
530 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
531 | GCC_C_LANGUAGE_STANDARD = gnu11;
532 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
533 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
534 | GCC_WARN_UNUSED_VARIABLE = YES;
535 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
536 | SDKROOT = iphoneos;
537 | TARGETED_DEVICE_FAMILY = 2;
538 | };
539 | name = Release;
540 | };
541 | /* End XCBuildConfiguration section */
542 |
543 | /* Begin XCConfigurationList section */
544 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "IntelSplitDemo" */ = {
545 | isa = XCConfigurationList;
546 | buildConfigurations = (
547 | 1D6058940D05DD3E006BFB54 /* Debug */,
548 | 1D6058950D05DD3E006BFB54 /* Release */,
549 | );
550 | defaultConfigurationIsVisible = 0;
551 | defaultConfigurationName = Release;
552 | };
553 | 37F9AC171991741B00972304 /* Build configuration list for PBXNativeTarget "IntelSplitTests" */ = {
554 | isa = XCConfigurationList;
555 | buildConfigurations = (
556 | 37F9AC181991741B00972304 /* Debug */,
557 | 37F9AC191991741B00972304 /* Release */,
558 | );
559 | defaultConfigurationIsVisible = 0;
560 | defaultConfigurationName = Release;
561 | };
562 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "IntelSplitDemo" */ = {
563 | isa = XCConfigurationList;
564 | buildConfigurations = (
565 | C01FCF4F08A954540054247B /* Debug */,
566 | C01FCF5008A954540054247B /* Release */,
567 | );
568 | defaultConfigurationIsVisible = 0;
569 | defaultConfigurationName = Release;
570 | };
571 | /* End XCConfigurationList section */
572 | };
573 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
574 | }
575 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo.xcodeproj/project.xcworkspace/xcshareddata/IntelSplitDemo.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 41FFB8C7-C532-4B84-A221-D81206B05E3B
9 | IDESourceControlProjectName
10 | IntelSplitDemo
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | F25C92A57D9F0F32EA44C965115984B5628A9497
14 | https://github.com/grgcombs/IntelligentSplitViewController.git
15 |
16 | IDESourceControlProjectPath
17 | IntelSplitDemo/IntelSplitDemo.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | F25C92A57D9F0F32EA44C965115984B5628A9497
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/grgcombs/IntelligentSplitViewController.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | F25C92A57D9F0F32EA44C965115984B5628A9497
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | F25C92A57D9F0F32EA44C965115984B5628A9497
36 | IDESourceControlWCCName
37 | IntelligentSplitViewController
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo.xcodeproj/xcshareddata/xcschemes/IntelSplitDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitDemo_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'IntelSplitDemo' target in the 'IntelSplitDemo' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #import
8 | #endif
9 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitTests/IntelSplitTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitTests/IntelSplitTests-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 | #import
9 | #import
10 | #endif
11 |
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitTests/IntelSplitTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // IntelSplitTests.m
3 | // IntelSplitTests
4 | //
5 | // Created by Gregory Combs on 8/5/14.
6 | // Copyright (c) 2014 Gregory S Combs. All rights reserved.
7 | //
8 |
9 | @import XCTest;
10 | #import "IntelSplitDemoAppDelegate.h"
11 |
12 | @interface IntelSplitTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation IntelSplitTests
17 |
18 | - (void)setUp
19 | {
20 | [super setUp];
21 | // Put setup code here. This method is called before the invocation of each test method in the class.
22 | }
23 |
24 | - (void)tearDown
25 | {
26 | // Put teardown code here. This method is called after the invocation of each test method in the class.
27 | [super tearDown];
28 | }
29 |
30 | - (void)testExample
31 | {
32 | IntelSplitDemoAppDelegate *appDelegate = (IntelSplitDemoAppDelegate *)[[UIApplication sharedApplication] delegate];
33 | UITabBarController *tabController = appDelegate.tabBarController;
34 |
35 | XCTAssertNotNil(tabController, @"No tab controller found");
36 |
37 | XCTAssertEqual(tabController.viewControllers.count, 3, @"Expected 3 content controllers in demo");
38 |
39 | [tabController setSelectedIndex:0];
40 |
41 | UIViewController *firstController = tabController.selectedViewController;
42 | XCTAssertNotNil(firstController, @"No content controller at index 0");
43 |
44 | [tabController setSelectedIndex:1];
45 | UIViewController *secondController = tabController.selectedViewController;
46 | XCTAssertNotNil(secondController, @"No content controller at index 1");
47 |
48 | XCTAssertNotEqualObjects(firstController, secondController, @"Expected different content controllers at indexes 1 and 2");
49 |
50 | [tabController setSelectedIndex:2];
51 | UIViewController *thirdController = tabController.selectedViewController;
52 | XCTAssertNotNil(thirdController, @"No content controller at index 2");
53 |
54 | XCTAssertNotEqualObjects(firstController, thirdController, @"Expected different content controllers at indexes 1 and 3");
55 | XCTAssertNotEqualObjects(secondController, thirdController, @"Expected different content controllers at indexes 2 and 3");
56 | }
57 |
58 | @end
--------------------------------------------------------------------------------
/IntelSplitDemo/IntelSplitTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "ipad",
5 | "scale" : "1x",
6 | "size" : "29x29"
7 | },
8 | {
9 | "idiom" : "ipad",
10 | "scale" : "2x",
11 | "size" : "29x29"
12 | },
13 | {
14 | "idiom" : "ipad",
15 | "scale" : "1x",
16 | "size" : "76x76"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "scale" : "2x",
21 | "size" : "76x76"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "scale" : "1x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "scale" : "2x",
31 | "size" : "40x40"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "landscape",
5 | "idiom" : "ipad",
6 | "minimum-system-version" : "7.0",
7 | "extent" : "full-screen",
8 | "scale" : "1x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "minimum-system-version" : "7.0",
14 | "extent" : "full-screen",
15 | "scale" : "2x"
16 | },
17 | {
18 | "orientation" : "portrait",
19 | "idiom" : "ipad",
20 | "minimum-system-version" : "7.0",
21 | "extent" : "full-screen",
22 | "scale" : "1x"
23 | },
24 | {
25 | "orientation" : "portrait",
26 | "idiom" : "ipad",
27 | "minimum-system-version" : "7.0",
28 | "extent" : "full-screen",
29 | "scale" : "2x"
30 | }
31 | ],
32 | "info" : {
33 | "version" : 1,
34 | "author" : "xcode"
35 | }
36 | }
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/IntelSplitDemo.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | "Intelligent" Split View Controller
27 | Demo
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-A.png
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-A@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-A@2x.png
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-B.png
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-B@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-B@2x.png
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-C.png
--------------------------------------------------------------------------------
/IntelSplitDemo/Resources/en.lproj/Split-C@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grgcombs/IntelligentSplitViewController/9db0d7bcb66796480bea55dc23576e6bbf5a6162/IntelSplitDemo/Resources/en.lproj/Split-C@2x.png
--------------------------------------------------------------------------------
/IntelSplitDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // IntelSplitDemo
4 | //
5 | // Created by Gregory Combs on 5/22/11.
6 | // Released under the Creative Commons Attribution 3.0 Unported License
7 | // Please see the included license page for more information.
8 | //
9 |
10 | #import
11 | #import "IntelSplitDemoAppDelegate.h"
12 |
13 | int main(int argc, char *argv[]) {
14 | @autoreleasepool {
15 | int retVal = UIApplicationMain(argc, argv, nil, NSStringFromClass([IntelSplitDemoAppDelegate class]));
16 | return retVal;
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/IntelligentSplitViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // IntelligentSplitViewController.h
3 | // From TexLege by Gregory S. Combs
4 | //
5 | // Released under the Creative Commons Attribution 3.0 Unported License
6 | // Please see the included license page for more information.
7 | //
8 | // In a nutshell, you can use this, just attribute this class to me in your thank you notes or about box.
9 | //
10 |
11 | #import
12 |
13 |
14 | @interface IntelligentSplitViewController : UISplitViewController
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/IntelligentSplitViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // IntelligentSplitViewController.m
3 | // From TexLege by Gregory S. Combs
4 | //
5 | // Released under the Creative Commons Attribution 3.0 Unported License
6 | // Please see the included license page for more information.
7 | //
8 | // In a nutshell, you can use this, just attribute this to me in your "thank you" notes or about box.
9 | //
10 |
11 | #import "IntelligentSplitViewController.h"
12 | #import
13 |
14 | @implementation IntelligentSplitViewController
15 |
16 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
17 | {
18 | if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))
19 | {
20 | [self registerObservations];
21 | }
22 | return self;
23 | }
24 |
25 | - (void)awakeFromNib
26 | {
27 | [super awakeFromNib];
28 |
29 | [self registerObservations];
30 | }
31 |
32 |
33 | - (void)registerObservations {
34 | [[NSNotificationCenter defaultCenter] addObserver:self
35 | selector:@selector(willRotate:)
36 | name:UIApplicationWillChangeStatusBarOrientationNotification object:nil];
37 |
38 | [[NSNotificationCenter defaultCenter] addObserver:self
39 | selector:@selector(didRotate:)
40 | name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];
41 | }
42 |
43 | - (void)viewDidLoad {
44 | [super viewDidLoad];
45 | }
46 |
47 | - (void)didReceiveMemoryWarning {
48 | [super didReceiveMemoryWarning];
49 | }
50 |
51 | - (void)viewDidUnload {
52 | [super viewDidUnload];
53 | }
54 |
55 |
56 | - (void)dealloc {
57 | @try {
58 | [[NSNotificationCenter defaultCenter] removeObserver:self];
59 | }
60 | @catch (NSException * e) {
61 | NSLog(@"IntelligentSplitViewController DE-OBSERVING CRASHED: %@ ... error:%@", self.title, e);
62 | }
63 | }
64 |
65 | - (BOOL)shouldAutorotate
66 | {
67 | return YES;
68 | }
69 |
70 | - (NSUInteger)supportedInterfaceOrientations
71 | {
72 | return (UIInterfaceOrientationMaskAll);
73 | }
74 |
75 | - (void)willRotate:(id)sender {
76 | if (![self isViewLoaded]) // we haven't even loaded up yet, let's turn away from this place
77 | return;
78 |
79 | NSNotification *notification = sender;
80 | if (!notification)
81 | return;
82 |
83 | UIInterfaceOrientation toOrientation = [[notification.userInfo valueForKey:UIApplicationStatusBarOrientationUserInfoKey] integerValue];
84 | //UIInterfaceOrientation fromOrientation = [UIApplication sharedApplication].statusBarOrientation;
85 |
86 | UITabBarController *tabBar = self.tabBarController;
87 | BOOL notModal = (!tabBar.presentedViewController);
88 | BOOL isSelectedTab = [self.tabBarController.selectedViewController isEqual:self];
89 |
90 | NSTimeInterval duration = [[UIApplication sharedApplication] statusBarOrientationAnimationDuration];
91 |
92 |
93 | if (!isSelectedTab || !notModal) {
94 | // Looks like we're not "visible" ... propogate rotation info
95 | [super willRotateToInterfaceOrientation:toOrientation duration:duration];
96 |
97 | UIViewController *master = [self.viewControllers objectAtIndex:0];
98 | NSObject *theDelegate = (NSObject *)self.delegate;
99 |
100 | if (!theDelegate ||
101 | ![theDelegate isKindOfClass:[UIViewController class]] ||
102 | ![theDelegate conformsToProtocol:@protocol(UISplitViewControllerDelegate)])
103 | {
104 | NSLog(@"Be sure to set the split view controller delegate to its detail view controller");
105 | return;
106 | }
107 |
108 | UIBarButtonItem *button = nil;
109 |
110 | if ([[(UIViewController *)theDelegate navigationItem] rightBarButtonItem])
111 | {
112 | button = [[(UIViewController *)theDelegate navigationItem] rightBarButtonItem];
113 | }
114 | else
115 | {
116 | // A last-ditch effort to get the bar button item -- sometimes it works when the previous does not.
117 |
118 | #define YOU_DONT_FEEL_QUEAZY_ABOUT_THIS_BECAUSE_IT_PASSES_THE_APP_STORE 1
119 | #if YOU_DONT_FEEL_QUEAZY_ABOUT_THIS_BECAUSE_IT_PASSES_THE_APP_STORE
120 | @try {
121 | button = [super valueForKey:@"_barButtonItem"];
122 | }
123 | @catch (NSException *e) {
124 | NSLog(@"Exception occurred while to identify the split view popover button: %@", e);
125 | }
126 | #endif
127 | }
128 |
129 | @try {
130 | if (UIInterfaceOrientationIsPortrait(toOrientation)) {
131 | if ([theDelegate respondsToSelector:@selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:)]) {
132 | UIPopoverController *popover = nil;
133 | @try {
134 | popover = [super valueForKey:@"_hiddenPopoverController"];
135 | }
136 | @catch (NSException *e) {
137 | NSLog(@"Exception occurred while to identify the split view popover controller: %@", e);
138 | }
139 | void (*response)(id, SEL, id, id, id, id) = (void (*)(id, SEL, id, id, id, id)) objc_msgSend;
140 | response(theDelegate, @selector(splitViewController:willHideViewController:withBarButtonItem:forPopoverController:), self, master, button, popover);
141 | }
142 | }
143 | else if (UIInterfaceOrientationIsLandscape(toOrientation)) {
144 | if ([theDelegate respondsToSelector:@selector(splitViewController:willShowViewController:invalidatingBarButtonItem:)]) {
145 | void (*response)(id, SEL, id, id, id) = (void (*)(id, SEL, id, id, id)) objc_msgSend;
146 | response(theDelegate, @selector(splitViewController:willShowViewController:invalidatingBarButtonItem:), self, master, button);
147 | }
148 | }
149 | }
150 | @catch (NSException * e) {
151 | NSLog(@"There was a nasty error while notifyng splitviewcontrollers of an orientation change: %@", e);
152 | }
153 |
154 | }
155 | }
156 |
157 | - (void)didRotate:(id)sender {
158 | if (![self isViewLoaded]) // we haven't even loaded up yet, let's turn away from this place
159 | return;
160 |
161 | NSNotification *notification = sender;
162 | if (!notification)
163 | return;
164 | UIInterfaceOrientation fromOrientation = [[notification.userInfo valueForKey:UIApplicationStatusBarOrientationUserInfoKey] integerValue];
165 |
166 | UITabBarController *tabBar = self.tabBarController;
167 | BOOL notModal = (!tabBar.presentedViewController);
168 | BOOL isSelectedTab = [self.tabBarController.selectedViewController isEqual:self];
169 |
170 | if (!isSelectedTab || !notModal) {
171 | // Looks like we're not "visible" ... broadcast rotation info
172 | [super didRotateFromInterfaceOrientation:fromOrientation];
173 | }
174 | }
175 |
176 | @end
177 |
--------------------------------------------------------------------------------
/IntelligentSplitViewController.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'IntelligentSplitViewController'
3 | s.version = '1.2.1'
4 | s.license = { :type => 'Creative Commons' }
5 | s.homepage = 'https://github.com/grgcombs/IntelligentSplitViewController'
6 | s.authors = { 'Greg Combs' => 'gcombs@gmail.com'}
7 | s.summary = 'UISplitViewController subclass that works within a UITabBarController'
8 | s.description = <<-DESC
9 | This is a UISplitViewController subclass that will intelligently rotate it's contents when placed inside a UITabBarController.
10 |
11 | Normally the standard UISplitViewController doesn't hear about rotations when it's not the frontmost UI element (selected tab). This is because Apple believes a UISplitViewController should be the top-most controller in the hierarchy. So when you rotate the device while switching back and forth between tabs of split views, your view controllers and UI elements start drawing in mismatched orientations. Users don't like this nonsense. But what do you do if your app *needs* split views within a tab view? This. This is what you do.
12 | DESC
13 | # Source Info
14 | s.platform = :ios
15 | s.ios.deployment_target = '7.1'
16 | s.source = { :git => "https://github.com/grgcombs/IntelligentSplitViewController.git", :tag => "v#{s.version}" }
17 | s.source_files = 'IntelligentSplitViewController.{h,m}'
18 |
19 | s.requires_arc = true
20 |
21 | end
22 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
2 |
3 | **Using Creative Commons Public Licenses**
4 |
5 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
6 |
7 | **Considerations for licensors:** Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors.](//wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors)
8 |
9 | **Considerations for the public:** By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable.
10 | [More considerations for the public.](//wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees)
11 |
12 | ### Creative Commons Attribution 4.0 International Public License
13 |
14 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
15 |
16 | **Section 1 – Definitions.**
17 |
18 | 1. **Adapted Material** means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
19 | 2. **Adapter's License** means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
20 | 3. **Copyright and Similar Rights** means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
21 | 4. **Effective Technological Measures** means those measures that, in the absence of proper authority, may notbe circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similarinternational agreements.
22 | 5. **Exceptions and Limitations** means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
23 | 6. **Licensed Material** means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
24 | 7. **Licensed Rights** means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
25 | 8. **Licensor** means the individual(s) or entity(ies) granting rights under this Public License.
26 | 9. **Share** means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
27 | 10. **Sui Generis Database Rights** means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
28 | 11. **You** means the individual or entity exercising the Licensed Rights under this Public License. **Your** has a corresponding meaning.
29 |
30 | **Section 2 – Scope.**
31 |
32 | 1. **License grant**.
33 |
34 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
35 |
36 | 1. reproduce and Share the Licensed Material, in whole or in part; and
37 | 2. produce, reproduce, and Share Adapted Material.
38 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
39 | 3. Term. The term of this Public License is specified in Section 6(a).
40 | 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section2(a)(4) never produces Adapted Material.
41 | 5. Downstream recipients.
42 |
43 | 1. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
44 | 2. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
45 |
46 | 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
47 | 2. **Other rights**.
48 |
49 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
50 | 2. Patent and trademark rights are not licensed under this Public License.
51 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
52 |
53 | **Section 3 – License Conditions.**
54 |
55 | Your exercise of the Licensed Rights is expressly made subject to the following conditions.
56 |
57 | 1. **Attribution**.
58 |
59 | 1. If You Share the Licensed Material (including in modified form), You must:
60 |
61 | 1. retain the following if it is supplied by the Licensor with the Licensed Material:
62 |
63 | 1. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
64 | 2. a copyright notice;
65 | 3. a notice that refers to this Public License;4. a notice that refers to the disclaimer of warranties;
66 | 5. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
67 | 2. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
68 | 3. indicate the Licensed Material is licensed under this Public License,and include the text of, or the URI or hyperlink to, this PublicLicense.
69 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
70 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
71 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
72 |
73 | **Section 4 – Sui Generis Database Rights.**
74 |
75 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
76 |
77 | 1. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
78 | 2. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
79 | 3. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
80 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
81 |
82 | **Section 5 – Disclaimer of Warranties and Limitation of Liability.**
83 |
84 | 1. **Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.**
85 | 2. **To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.**
86 |
87 | 1. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
88 |
89 | **Section 6 – Term and Termination.**
90 |
91 | 1. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
92 | 2. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
93 |
94 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
95 | 2. upon express reinstatement by the Licensor.
96 |
97 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
98 | 3. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
99 | 4. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
100 |
101 | **Section 7 – Other Terms and Conditions.**
102 |
103 | 1. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
104 | 2. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
105 |
106 | **Section 8 – Interpretation.**
107 |
108 | 1. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
109 | 2. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
110 | 3. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
111 | 4. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
112 |
113 | Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](//creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
114 |
115 | Creative Commons may be contacted at [creativecommons.org](http://creativecommons.org/).
116 |
117 | Additional languages available: Please read the [FAQ](//wiki.creative.commons.org/FAQ) for more information about official translations.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [Obsoleted] IntelligentSplitViewController - It's almost omniscient!
2 | =============
3 | by **Gregory S. Combs**, based on work at:
4 |
5 | - [GitHub](https://github.com/grgcombs/IntelligentSplitViewController)
6 | - [TexLege](http://www.texlege.com)
7 |
8 | [](https://travis-ci.org/grgcombs/IntelligentSplitViewController)
9 |
10 | ## This is only appropriate for apps on iOS 7 and older
11 |
12 | What Is This?
13 | =============
14 |
15 | This is a UISplitViewController subclass that will intelligently rotate it's contents when placed inside a UITabBarController.
16 |
17 | Normally the standard UISplitViewController doesn't hear about rotations when it's not the frontmost UI element (selected tab). This is because Apple believes a UISplitViewController should be the top-most controller in the hierarchy. So when you rotate the device while switching back and forth between tabs of split views, your view controllers and UI elements start drawing in mismatched orientations. Users don't like this nonsense. But what do you do if your app *needs* split views within a tab view? This. This is what you do.
18 |
19 | Note, as we've mentioned, this view controller hierarchy does not exactly fit with Apple's human interface guidelines, but I've successfully released an app to the App Store using this set up (almost exactly), as seen on [TexLege](http://www.texlege.com). Others have successfully released apps using InteeligentSplitViewController, including a few "big name" development companies.
20 |
21 | This class and the enclosed demo app assume that you are loading your tabBarController and splitViewControllers via Interface Builder (in a storyboard). If you don't like using storyboards, then hopefully you know how to incorporate this class without much hand-holding.
22 |
23 | I've also included (as a submodule) an alternative implementation demo/template from Ziophase, [IntelligentTemplate](https://www.github.com/ziophase/IntelligentTemplate).
24 |
25 | Installation
26 | =========================
27 |
28 | [CocoaPods](/http://guides.cocoapods.org) is easiest way to integrate IntelligentSplitViewController into your project.
29 |
30 | Once you have CocoaPods installed, just put something like this to your Podfile:
31 |
32 | platform :ios, "7.1"
33 |
34 | xcodeproj 'MyApplication'
35 | link_with 'MyApplication', 'MyApplicationTests'
36 |
37 | pod "IntelligentSplitViewController", '~> 1.1.0'
38 |
39 | After that point, you can open your storyboards, XIBs, and/or source files and change your UISplitViewController classes to use the IntelligentSplitViewController subclass instead.
40 |
41 | Be sure you set up your split view delegates (to the 'detail' view controller) as needed. As always, look to the IntelSplitDemo project for additional tips and configuration.
42 |
43 | Change Log
44 | =========================
45 |
46 | - (8/6/14)
47 |
48 | Added CocoaPods podspec and installation instructions.
49 |
50 | - (8/5/14)
51 |
52 | Refactored for iOS 7, storyboards, ARC, and more.
53 |
54 | - (6/16/11)
55 |
56 | Added a more extensive template from Ziophase to help showcase more advanced controller hierarchies.
57 |
58 | - (5/23/11)
59 |
60 | Added a demo application, to show you how I use it in my apps.
61 |
62 | Improved the documentation (slightly).
63 |
64 | Pointed out an alternative way to get a popover button without using `[super valueForKey:@"_barButtonItem"]`, in case that frightens you or irritates App Store reviewers. (It hasn't proved problematic for me, yet).
65 |
66 | License
67 | =========================
68 |
69 | This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)
70 |
71 | 
72 |
73 | Alternative, see the included license file for more information on appropriate use of this class.
74 |
75 |
--------------------------------------------------------------------------------