├── Example ├── Example │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Classes │ │ ├── QPLeftTableViewController.h │ │ ├── QPColorViewController.h │ │ ├── QPColorViewController.m │ │ └── QPLeftTableViewController.m │ ├── QPAppDelegate.h │ ├── main.m │ ├── Example-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Example-Info.plist │ └── QPAppDelegate.m ├── ExampleTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── ExampleTests.m │ └── ExampleTests-Info.plist └── Example.xcodeproj │ ├── xcuserdata │ └── qsoft.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── Example.xcscheme │ └── project.pbxproj ├── Screenshots └── demo.png ├── Example.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── qsoft.xcuserdatad │ └── WorkspaceSettings.xcsettings ├── .gitignore ├── QPSplitViewController ├── UIApplication+AppDimensions.h ├── QPSplitView.h ├── QPSplitViewController.h ├── UIApplication+AppDimensions.m ├── QPSplitView.m └── QPSplitViewController.m ├── QPSplitViewController.podspec ├── README.md └── LICENSE /Example/Example/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/ExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Screenshots/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polydice/QPSplitViewController/master/Screenshots/demo.png -------------------------------------------------------------------------------- /Example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example/Classes/QPLeftTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QPLeftTableViewController.h 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QPLeftTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Example/Classes/QPColorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QPColorViewController.h 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QPColorViewController : UIViewController 12 | 13 | - (void)setColor:(UIColor *)color; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/Example/QPAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // QPAppDelegate.h 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QPAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | .sh 20 | #CocoaPods 21 | Pods 22 | Podfile.lock 23 | 24 | #merge file 25 | project.pbxproj.mergesave 26 | build/ -------------------------------------------------------------------------------- /Example/Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "QPAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([QPAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /QPSplitViewController/UIApplication+AppDimensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+AppDimensions.h 3 | // igamma 4 | // 5 | // Created by Alessandro Zoffoli on 22/04/14. 6 | // Copyright (c) 2014 Apex-net. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIApplication (AppDimensions) 12 | 13 | + (CGSize)currentSize; 14 | + (CGSize)sizeInOrientation:(UIInterfaceOrientation)orientation; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example.xcworkspace/xcuserdata/qsoft.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Example/Example-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 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /QPSplitViewController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "QPSplitViewController" 3 | s.version = "0.0.1" 4 | s.summary = "Split view controller for iOS like Settings app." 5 | s.homepage = "https://github.com/quangpc/QPSplitViewController" 6 | s.license = { :type => 'MIT', :file => 'LICENSE' } 7 | s.author = { "Quang Pham Cong" => "quang.phamcong@gmail.com" } 8 | s.source = { :git => "https://github.com/quangpc/QPSplitViewController.git", :tag => "0.0.1" } 9 | s.platform = :ios, '6.0' 10 | s.requires_arc = true 11 | s.source_files = 'QPSplitViewController' 12 | 13 | end -------------------------------------------------------------------------------- /QPSplitViewController/QPSplitView.h: -------------------------------------------------------------------------------- 1 | // 2 | // QPSplitView.h 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class QPSplitViewController; 12 | 13 | @interface QPSplitView : UIView 14 | 15 | @property (strong, nonatomic) UIView *leftView; 16 | 17 | @property (strong, nonatomic) UIView *rightView; 18 | 19 | - (instancetype)initWithFrame:(CGRect)frame controller:(QPSplitViewController *)splitController; 20 | 21 | - (void)setLeftSplitWidth:(CGFloat)width; 22 | 23 | - (void)setRightSplitWidth:(CGFloat)width; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcuserdata/qsoft.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Example.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D9BC410418E9485A003808A8 16 | 17 | primary 18 | 19 | 20 | D9BC411F18E9485B003808A8 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/ExampleTests/ExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleTests.m 3 | // ExampleTests 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Example/ExampleTests/ExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.quangpc.${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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | QPSplitViewController 2 | ===================== 3 | 4 | Split View Controller (like Settings app) for iOS 5 | 6 | ![alt tag](https://raw.githubusercontent.com/quangpc/QPSplitViewController/master/Screenshots/demo.png) 7 | 8 | ===================== 9 |

HOW TO USE:


10 |

1. Add to your projects

11 | Manual: add QPSplitViewController 12 | Cocoapods: pod 'QPSplitViewController' 13 |
14 |

2. Init

15 | 16 | ``` 17 | QPSplitViewController *splitVC = [[QPSplitViewController alloc] initWithLeftViewController:left rightViewController:right]; 18 | self.window.rootViewController = splitVC; 19 | ``` 20 | 21 |

3. Change controller

22 | 23 | ``` 24 | // Use UIViewController Category 25 | [self.qp_splitViewController setRightController:newRight]; 26 | ``` 27 | 28 |

4. Change size

29 | 30 | ``` 31 | // Change left or right split width 32 | self.qp_splitViewController.leftSplitWidth = 320.0; 33 | ``` 34 | -------------------------------------------------------------------------------- /QPSplitViewController/QPSplitViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QPSplitViewController.h 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QPSplitViewController : UIViewController 12 | 13 | - (instancetype)initWithLeftViewController:(UIViewController *)leftController rightViewController:(UIViewController *)rightController; 14 | 15 | @property (strong, nonatomic) UIViewController *leftController; 16 | 17 | @property (strong, nonatomic) UIViewController *rightController; 18 | 19 | @property (assign, nonatomic, setter = setLeftSplitWidth:) CGFloat leftSplitWidth; 20 | 21 | @property (assign, nonatomic, setter = setRightSplitWidth:) CGFloat rightSplitWidth; 22 | 23 | @end 24 | 25 | 26 | #pragma mark - 27 | #pragma mark UIViewController Category 28 | 29 | @interface UIViewController (QPSplitViewController) 30 | 31 | - (QPSplitViewController *)qp_splitViewController; 32 | 33 | @end -------------------------------------------------------------------------------- /QPSplitViewController/UIApplication+AppDimensions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+AppDimensions.m 3 | // igamma 4 | // 5 | // Created by Alessandro Zoffoli on 22/04/14. 6 | // Copyright (c) 2014 Apex-net. All rights reserved. 7 | // 8 | 9 | #import "UIApplication+AppDimensions.h" 10 | 11 | @implementation UIApplication (AppDimensions) 12 | 13 | + (CGSize)currentSize 14 | { 15 | return [UIApplication sizeInOrientation:[UIApplication sharedApplication].statusBarOrientation]; 16 | } 17 | 18 | + (CGSize)sizeInOrientation:(UIInterfaceOrientation)orientation 19 | { 20 | CGSize size = [UIScreen mainScreen].bounds.size; 21 | UIApplication *application = [UIApplication sharedApplication]; 22 | if (UIInterfaceOrientationIsLandscape(orientation)) { 23 | size = CGSizeMake(size.height, size.width); 24 | } 25 | if (application.statusBarHidden == NO) { 26 | size.height -= MIN(application.statusBarFrame.size.width, application.statusBarFrame.size.height); 27 | } 28 | return size; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Example/Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 QuangPC (skype: quangphamcong) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /Example/Example/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Example/Example/Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.quangpc.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/Example/Classes/QPColorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // QPColorViewController.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import "QPColorViewController.h" 10 | #import 11 | 12 | @interface QPColorViewController () 13 | 14 | @end 15 | 16 | @implementation QPColorViewController 17 | 18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 19 | { 20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 21 | if (self) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | // Do any additional setup after loading the view. 31 | self.view.layer.borderWidth = 5.0; 32 | self.view.layer.borderColor = [[UIColor purpleColor] CGColor]; 33 | if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) 34 | self.edgesForExtendedLayout = UIRectEdgeNone; 35 | 36 | self.title = @"Right Controller"; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning 40 | { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | - (void)setColor:(UIColor *)color { 46 | self.view.backgroundColor = color; 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 | -------------------------------------------------------------------------------- /QPSplitViewController/QPSplitView.m: -------------------------------------------------------------------------------- 1 | // 2 | // QPSplitView.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import "QPSplitView.h" 10 | #import "QPSplitViewController.h" 11 | 12 | @interface QPSplitView () 13 | { 14 | 15 | } 16 | @property (weak, nonatomic) QPSplitViewController *splitController; 17 | @end 18 | 19 | @implementation QPSplitView 20 | 21 | - (instancetype)initWithFrame:(CGRect)frame controller:(QPSplitViewController *)splitController { 22 | self = [super initWithFrame:frame]; 23 | if (self) { 24 | _splitController = splitController; 25 | CGRect bounds = self.bounds; 26 | _leftView = [[UIView alloc] initWithFrame:bounds]; 27 | _leftView.autoresizingMask = UIViewAutoresizingFlexibleHeight; 28 | [self addSubview:_leftView]; 29 | 30 | _rightView = [[UIView alloc] initWithFrame:bounds]; 31 | _rightView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; 32 | [self addSubview:_rightView]; 33 | 34 | // default 260 left size 35 | [self setLeftSplitWidth:_splitController.leftSplitWidth]; 36 | } 37 | return self; 38 | } 39 | 40 | - (void)setLeftSplitWidth:(CGFloat)width { 41 | CGRect bounds = self.bounds; 42 | 43 | CGRect leftFrame = _leftView.frame; 44 | leftFrame.origin.x = 0; 45 | leftFrame.size.width = width; 46 | _leftView.frame = leftFrame; 47 | 48 | // change right 49 | CGRect rightFrame = _rightView.frame; 50 | rightFrame.origin.x = width; 51 | rightFrame.size.width = bounds.size.width - width; 52 | _rightView.frame = rightFrame; 53 | } 54 | 55 | - (void)setRightSplitWidth:(CGFloat)width { 56 | CGRect bounds = self.bounds; 57 | 58 | CGRect rightFrame = _rightView.frame; 59 | rightFrame.size.width = width; 60 | rightFrame.origin.x = bounds.size.width - width; 61 | _rightView.frame = rightFrame; 62 | 63 | CGRect leftFrame = _leftView.frame; 64 | leftFrame.origin.x = 0; 65 | leftFrame.size.width = bounds.size.width - width; 66 | _leftView.frame = leftFrame; 67 | } 68 | @end 69 | -------------------------------------------------------------------------------- /Example/Example/QPAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // QPAppDelegate.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import "QPAppDelegate.h" 10 | #import "QPSplitViewController.h" 11 | #import "QPLeftTableViewController.h" 12 | #import "QPColorViewController.h" 13 | 14 | @implementation QPAppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 19 | // Override point for customization after application launch. 20 | self.window.backgroundColor = [UIColor whiteColor]; 21 | 22 | QPLeftTableViewController *leftMenuVC = [[QPLeftTableViewController alloc] initWithStyle:UITableViewStylePlain]; 23 | UINavigationController *leftNavi = [[UINavigationController alloc] initWithRootViewController:leftMenuVC]; 24 | 25 | QPColorViewController *colorVC = [[QPColorViewController alloc] init]; 26 | [colorVC setColor:[UIColor grayColor]]; 27 | UINavigationController *colorNavi = [[UINavigationController alloc] initWithRootViewController:colorVC]; 28 | QPSplitViewController *splitVC = [[QPSplitViewController alloc] initWithLeftViewController:leftNavi rightViewController:colorNavi]; 29 | splitVC.leftSplitWidth = 100; 30 | 31 | self.window.rootViewController = splitVC; 32 | 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | - (void)applicationWillResignActive:(UIApplication *)application 38 | { 39 | // 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. 40 | // 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. 41 | } 42 | 43 | - (void)applicationDidEnterBackground:(UIApplication *)application 44 | { 45 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 46 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 47 | } 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application 50 | { 51 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 52 | } 53 | 54 | - (void)applicationDidBecomeActive:(UIApplication *)application 55 | { 56 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 57 | } 58 | 59 | - (void)applicationWillTerminate:(UIApplication *)application 60 | { 61 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/xcuserdata/qsoft.xcuserdatad/xcschemes/Example.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 | -------------------------------------------------------------------------------- /Example/Example/Classes/QPLeftTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // QPLeftTableViewController.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import "QPLeftTableViewController.h" 10 | #import "QPSplitViewController.h" 11 | #import "QPColorViewController.h" 12 | 13 | @interface QPLeftTableViewController () 14 | 15 | @end 16 | 17 | @implementation QPLeftTableViewController 18 | 19 | - (id)initWithStyle:(UITableViewStyle)style 20 | { 21 | self = [super initWithStyle:style]; 22 | if (self) { 23 | // Custom initialization 24 | } 25 | return self; 26 | } 27 | 28 | - (void)viewDidLoad 29 | { 30 | [super viewDidLoad]; 31 | self.title = @"Colors"; 32 | // Uncomment the following line to preserve selection between presentations. 33 | // self.clearsSelectionOnViewWillAppear = NO; 34 | 35 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 36 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning 40 | { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | #pragma mark - Table view data source 46 | 47 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 48 | { 49 | return 1; 50 | } 51 | 52 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 53 | { 54 | return 7; 55 | } 56 | 57 | 58 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 59 | { 60 | static NSString *cellIdentifier = @"Cell"; 61 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 62 | 63 | if (!cell) { 64 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; 65 | } 66 | // Configure the cell... 67 | NSString *title = @""; 68 | switch (indexPath.row) { 69 | case 0: 70 | title = @"Gray"; 71 | break; 72 | case 1: 73 | title = @"Blue"; 74 | break; 75 | case 2: 76 | title = @"Yellow"; 77 | break; 78 | case 3: 79 | title = @"Red"; 80 | break; 81 | case 4: 82 | title = @"Black"; 83 | break; 84 | case 5: 85 | title = @"Left Size 260"; 86 | break; 87 | case 6: 88 | title = @"Left Size 320"; 89 | break; 90 | default: 91 | 92 | break; 93 | } 94 | cell.textLabel.text = title; 95 | return cell; 96 | } 97 | 98 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 99 | UIColor *color = [UIColor grayColor]; 100 | if (indexPath.row == 5) { 101 | self.qp_splitViewController.leftSplitWidth = 260; 102 | return; 103 | } 104 | if (indexPath.row == 6) { 105 | self.qp_splitViewController.leftSplitWidth = 320; 106 | return; 107 | } 108 | switch (indexPath.row) { 109 | case 0: 110 | color = [UIColor grayColor]; 111 | break; 112 | case 1: 113 | color = [UIColor blueColor]; 114 | break; 115 | case 2: 116 | color = [UIColor yellowColor]; 117 | break; 118 | case 3: 119 | color = [UIColor redColor]; 120 | break; 121 | case 4: 122 | color = [UIColor blackColor]; 123 | break; 124 | 125 | default: 126 | break; 127 | } 128 | [self setRightControllerWithColor:color]; 129 | } 130 | 131 | - (void)setRightControllerWithColor:(UIColor *)color { 132 | QPColorViewController *colorVC = [[QPColorViewController alloc] init]; 133 | [colorVC setColor:color]; 134 | UINavigationController *colorNavi = [[UINavigationController alloc] initWithRootViewController:colorVC]; 135 | [self.qp_splitViewController setRightController:colorNavi]; 136 | } 137 | 138 | /* 139 | // Override to support conditional editing of the table view. 140 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath 141 | { 142 | // Return NO if you do not want the specified item to be editable. 143 | return YES; 144 | } 145 | */ 146 | 147 | /* 148 | // Override to support editing the table view. 149 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath 150 | { 151 | if (editingStyle == UITableViewCellEditingStyleDelete) { 152 | // Delete the row from the data source 153 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 154 | } else if (editingStyle == UITableViewCellEditingStyleInsert) { 155 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 156 | } 157 | } 158 | */ 159 | 160 | /* 161 | // Override to support rearranging the table view. 162 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath 163 | { 164 | } 165 | */ 166 | 167 | /* 168 | // Override to support conditional rearranging of the table view. 169 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath 170 | { 171 | // Return NO if you do not want the item to be re-orderable. 172 | return YES; 173 | } 174 | */ 175 | 176 | /* 177 | #pragma mark - Navigation 178 | 179 | // In a storyboard-based application, you will often want to do a little preparation before navigation 180 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 181 | { 182 | // Get the new view controller using [segue destinationViewController]. 183 | // Pass the selected object to the new view controller. 184 | } 185 | */ 186 | 187 | @end 188 | -------------------------------------------------------------------------------- /QPSplitViewController/QPSplitViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // QPSplitViewController.m 3 | // Example 4 | // 5 | // Created by QuangPC on 3/31/14. 6 | // Copyright (c) 2014 quangpc. All rights reserved. 7 | // 8 | 9 | #import "QPSplitViewController.h" 10 | #import "QPSplitView.h" 11 | #import "UIApplication+AppDimensions.h" 12 | 13 | @interface QPSplitViewController () 14 | 15 | @property (assign, nonatomic) CGFloat actualLeftSplitWidth; 16 | @property (strong, nonatomic) QPSplitView *splitView; 17 | 18 | @end 19 | 20 | @implementation QPSplitViewController 21 | 22 | - (instancetype)initWithLeftViewController:(UIViewController *)leftController 23 | rightViewController:(UIViewController *)rightController { 24 | self = [super init]; 25 | if (self) { 26 | CGRect frame = [[UIScreen mainScreen] bounds]; 27 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){ 28 | // on iphone, default left width is set equal the width of the 29 | // screen when in portrait 30 | _leftSplitWidth = MIN(frame.size.width, frame.size.height); 31 | } else { 32 | _leftSplitWidth = 260.0f; 33 | } 34 | 35 | _actualLeftSplitWidth = _leftSplitWidth; 36 | 37 | _rightSplitWidth = frame.size.width - _leftSplitWidth; 38 | _splitView = [[QPSplitView alloc] initWithFrame:frame controller:self]; 39 | _splitView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 40 | 41 | [self initLeftViewController:leftController]; 42 | [self initRightViewController:rightController]; 43 | } 44 | return self; 45 | } 46 | 47 | - (instancetype)init { 48 | return [self initWithLeftViewController:nil rightViewController:nil]; 49 | } 50 | 51 | - (void)viewDidLoad { 52 | [super viewDidLoad]; 53 | } 54 | 55 | - (void)loadView { 56 | self.view = _splitView; 57 | _splitView.backgroundColor = [UIColor whiteColor]; 58 | 59 | } 60 | 61 | - (void)viewWillAppear:(BOOL)animated{ 62 | [super viewWillAppear:animated]; 63 | [self updateActualLeftSplitWidthTogglingLeftSplit:NO]; 64 | } 65 | 66 | #pragma mark - 67 | #pragma mark Set Controllers methods 68 | 69 | - (void)setLeftController:(UIViewController *)leftController { 70 | [self setLeftController:leftController animated:NO]; 71 | } 72 | 73 | - (void)setLeftController:(UIViewController *)leftController animated:(BOOL)animated { 74 | if (![self isViewLoaded]) { 75 | [self initLeftViewController:leftController]; 76 | return; 77 | } 78 | if (leftController == _leftController) { 79 | return; 80 | } 81 | [self changeLeftViewController:leftController]; 82 | } 83 | 84 | - (void)setRightController:(UIViewController *)rightController { 85 | [self setRightController:rightController animated:NO]; 86 | } 87 | 88 | - (void)setRightController:(UIViewController *)rightController animated:(BOOL)animated { 89 | if (![self isViewLoaded]) { 90 | [self initRightViewController:rightController]; 91 | return; 92 | } 93 | if (rightController == _rightController) { 94 | return; 95 | } 96 | [self changeRightViewController:rightController]; 97 | } 98 | 99 | #pragma mark - 100 | #pragma mark - Transition between controllers 101 | 102 | - (void)initLeftViewController:(UIViewController *)leftController { 103 | if (leftController) { 104 | [self addChildViewController:leftController]; 105 | leftController.view.frame = _splitView.leftView.bounds; 106 | [_splitView.leftView addSubview:leftController.view]; 107 | [leftController didMoveToParentViewController:self]; 108 | _leftController = leftController; 109 | } 110 | 111 | } 112 | 113 | - (void)initRightViewController:(UIViewController *)rightController { 114 | if (rightController) { 115 | [self addChildViewController:rightController]; 116 | rightController.view.frame = _splitView.rightView.bounds; 117 | [_splitView.rightView addSubview:rightController.view]; 118 | [rightController didMoveToParentViewController:self]; 119 | _rightController = rightController; 120 | 121 | [self setLeftBarButtonItem]; 122 | [self addTapGestureToRightSplit]; 123 | } 124 | } 125 | 126 | - (void)changeLeftViewController:(UIViewController *)leftController{ 127 | UIViewController *oldController = _leftController; 128 | [oldController willMoveToParentViewController:nil]; 129 | [oldController.view removeFromSuperview]; 130 | [oldController removeFromParentViewController]; 131 | 132 | leftController.view.frame = _splitView.leftView.bounds; 133 | [self changeNewLeftController:leftController]; 134 | } 135 | 136 | - (void)changeNewLeftController:(UIViewController *)newLeftController { 137 | [self addChildViewController:newLeftController]; 138 | [_splitView.leftView addSubview:newLeftController.view]; 139 | [newLeftController didMoveToParentViewController:self]; 140 | _leftController = newLeftController; 141 | } 142 | 143 | - (void)changeRightViewController:(UIViewController *)rightController{ 144 | UIViewController *oldController = _rightController; 145 | for (UIGestureRecognizer *recognizer in oldController.view.gestureRecognizers) { 146 | [self.view removeGestureRecognizer:recognizer]; 147 | } 148 | [oldController willMoveToParentViewController:nil]; 149 | [oldController.view removeFromSuperview]; 150 | [oldController removeFromParentViewController]; 151 | 152 | rightController.view.frame = _splitView.rightView.bounds; 153 | [self changeNewRightController:rightController]; 154 | } 155 | 156 | - (void)changeNewRightController:(UIViewController *)newRightController { 157 | [self addChildViewController:newRightController]; 158 | [_splitView.rightView addSubview:newRightController.view]; 159 | [newRightController didMoveToParentViewController:self]; 160 | _rightController = newRightController; 161 | 162 | [self setLeftBarButtonItem]; 163 | [self addTapGestureToRightSplit]; 164 | } 165 | 166 | #pragma mark - 167 | #pragma mark Left bar button item for right panel 168 | 169 | - (UIBarButtonItem *)leftButtonForCenterPanel { 170 | return [[UIBarButtonItem alloc] initWithImage:[[self class] defaultImage] 171 | style:UIBarButtonItemStylePlain 172 | target:self 173 | action:@selector(toggleLeftSplit:)]; 174 | } 175 | 176 | + (UIImage *)defaultImage { 177 | static UIImage *defaultImage = nil; 178 | static dispatch_once_t onceToken; 179 | dispatch_once(&onceToken, ^{ 180 | UIGraphicsBeginImageContextWithOptions(CGSizeMake(20.f, 13.f), NO, 0.0f); 181 | 182 | [[UIColor whiteColor] setFill]; 183 | [[UIBezierPath bezierPathWithRect:CGRectMake(0, 1, 20, 2)] fill]; 184 | [[UIBezierPath bezierPathWithRect:CGRectMake(0, 6, 20, 2)] fill]; 185 | [[UIBezierPath bezierPathWithRect:CGRectMake(0, 11, 20, 2)] fill]; 186 | 187 | defaultImage = UIGraphicsGetImageFromCurrentImageContext(); 188 | UIGraphicsEndImageContext(); 189 | 190 | }); 191 | return defaultImage; 192 | } 193 | 194 | - (void)setLeftBarButtonItem { 195 | if ([_rightController isKindOfClass:[UINavigationController class]]) { 196 | UINavigationController *navCtrl = (UINavigationController *)_rightController; 197 | navCtrl.topViewController.navigationItem.leftBarButtonItem = [self leftButtonForCenterPanel]; 198 | } 199 | } 200 | 201 | - (void)toggleLeftSplit:(id)sender { 202 | if (self.actualLeftSplitWidth == 0) { 203 | [self showLeftSplit]; 204 | } else { 205 | [self showRightSplitFullscreen]; 206 | } 207 | } 208 | 209 | - (void)showLeftSplit { 210 | [UIView animateWithDuration:0.2f animations:^{ 211 | [self updateActualLeftSplitWidthTogglingLeftSplit:YES]; 212 | self.leftController.view.alpha = 1.0f; 213 | }]; 214 | } 215 | 216 | - (void)showRightSplitFullscreen { 217 | [UIView animateWithDuration:0.2f animations:^{ 218 | [self updateActualLeftSplitWidthTogglingLeftSplit:YES]; 219 | self.leftController.view.alpha = 0.0f; 220 | }]; 221 | } 222 | 223 | #pragma mark - 224 | #pragma mark UISwipeGestureRecognizer 225 | 226 | - (void)addTapGestureToRightSplit { 227 | UISwipeGestureRecognizer *leftSwipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self 228 | action:@selector(swipedLeft:)]; 229 | leftSwipeGesture.direction = (UISwipeGestureRecognizerDirectionLeft); 230 | 231 | UISwipeGestureRecognizer *rightSwipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self 232 | action:@selector(swipedRight:)]; 233 | rightSwipeGesture.direction = (UISwipeGestureRecognizerDirectionRight); 234 | 235 | [self.rightController.view addGestureRecognizer:leftSwipeGesture]; 236 | [self.rightController.view addGestureRecognizer:rightSwipeGesture]; 237 | } 238 | 239 | #pragma mark - 240 | #pragma mark UISwipeGestureRecognizer events 241 | 242 | - (void)swipedRight:(UISwipeGestureRecognizer *)recognizer { 243 | if (self.leftSplitWidth == 0) [self showLeftSplit]; 244 | } 245 | 246 | - (void)swipedLeft:(UISwipeGestureRecognizer *)recognizer { 247 | if (self.leftSplitWidth > 0) [self showRightSplitFullscreen]; 248 | } 249 | 250 | #pragma mark - 251 | #pragma mark Change Width 252 | 253 | - (void)setLeftSplitWidth:(CGFloat)leftSplitWidth { 254 | _leftSplitWidth = leftSplitWidth; 255 | [self updateActualLeftSplitWidthTogglingLeftSplit:NO]; 256 | } 257 | 258 | - (void)updateActualLeftSplitWidthTogglingLeftSplit:(BOOL)toggleLeftSplit { 259 | 260 | CGRect frame = [[UIScreen mainScreen] bounds]; 261 | CGFloat iphoneFullScreenWidth = MIN(frame.size.width, frame.size.height); 262 | 263 | if (toggleLeftSplit) { 264 | if (self.actualLeftSplitWidth == 0) { 265 | // expand left split 266 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){ 267 | if(UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) { 268 | // on iphone-portrait, expand to fullscreen 269 | self.actualLeftSplitWidth = iphoneFullScreenWidth; 270 | } else if (MAX(frame.size.width, frame.size.height) < 568) { 271 | // in landscape-iphone with 'small' screen, expand left split to fullscreen 272 | self.actualLeftSplitWidth = MAX(frame.size.width, frame.size.height); 273 | } else { 274 | // expand to left split width value 275 | self.actualLeftSplitWidth = self.leftSplitWidth; 276 | } 277 | } else { 278 | // expand to left split width value 279 | self.actualLeftSplitWidth = self.leftSplitWidth; 280 | } 281 | } else { 282 | // hide left split 283 | self.actualLeftSplitWidth = 0; 284 | } 285 | 286 | // expand/compress! 287 | [_splitView setLeftSplitWidth:self.actualLeftSplitWidth]; 288 | } else { 289 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { 290 | if (UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) { 291 | // iphone-portrait 292 | if (self.actualLeftSplitWidth != 0) { 293 | // if actual left split width is != 0 and the device is in 294 | // phone-portrait, it means that we need to expand to fullscreen 295 | self.actualLeftSplitWidth = iphoneFullScreenWidth; 296 | [_splitView setLeftSplitWidth:self.actualLeftSplitWidth]; 297 | } else { 298 | // right split is fullscreen, left is compressed, nothing to do 299 | } 300 | } else { 301 | if (self.actualLeftSplitWidth != 0 && MAX(frame.size.width, frame.size.height) < 568) { 302 | // in landscape-iphone with 'small' screen, expand left split to fullscreen 303 | self.actualLeftSplitWidth = MAX(frame.size.width, frame.size.height); 304 | [_splitView setLeftSplitWidth:self.actualLeftSplitWidth]; 305 | } else if (self.actualLeftSplitWidth != 0) { 306 | // if actual left split width is != 0 and the device is in 307 | // phone-landscape, it means that we need to expand to left split width 308 | self.actualLeftSplitWidth = self.leftSplitWidth; 309 | [_splitView setLeftSplitWidth:self.actualLeftSplitWidth]; 310 | } else { 311 | // right split is fullscreen, left is compressed, nothing to do 312 | } 313 | } 314 | } else if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 315 | // nothing to do 316 | } 317 | } 318 | 319 | } 320 | 321 | - (void)setRightSplitWidth:(CGFloat)rightSplitWidth { 322 | [_splitView setRightSplitWidth:rightSplitWidth]; 323 | _rightSplitWidth = rightSplitWidth; 324 | } 325 | 326 | #pragma mark - Rotation Support 327 | 328 | - (NSUInteger)supportedInterfaceOrientations { 329 | return UIInterfaceOrientationMaskAll; 330 | } 331 | 332 | - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { 333 | [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; 334 | [self updateActualLeftSplitWidthTogglingLeftSplit:NO]; 335 | } 336 | 337 | @end 338 | 339 | #pragma mark - 340 | #pragma mark UIViewController Category 341 | 342 | @implementation UIViewController (QPSplitViewController) 343 | 344 | - (QPSplitViewController *)qp_splitViewController { 345 | UIViewController *parent = self; 346 | Class revealClass = [QPSplitViewController class]; 347 | 348 | while (nil != (parent = [parent parentViewController]) && 349 | ![parent isKindOfClass:revealClass] ){} 350 | 351 | return (id)parent; 352 | } 353 | 354 | @end 355 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 570A05E71906851800AFFFD4 /* UIApplication+AppDimensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 570A05E61906851800AFFFD4 /* UIApplication+AppDimensions.m */; }; 11 | D9B63DB418E967950054A7F2 /* QPLeftTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D9B63DB318E967950054A7F2 /* QPLeftTableViewController.m */; }; 12 | D9B63DB718E967F70054A7F2 /* QPColorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D9B63DB618E967F70054A7F2 /* QPColorViewController.m */; }; 13 | D9B63DBC18E96CB60054A7F2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9B63DBB18E96CB60054A7F2 /* QuartzCore.framework */; }; 14 | D9BC410918E9485A003808A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC410818E9485A003808A8 /* Foundation.framework */; }; 15 | D9BC410B18E9485A003808A8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC410A18E9485A003808A8 /* CoreGraphics.framework */; }; 16 | D9BC410D18E9485A003808A8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC410C18E9485A003808A8 /* UIKit.framework */; }; 17 | D9BC411318E9485A003808A8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D9BC411118E9485A003808A8 /* InfoPlist.strings */; }; 18 | D9BC411518E9485B003808A8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BC411418E9485B003808A8 /* main.m */; }; 19 | D9BC411918E9485B003808A8 /* QPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BC411818E9485B003808A8 /* QPAppDelegate.m */; }; 20 | D9BC411B18E9485B003808A8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D9BC411A18E9485B003808A8 /* Images.xcassets */; }; 21 | D9BC412218E9485B003808A8 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC412118E9485B003808A8 /* XCTest.framework */; }; 22 | D9BC412318E9485B003808A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC410818E9485A003808A8 /* Foundation.framework */; }; 23 | D9BC412418E9485B003808A8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9BC410C18E9485A003808A8 /* UIKit.framework */; }; 24 | D9BC412C18E9485B003808A8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D9BC412A18E9485B003808A8 /* InfoPlist.strings */; }; 25 | D9BC412E18E9485B003808A8 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BC412D18E9485B003808A8 /* ExampleTests.m */; }; 26 | D9BC413A18E948DB003808A8 /* QPSplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BC413918E948DB003808A8 /* QPSplitViewController.m */; }; 27 | D9BC414318E94E93003808A8 /* QPSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = D9BC414218E94E93003808A8 /* QPSplitView.m */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | D9BC412518E9485B003808A8 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = D9BC40FD18E9485A003808A8 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = D9BC410418E9485A003808A8; 36 | remoteInfo = Example; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 570A05E51906851800AFFFD4 /* UIApplication+AppDimensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIApplication+AppDimensions.h"; sourceTree = ""; }; 42 | 570A05E61906851800AFFFD4 /* UIApplication+AppDimensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIApplication+AppDimensions.m"; sourceTree = ""; }; 43 | D9B63DB218E967950054A7F2 /* QPLeftTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QPLeftTableViewController.h; sourceTree = ""; }; 44 | D9B63DB318E967950054A7F2 /* QPLeftTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QPLeftTableViewController.m; sourceTree = ""; }; 45 | D9B63DB518E967F70054A7F2 /* QPColorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QPColorViewController.h; sourceTree = ""; }; 46 | D9B63DB618E967F70054A7F2 /* QPColorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QPColorViewController.m; sourceTree = ""; }; 47 | D9B63DBB18E96CB60054A7F2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 48 | D9BC410518E9485A003808A8 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | D9BC410818E9485A003808A8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 50 | D9BC410A18E9485A003808A8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 51 | D9BC410C18E9485A003808A8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 52 | D9BC411018E9485A003808A8 /* Example-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = ""; }; 53 | D9BC411218E9485A003808A8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 54 | D9BC411418E9485B003808A8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | D9BC411618E9485B003808A8 /* Example-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Example-Prefix.pch"; sourceTree = ""; }; 56 | D9BC411718E9485B003808A8 /* QPAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QPAppDelegate.h; sourceTree = ""; }; 57 | D9BC411818E9485B003808A8 /* QPAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QPAppDelegate.m; sourceTree = ""; }; 58 | D9BC411A18E9485B003808A8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 59 | D9BC412018E9485B003808A8 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | D9BC412118E9485B003808A8 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 61 | D9BC412918E9485B003808A8 /* ExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ExampleTests-Info.plist"; sourceTree = ""; }; 62 | D9BC412B18E9485B003808A8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 63 | D9BC412D18E9485B003808A8 /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; }; 64 | D9BC413818E948DB003808A8 /* QPSplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QPSplitViewController.h; sourceTree = ""; }; 65 | D9BC413918E948DB003808A8 /* QPSplitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QPSplitViewController.m; sourceTree = ""; }; 66 | D9BC414118E94E93003808A8 /* QPSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QPSplitView.h; sourceTree = ""; }; 67 | D9BC414218E94E93003808A8 /* QPSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QPSplitView.m; sourceTree = ""; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | D9BC410218E9485A003808A8 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | D9B63DBC18E96CB60054A7F2 /* QuartzCore.framework in Frameworks */, 76 | D9BC410B18E9485A003808A8 /* CoreGraphics.framework in Frameworks */, 77 | D9BC410D18E9485A003808A8 /* UIKit.framework in Frameworks */, 78 | D9BC410918E9485A003808A8 /* Foundation.framework in Frameworks */, 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | D9BC411D18E9485B003808A8 /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | D9BC412218E9485B003808A8 /* XCTest.framework in Frameworks */, 87 | D9BC412418E9485B003808A8 /* UIKit.framework in Frameworks */, 88 | D9BC412318E9485B003808A8 /* Foundation.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | /* End PBXFrameworksBuildPhase section */ 93 | 94 | /* Begin PBXGroup section */ 95 | D9B63DAE18E967650054A7F2 /* Classes */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | D9B63DB218E967950054A7F2 /* QPLeftTableViewController.h */, 99 | D9B63DB318E967950054A7F2 /* QPLeftTableViewController.m */, 100 | D9B63DB518E967F70054A7F2 /* QPColorViewController.h */, 101 | D9B63DB618E967F70054A7F2 /* QPColorViewController.m */, 102 | ); 103 | path = Classes; 104 | sourceTree = ""; 105 | }; 106 | D9BC40FC18E9485A003808A8 = { 107 | isa = PBXGroup; 108 | children = ( 109 | D9BC410E18E9485A003808A8 /* Example */, 110 | D9BC412718E9485B003808A8 /* ExampleTests */, 111 | D9BC410718E9485A003808A8 /* Frameworks */, 112 | D9BC410618E9485A003808A8 /* Products */, 113 | ); 114 | sourceTree = ""; 115 | }; 116 | D9BC410618E9485A003808A8 /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | D9BC410518E9485A003808A8 /* Example.app */, 120 | D9BC412018E9485B003808A8 /* ExampleTests.xctest */, 121 | ); 122 | name = Products; 123 | sourceTree = ""; 124 | }; 125 | D9BC410718E9485A003808A8 /* Frameworks */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | D9B63DBB18E96CB60054A7F2 /* QuartzCore.framework */, 129 | D9BC410818E9485A003808A8 /* Foundation.framework */, 130 | D9BC410A18E9485A003808A8 /* CoreGraphics.framework */, 131 | D9BC410C18E9485A003808A8 /* UIKit.framework */, 132 | D9BC412118E9485B003808A8 /* XCTest.framework */, 133 | ); 134 | name = Frameworks; 135 | sourceTree = ""; 136 | }; 137 | D9BC410E18E9485A003808A8 /* Example */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | D9B63DAE18E967650054A7F2 /* Classes */, 141 | D9BC413718E948BF003808A8 /* QPSplitViewController */, 142 | D9BC411718E9485B003808A8 /* QPAppDelegate.h */, 143 | D9BC411818E9485B003808A8 /* QPAppDelegate.m */, 144 | D9BC411A18E9485B003808A8 /* Images.xcassets */, 145 | D9BC410F18E9485A003808A8 /* Supporting Files */, 146 | ); 147 | path = Example; 148 | sourceTree = ""; 149 | }; 150 | D9BC410F18E9485A003808A8 /* Supporting Files */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | D9BC411018E9485A003808A8 /* Example-Info.plist */, 154 | D9BC411118E9485A003808A8 /* InfoPlist.strings */, 155 | D9BC411418E9485B003808A8 /* main.m */, 156 | D9BC411618E9485B003808A8 /* Example-Prefix.pch */, 157 | ); 158 | name = "Supporting Files"; 159 | sourceTree = ""; 160 | }; 161 | D9BC412718E9485B003808A8 /* ExampleTests */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | D9BC412D18E9485B003808A8 /* ExampleTests.m */, 165 | D9BC412818E9485B003808A8 /* Supporting Files */, 166 | ); 167 | path = ExampleTests; 168 | sourceTree = ""; 169 | }; 170 | D9BC412818E9485B003808A8 /* Supporting Files */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | D9BC412918E9485B003808A8 /* ExampleTests-Info.plist */, 174 | D9BC412A18E9485B003808A8 /* InfoPlist.strings */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | D9BC413718E948BF003808A8 /* QPSplitViewController */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | D9BC413818E948DB003808A8 /* QPSplitViewController.h */, 183 | D9BC413918E948DB003808A8 /* QPSplitViewController.m */, 184 | D9BC414118E94E93003808A8 /* QPSplitView.h */, 185 | D9BC414218E94E93003808A8 /* QPSplitView.m */, 186 | 570A05E51906851800AFFFD4 /* UIApplication+AppDimensions.h */, 187 | 570A05E61906851800AFFFD4 /* UIApplication+AppDimensions.m */, 188 | ); 189 | name = QPSplitViewController; 190 | path = ../../QPSplitViewController; 191 | sourceTree = ""; 192 | }; 193 | /* End PBXGroup section */ 194 | 195 | /* Begin PBXNativeTarget section */ 196 | D9BC410418E9485A003808A8 /* Example */ = { 197 | isa = PBXNativeTarget; 198 | buildConfigurationList = D9BC413118E9485B003808A8 /* Build configuration list for PBXNativeTarget "Example" */; 199 | buildPhases = ( 200 | D9BC410118E9485A003808A8 /* Sources */, 201 | D9BC410218E9485A003808A8 /* Frameworks */, 202 | D9BC410318E9485A003808A8 /* Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | ); 208 | name = Example; 209 | productName = Example; 210 | productReference = D9BC410518E9485A003808A8 /* Example.app */; 211 | productType = "com.apple.product-type.application"; 212 | }; 213 | D9BC411F18E9485B003808A8 /* ExampleTests */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = D9BC413418E9485B003808A8 /* Build configuration list for PBXNativeTarget "ExampleTests" */; 216 | buildPhases = ( 217 | D9BC411C18E9485B003808A8 /* Sources */, 218 | D9BC411D18E9485B003808A8 /* Frameworks */, 219 | D9BC411E18E9485B003808A8 /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | D9BC412618E9485B003808A8 /* PBXTargetDependency */, 225 | ); 226 | name = ExampleTests; 227 | productName = ExampleTests; 228 | productReference = D9BC412018E9485B003808A8 /* ExampleTests.xctest */; 229 | productType = "com.apple.product-type.bundle.unit-test"; 230 | }; 231 | /* End PBXNativeTarget section */ 232 | 233 | /* Begin PBXProject section */ 234 | D9BC40FD18E9485A003808A8 /* Project object */ = { 235 | isa = PBXProject; 236 | attributes = { 237 | CLASSPREFIX = QP; 238 | LastUpgradeCheck = 0510; 239 | ORGANIZATIONNAME = quangpc; 240 | TargetAttributes = { 241 | D9BC411F18E9485B003808A8 = { 242 | TestTargetID = D9BC410418E9485A003808A8; 243 | }; 244 | }; 245 | }; 246 | buildConfigurationList = D9BC410018E9485A003808A8 /* Build configuration list for PBXProject "Example" */; 247 | compatibilityVersion = "Xcode 3.2"; 248 | developmentRegion = English; 249 | hasScannedForEncodings = 0; 250 | knownRegions = ( 251 | en, 252 | ); 253 | mainGroup = D9BC40FC18E9485A003808A8; 254 | productRefGroup = D9BC410618E9485A003808A8 /* Products */; 255 | projectDirPath = ""; 256 | projectRoot = ""; 257 | targets = ( 258 | D9BC410418E9485A003808A8 /* Example */, 259 | D9BC411F18E9485B003808A8 /* ExampleTests */, 260 | ); 261 | }; 262 | /* End PBXProject section */ 263 | 264 | /* Begin PBXResourcesBuildPhase section */ 265 | D9BC410318E9485A003808A8 /* Resources */ = { 266 | isa = PBXResourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | D9BC411318E9485A003808A8 /* InfoPlist.strings in Resources */, 270 | D9BC411B18E9485B003808A8 /* Images.xcassets in Resources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | D9BC411E18E9485B003808A8 /* Resources */ = { 275 | isa = PBXResourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | D9BC412C18E9485B003808A8 /* InfoPlist.strings in Resources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | /* End PBXResourcesBuildPhase section */ 283 | 284 | /* Begin PBXSourcesBuildPhase section */ 285 | D9BC410118E9485A003808A8 /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | D9BC411518E9485B003808A8 /* main.m in Sources */, 290 | D9B63DB718E967F70054A7F2 /* QPColorViewController.m in Sources */, 291 | D9BC414318E94E93003808A8 /* QPSplitView.m in Sources */, 292 | 570A05E71906851800AFFFD4 /* UIApplication+AppDimensions.m in Sources */, 293 | D9BC411918E9485B003808A8 /* QPAppDelegate.m in Sources */, 294 | D9BC413A18E948DB003808A8 /* QPSplitViewController.m in Sources */, 295 | D9B63DB418E967950054A7F2 /* QPLeftTableViewController.m in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | D9BC411C18E9485B003808A8 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | D9BC412E18E9485B003808A8 /* ExampleTests.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXTargetDependency section */ 310 | D9BC412618E9485B003808A8 /* PBXTargetDependency */ = { 311 | isa = PBXTargetDependency; 312 | target = D9BC410418E9485A003808A8 /* Example */; 313 | targetProxy = D9BC412518E9485B003808A8 /* PBXContainerItemProxy */; 314 | }; 315 | /* End PBXTargetDependency section */ 316 | 317 | /* Begin PBXVariantGroup section */ 318 | D9BC411118E9485A003808A8 /* InfoPlist.strings */ = { 319 | isa = PBXVariantGroup; 320 | children = ( 321 | D9BC411218E9485A003808A8 /* en */, 322 | ); 323 | name = InfoPlist.strings; 324 | sourceTree = ""; 325 | }; 326 | D9BC412A18E9485B003808A8 /* InfoPlist.strings */ = { 327 | isa = PBXVariantGroup; 328 | children = ( 329 | D9BC412B18E9485B003808A8 /* en */, 330 | ); 331 | name = InfoPlist.strings; 332 | sourceTree = ""; 333 | }; 334 | /* End PBXVariantGroup section */ 335 | 336 | /* Begin XCBuildConfiguration section */ 337 | D9BC412F18E9485B003808A8 /* Debug */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | ALWAYS_SEARCH_USER_PATHS = NO; 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 342 | CLANG_CXX_LIBRARY = "libc++"; 343 | CLANG_ENABLE_MODULES = YES; 344 | CLANG_ENABLE_OBJC_ARC = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_CONSTANT_CONVERSION = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 353 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 354 | COPY_PHASE_STRIP = NO; 355 | GCC_C_LANGUAGE_STANDARD = gnu99; 356 | GCC_DYNAMIC_NO_PIC = NO; 357 | GCC_OPTIMIZATION_LEVEL = 0; 358 | GCC_PREPROCESSOR_DEFINITIONS = ( 359 | "DEBUG=1", 360 | "$(inherited)", 361 | ); 362 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 365 | GCC_WARN_UNDECLARED_SELECTOR = YES; 366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 367 | GCC_WARN_UNUSED_FUNCTION = YES; 368 | GCC_WARN_UNUSED_VARIABLE = YES; 369 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 370 | ONLY_ACTIVE_ARCH = YES; 371 | SDKROOT = iphoneos; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | }; 374 | name = Debug; 375 | }; 376 | D9BC413018E9485B003808A8 /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BOOL_CONVERSION = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 393 | COPY_PHASE_STRIP = YES; 394 | ENABLE_NS_ASSERTIONS = NO; 395 | GCC_C_LANGUAGE_STANDARD = gnu99; 396 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 397 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 398 | GCC_WARN_UNDECLARED_SELECTOR = YES; 399 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 400 | GCC_WARN_UNUSED_FUNCTION = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 403 | SDKROOT = iphoneos; 404 | TARGETED_DEVICE_FAMILY = "1,2"; 405 | VALIDATE_PRODUCT = YES; 406 | }; 407 | name = Release; 408 | }; 409 | D9BC413218E9485B003808A8 /* Debug */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 414 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 415 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 416 | INFOPLIST_FILE = "Example/Example-Info.plist"; 417 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 418 | PRODUCT_NAME = "$(TARGET_NAME)"; 419 | WRAPPER_EXTENSION = app; 420 | }; 421 | name = Debug; 422 | }; 423 | D9BC413318E9485B003808A8 /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 427 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 428 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 429 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 430 | INFOPLIST_FILE = "Example/Example-Info.plist"; 431 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | WRAPPER_EXTENSION = app; 434 | }; 435 | name = Release; 436 | }; 437 | D9BC413518E9485B003808A8 /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(SDKROOT)/Developer/Library/Frameworks", 443 | "$(inherited)", 444 | "$(DEVELOPER_FRAMEWORKS_DIR)", 445 | ); 446 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 447 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 448 | GCC_PREPROCESSOR_DEFINITIONS = ( 449 | "DEBUG=1", 450 | "$(inherited)", 451 | ); 452 | INFOPLIST_FILE = "ExampleTests/ExampleTests-Info.plist"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUNDLE_LOADER)"; 455 | WRAPPER_EXTENSION = xctest; 456 | }; 457 | name = Debug; 458 | }; 459 | D9BC413618E9485B003808A8 /* Release */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 463 | FRAMEWORK_SEARCH_PATHS = ( 464 | "$(SDKROOT)/Developer/Library/Frameworks", 465 | "$(inherited)", 466 | "$(DEVELOPER_FRAMEWORKS_DIR)", 467 | ); 468 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 469 | GCC_PREFIX_HEADER = "Example/Example-Prefix.pch"; 470 | INFOPLIST_FILE = "ExampleTests/ExampleTests-Info.plist"; 471 | PRODUCT_NAME = "$(TARGET_NAME)"; 472 | TEST_HOST = "$(BUNDLE_LOADER)"; 473 | WRAPPER_EXTENSION = xctest; 474 | }; 475 | name = Release; 476 | }; 477 | /* End XCBuildConfiguration section */ 478 | 479 | /* Begin XCConfigurationList section */ 480 | D9BC410018E9485A003808A8 /* Build configuration list for PBXProject "Example" */ = { 481 | isa = XCConfigurationList; 482 | buildConfigurations = ( 483 | D9BC412F18E9485B003808A8 /* Debug */, 484 | D9BC413018E9485B003808A8 /* Release */, 485 | ); 486 | defaultConfigurationIsVisible = 0; 487 | defaultConfigurationName = Release; 488 | }; 489 | D9BC413118E9485B003808A8 /* Build configuration list for PBXNativeTarget "Example" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | D9BC413218E9485B003808A8 /* Debug */, 493 | D9BC413318E9485B003808A8 /* Release */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | D9BC413418E9485B003808A8 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | D9BC413518E9485B003808A8 /* Debug */, 502 | D9BC413618E9485B003808A8 /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | /* End XCConfigurationList section */ 508 | }; 509 | rootObject = D9BC40FD18E9485A003808A8 /* Project object */; 510 | } 511 | --------------------------------------------------------------------------------