├── CDSideBar ├── Images │ ├── menuChat.png │ ├── menuClose.png │ ├── menuIcon.png │ ├── menuMap.png │ └── menuUsers.png ├── Images.xcassets │ ├── Back.imageset │ │ ├── background.png │ │ ├── background@2x.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── AppDelegate.h ├── ViewController.h ├── main.m ├── CDSideBarController │ ├── CDSideBarController.h │ └── CDSideBarController.m ├── Info.plist ├── ViewController.m ├── AppDelegate.m └── Base.lproj │ └── Main.storyboard ├── CDSideBar.xcodeproj ├── xcuserdata │ └── christophedellac.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── CDSideBar.xcscheme ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── christophedellac.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── CDSideBar.xccheckout └── project.pbxproj ├── CDSideBarTests ├── Info.plist └── CDSideBarTests.m ├── LICENSE.md └── README.md /CDSideBar/Images/menuChat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images/menuChat.png -------------------------------------------------------------------------------- /CDSideBar/Images/menuClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images/menuClose.png -------------------------------------------------------------------------------- /CDSideBar/Images/menuIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images/menuIcon.png -------------------------------------------------------------------------------- /CDSideBar/Images/menuMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images/menuMap.png -------------------------------------------------------------------------------- /CDSideBar/Images/menuUsers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images/menuUsers.png -------------------------------------------------------------------------------- /CDSideBar/Images.xcassets/Back.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images.xcassets/Back.imageset/background.png -------------------------------------------------------------------------------- /CDSideBar/Images.xcassets/Back.imageset/background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar/Images.xcassets/Back.imageset/background@2x.png -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/xcuserdata/christophedellac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/project.xcworkspace/xcuserdata/christophedellac.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeTazz1/CDSideBarController/HEAD/CDSideBar.xcodeproj/project.xcworkspace/xcuserdata/christophedellac.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CDSideBar/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CDSideBar/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "CDSideBarController.h" 11 | 12 | @interface ViewController : UIViewController 13 | { 14 | CDSideBarController *sideBar; 15 | } 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /CDSideBar/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /CDSideBar/Images.xcassets/Back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "background.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "background@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /CDSideBar/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" : "iphone", 20 | "size" : "60x60", 21 | "scale" : "3x" 22 | } 23 | ], 24 | "info" : { 25 | "version" : 1, 26 | "author" : "xcode" 27 | } 28 | } -------------------------------------------------------------------------------- /CDSideBar/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 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/xcuserdata/christophedellac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CDSideBar.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 61BDE1C119C1D9380036C993 16 | 17 | primary 18 | 19 | 20 | 61BDE1D719C1D9380036C993 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CDSideBarTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ChristopheDellac.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /CDSideBar/CDSideBarController/CDSideBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDSideBarController.h 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol CDSideBarControllerDelegate 13 | 14 | - (void)menuButtonClicked:(int)index; 15 | 16 | @end 17 | 18 | @interface CDSideBarController : NSObject 19 | { 20 | UIView *_backgroundMenuView; 21 | UIButton *_menuButton; 22 | NSMutableArray *_buttonList; 23 | } 24 | 25 | 26 | @property (nonatomic, retain) UIColor *menuColor; 27 | @property (nonatomic) BOOL isOpen; 28 | 29 | @property (nonatomic, retain) id delegate; 30 | 31 | - (CDSideBarController*)initWithImages:(NSArray*)buttonList; 32 | - (void)insertMenuButtonOnView:(UIView*)view atPosition:(CGPoint)position; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /CDSideBarTests/CDSideBarTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDSideBarTests.m 3 | // CDSideBarTests 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CDSideBarTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CDSideBarTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | XCTAssert(YES, @"Pass"); 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /CDSideBar/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ChristopheDellac.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 UIChris 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CDSideBar/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | NSArray *imageList = @[[UIImage imageNamed:@"menuChat.png"], [UIImage imageNamed:@"menuUsers.png"], [UIImage imageNamed:@"menuMap.png"], [UIImage imageNamed:@"menuClose.png"]]; 21 | sideBar = [[CDSideBarController alloc] initWithImages:imageList]; 22 | sideBar.delegate = self; 23 | } 24 | 25 | - (void)viewDidAppear:(BOOL)animated 26 | { 27 | [super viewDidAppear:animated]; 28 | 29 | [sideBar insertMenuButtonOnView:[UIApplication sharedApplication].delegate.window atPosition:CGPointMake(self.view.frame.size.width - 70, 50)]; 30 | } 31 | 32 | - (void)didReceiveMemoryWarning { 33 | [super didReceiveMemoryWarning]; 34 | // Dispose of any resources that can be recreated. 35 | } 36 | 37 | 38 | #pragma mark - 39 | #pragma mark - CDSideBarController delegate 40 | 41 | - (void)menuButtonClicked:(int)index 42 | { 43 | // Execute what ever you want 44 | } 45 | @end 46 | -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/project.xcworkspace/xcshareddata/CDSideBar.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | DDBF4C9A-98D1-4F7E-840A-E2108A1A1FB1 9 | IDESourceControlProjectName 10 | CDSideBar 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 4155EB27E924293C270F0A40350D8CC5DC205638 14 | https://github.com/christophedellac/CDSideBarController 15 | 16 | IDESourceControlProjectPath 17 | CDSideBar.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 4155EB27E924293C270F0A40350D8CC5DC205638 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/christophedellac/CDSideBarController 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 4155EB27E924293C270F0A40350D8CC5DC205638 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 4155EB27E924293C270F0A40350D8CC5DC205638 36 | IDESourceControlWCCName 37 | CDSideBarController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CDSideBarController 2 | =================== 3 | 4 | CDSideBarController is a light and easy side bar with custom iOS7 animations and actions 5 | 6 | How does it work ? 7 | 8 | 1. Import CDSideBar/CDSideBarController in your project 9 | 10 | 2. .h file
11 | 2.1 - #import "CDSideBarController.h" in the header file
12 | 2.2 - Add delegate
13 | 2.3 - Add CDSideBarController *sideBar in your interface
14 | Should look like this:
15 | #import "CDSideBarController.h"
16 | 17 | @interface ViewController : UIViewController
18 | {
19 | CDSideBarController *sideBar;
20 | }
21 | 22 | 3. .m file
23 | 3.1 - In viewDidLoad, create a NSArray that contains your menu images
24 | 3.2 - Create your instance of CDSideBarController with this array
25 | 3.3 - Set self as a delegate to this instance
26 | Should look like this:
27 | NSArray *imageList = @[[UIImage imageNamed:@"menuChat.png"], [UIImage imageNamed:@"menuUsers.png"], [UIImage imageNamed:@"menuMap.png"], [UIImage imageNamed:@"menuClose.png"]]; 28 | sideBar = [[CDSideBarController alloc] initWithImages:imageList];
29 | sideBar.delegate = self;
30 | 3.4 - Add the delegate method to be notified each time a menu button is clicked
31 | - (void)menuButtonClicked:(int)index
32 | {
33 | // Execute what ever you want
34 | }
35 | 36 | 3.4 - Once you want the sidebar appear, just add :
37 | [sideBar insertMenuButtonOnView:self.view atPosition:CGPointMake(self.view.frame.size.width - 70, 50)];
38 | AtPosition correspond to the position where the show/hide menu button will be displayed
39 | 40 | You're all set!
41 | -------------------------------------------------------------------------------- /CDSideBar/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | return YES; 22 | } 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // 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. 27 | } 28 | 29 | - (void)applicationDidEnterBackground:(UIApplication *)application { 30 | // 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. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | - (void)applicationWillEnterForeground:(UIApplication *)application { 35 | // 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. 36 | } 37 | 38 | - (void)applicationDidBecomeActive:(UIApplication *)application { 39 | // 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. 40 | } 41 | 42 | - (void)applicationWillTerminate:(UIApplication *)application { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /CDSideBar/Base.lproj/Main.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 | -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/xcuserdata/christophedellac.xcuserdatad/xcschemes/CDSideBar.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 | -------------------------------------------------------------------------------- /CDSideBar/CDSideBarController/CDSideBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDSideBarController.m 3 | // CDSideBar 4 | // 5 | // Created by Christophe Dellac on 9/11/14. 6 | // Copyright (c) 2014 Christophe Dellac. All rights reserved. 7 | // 8 | 9 | #import "CDSideBarController.h" 10 | 11 | @implementation CDSideBarController 12 | 13 | @synthesize menuColor = _menuColor; 14 | @synthesize isOpen = _isOpen; 15 | 16 | #pragma mark - 17 | #pragma mark Init 18 | 19 | - (CDSideBarController*)initWithImages:(NSArray*)images 20 | { 21 | _menuButton = [UIButton buttonWithType:UIButtonTypeCustom]; 22 | _menuButton.frame = CGRectMake(0, 0, 40, 40); 23 | [_menuButton setImage:[UIImage imageNamed:@"menuIcon.png"] forState:UIControlStateNormal]; 24 | [_menuButton addTarget:self action:@selector(showMenu) forControlEvents:UIControlEventTouchUpInside]; 25 | 26 | _backgroundMenuView = [[UIView alloc] init]; 27 | _menuColor = [UIColor whiteColor]; 28 | _buttonList = [[NSMutableArray alloc] initWithCapacity:images.count]; 29 | 30 | int index = 0; 31 | for (UIImage *image in [images copy]) 32 | { 33 | UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; 34 | [button setImage:image forState:UIControlStateNormal]; 35 | button.frame = CGRectMake(20, 50 + (80 * index), 50, 50); 36 | button.tag = index; 37 | [button addTarget:self action:@selector(onMenuButtonClick:) forControlEvents:UIControlEventTouchUpInside]; 38 | [_buttonList addObject:button]; 39 | ++index; 40 | } 41 | return self; 42 | } 43 | 44 | - (void)insertMenuButtonOnView:(UIView*)view atPosition:(CGPoint)position 45 | { 46 | _menuButton.frame = CGRectMake(position.x, position.y, _menuButton.frame.size.width, _menuButton.frame.size.height); 47 | [view addSubview:_menuButton]; 48 | 49 | UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissMenu)]; 50 | [view addGestureRecognizer:singleTap]; 51 | 52 | for (UIButton *button in _buttonList) 53 | { 54 | [_backgroundMenuView addSubview:button]; 55 | } 56 | 57 | _backgroundMenuView.frame = CGRectMake(view.frame.size.width, 0, 90, view.frame.size.height); 58 | _backgroundMenuView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.5f]; 59 | [view addSubview:_backgroundMenuView]; 60 | } 61 | 62 | #pragma mark - 63 | #pragma mark Menu button action 64 | 65 | - (void)dismissMenuWithSelection:(UIButton*)button 66 | { 67 | [UIView animateWithDuration:0.3f 68 | delay:0.0f 69 | usingSpringWithDamping:.2f 70 | initialSpringVelocity:10.f 71 | options:0 animations:^{ 72 | button.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.2, 1.2); 73 | } 74 | completion:^(BOOL finished) { 75 | [self dismissMenu]; 76 | }]; 77 | } 78 | 79 | - (void)dismissMenu 80 | { 81 | if (_isOpen) 82 | { 83 | _isOpen = !_isOpen; 84 | [self performDismissAnimation]; 85 | } 86 | } 87 | 88 | - (void)showMenu 89 | { 90 | if (!_isOpen) 91 | { 92 | _isOpen = !_isOpen; 93 | [self performSelectorInBackground:@selector(performOpenAnimation) withObject:nil]; 94 | } 95 | } 96 | 97 | - (void)onMenuButtonClick:(UIButton*)button 98 | { 99 | if ([self.delegate respondsToSelector:@selector(menuButtonClicked:)]) 100 | [self.delegate menuButtonClicked:button.tag]; 101 | [self dismissMenuWithSelection:button]; 102 | } 103 | 104 | #pragma mark - 105 | #pragma mark - Animations 106 | 107 | - (void)performDismissAnimation 108 | { 109 | [UIView animateWithDuration:0.4 animations:^{ 110 | _menuButton.alpha = 1.0f; 111 | _menuButton.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, 0, 0); 112 | _backgroundMenuView.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, 0, 0); 113 | }]; 114 | } 115 | 116 | - (void)performOpenAnimation 117 | { 118 | dispatch_async(dispatch_get_main_queue(), ^{ 119 | [UIView animateWithDuration:0.4 animations:^{ 120 | _menuButton.alpha = 0.0f; 121 | _menuButton.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, -90, 0); 122 | _backgroundMenuView.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, -90, 0); 123 | }]; 124 | }); 125 | for (UIButton *button in _buttonList) 126 | { 127 | [NSThread sleepForTimeInterval:0.02f]; 128 | dispatch_async(dispatch_get_main_queue(), ^{ 129 | button.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, 20, 0); 130 | [UIView animateWithDuration:0.3f 131 | delay:0.3f 132 | usingSpringWithDamping:.3f 133 | initialSpringVelocity:10.f 134 | options:0 animations:^{ 135 | button.transform = CGAffineTransformTranslate(CGAffineTransformIdentity, 0, 0); 136 | } 137 | completion:^(BOOL finished) { 138 | }]; 139 | }); 140 | } 141 | } 142 | 143 | @end 144 | -------------------------------------------------------------------------------- /CDSideBar.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 61BDE1C819C1D9380036C993 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BDE1C719C1D9380036C993 /* main.m */; }; 11 | 61BDE1CB19C1D9380036C993 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BDE1CA19C1D9380036C993 /* AppDelegate.m */; }; 12 | 61BDE1CE19C1D9380036C993 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BDE1CD19C1D9380036C993 /* ViewController.m */; }; 13 | 61BDE1D119C1D9380036C993 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1CF19C1D9380036C993 /* Main.storyboard */; }; 14 | 61BDE1D319C1D9380036C993 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1D219C1D9380036C993 /* Images.xcassets */; }; 15 | 61BDE1DF19C1D9380036C993 /* CDSideBarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BDE1DE19C1D9380036C993 /* CDSideBarTests.m */; }; 16 | 61BDE1ED19C1E3B10036C993 /* CDSideBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61BDE1EC19C1E3B10036C993 /* CDSideBarController.m */; }; 17 | 61BDE1F219C1EA100036C993 /* menuIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1F119C1EA100036C993 /* menuIcon.png */; }; 18 | 61BDE1F719C2F8920036C993 /* menuChat.png in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1F319C2F8920036C993 /* menuChat.png */; }; 19 | 61BDE1F819C2F8920036C993 /* menuClose.png in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1F419C2F8920036C993 /* menuClose.png */; }; 20 | 61BDE1F919C2F8920036C993 /* menuMap.png in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1F519C2F8920036C993 /* menuMap.png */; }; 21 | 61BDE1FA19C2F8920036C993 /* menuUsers.png in Resources */ = {isa = PBXBuildFile; fileRef = 61BDE1F619C2F8920036C993 /* menuUsers.png */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 61BDE1D919C1D9380036C993 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 61BDE1BA19C1D9380036C993 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 61BDE1C119C1D9380036C993; 30 | remoteInfo = CDSideBar; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 61BDE1C219C1D9380036C993 /* CDSideBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CDSideBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 61BDE1C619C1D9380036C993 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 61BDE1C719C1D9380036C993 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | 61BDE1C919C1D9380036C993 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 39 | 61BDE1CA19C1D9380036C993 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 40 | 61BDE1CC19C1D9380036C993 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 41 | 61BDE1CD19C1D9380036C993 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 42 | 61BDE1D019C1D9380036C993 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 43 | 61BDE1D219C1D9380036C993 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 44 | 61BDE1D819C1D9380036C993 /* CDSideBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDSideBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 61BDE1DD19C1D9380036C993 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 61BDE1DE19C1D9380036C993 /* CDSideBarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDSideBarTests.m; sourceTree = ""; }; 47 | 61BDE1EB19C1E3B10036C993 /* CDSideBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDSideBarController.h; path = CDSideBarController/CDSideBarController.h; sourceTree = ""; }; 48 | 61BDE1EC19C1E3B10036C993 /* CDSideBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDSideBarController.m; path = CDSideBarController/CDSideBarController.m; sourceTree = ""; }; 49 | 61BDE1F119C1EA100036C993 /* menuIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuIcon.png; path = Images/menuIcon.png; sourceTree = ""; }; 50 | 61BDE1F319C2F8920036C993 /* menuChat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuChat.png; path = Images/menuChat.png; sourceTree = ""; }; 51 | 61BDE1F419C2F8920036C993 /* menuClose.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuClose.png; path = Images/menuClose.png; sourceTree = ""; }; 52 | 61BDE1F519C2F8920036C993 /* menuMap.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuMap.png; path = Images/menuMap.png; sourceTree = ""; }; 53 | 61BDE1F619C2F8920036C993 /* menuUsers.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuUsers.png; path = Images/menuUsers.png; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 61BDE1BF19C1D9380036C993 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 61BDE1D519C1D9380036C993 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 61BDE1B919C1D9380036C993 = { 75 | isa = PBXGroup; 76 | children = ( 77 | 61BDE1C419C1D9380036C993 /* CDSideBar */, 78 | 61BDE1DB19C1D9380036C993 /* CDSideBarTests */, 79 | 61BDE1C319C1D9380036C993 /* Products */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | 61BDE1C319C1D9380036C993 /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 61BDE1C219C1D9380036C993 /* CDSideBar.app */, 87 | 61BDE1D819C1D9380036C993 /* CDSideBarTests.xctest */, 88 | ); 89 | name = Products; 90 | sourceTree = ""; 91 | }; 92 | 61BDE1C419C1D9380036C993 /* CDSideBar */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 61BDE1EA19C1E3750036C993 /* CDSideBarController */, 96 | 61BDE1CA19C1D9380036C993 /* AppDelegate.m */, 97 | 61BDE1C919C1D9380036C993 /* AppDelegate.h */, 98 | 61BDE1CC19C1D9380036C993 /* ViewController.h */, 99 | 61BDE1CD19C1D9380036C993 /* ViewController.m */, 100 | 61BDE1CF19C1D9380036C993 /* Main.storyboard */, 101 | 61BDE1D219C1D9380036C993 /* Images.xcassets */, 102 | 61BDE1C519C1D9380036C993 /* Supporting Files */, 103 | ); 104 | path = CDSideBar; 105 | sourceTree = ""; 106 | }; 107 | 61BDE1C519C1D9380036C993 /* Supporting Files */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 61BDE1C619C1D9380036C993 /* Info.plist */, 111 | 61BDE1C719C1D9380036C993 /* main.m */, 112 | ); 113 | name = "Supporting Files"; 114 | sourceTree = ""; 115 | }; 116 | 61BDE1DB19C1D9380036C993 /* CDSideBarTests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 61BDE1DE19C1D9380036C993 /* CDSideBarTests.m */, 120 | 61BDE1DC19C1D9380036C993 /* Supporting Files */, 121 | ); 122 | path = CDSideBarTests; 123 | sourceTree = ""; 124 | }; 125 | 61BDE1DC19C1D9380036C993 /* Supporting Files */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 61BDE1DD19C1D9380036C993 /* Info.plist */, 129 | ); 130 | name = "Supporting Files"; 131 | sourceTree = ""; 132 | }; 133 | 61BDE1EA19C1E3750036C993 /* CDSideBarController */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | 61BDE1F019C1E9EA0036C993 /* Icons */, 137 | 61BDE1EB19C1E3B10036C993 /* CDSideBarController.h */, 138 | 61BDE1EC19C1E3B10036C993 /* CDSideBarController.m */, 139 | ); 140 | name = CDSideBarController; 141 | sourceTree = ""; 142 | }; 143 | 61BDE1F019C1E9EA0036C993 /* Icons */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 61BDE1F319C2F8920036C993 /* menuChat.png */, 147 | 61BDE1F419C2F8920036C993 /* menuClose.png */, 148 | 61BDE1F519C2F8920036C993 /* menuMap.png */, 149 | 61BDE1F619C2F8920036C993 /* menuUsers.png */, 150 | 61BDE1F119C1EA100036C993 /* menuIcon.png */, 151 | ); 152 | name = Icons; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXNativeTarget section */ 158 | 61BDE1C119C1D9380036C993 /* CDSideBar */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 61BDE1E219C1D9380036C993 /* Build configuration list for PBXNativeTarget "CDSideBar" */; 161 | buildPhases = ( 162 | 61BDE1BE19C1D9380036C993 /* Sources */, 163 | 61BDE1BF19C1D9380036C993 /* Frameworks */, 164 | 61BDE1C019C1D9380036C993 /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = CDSideBar; 171 | productName = CDSideBar; 172 | productReference = 61BDE1C219C1D9380036C993 /* CDSideBar.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | 61BDE1D719C1D9380036C993 /* CDSideBarTests */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 61BDE1E519C1D9380036C993 /* Build configuration list for PBXNativeTarget "CDSideBarTests" */; 178 | buildPhases = ( 179 | 61BDE1D419C1D9380036C993 /* Sources */, 180 | 61BDE1D519C1D9380036C993 /* Frameworks */, 181 | 61BDE1D619C1D9380036C993 /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | 61BDE1DA19C1D9380036C993 /* PBXTargetDependency */, 187 | ); 188 | name = CDSideBarTests; 189 | productName = CDSideBarTests; 190 | productReference = 61BDE1D819C1D9380036C993 /* CDSideBarTests.xctest */; 191 | productType = "com.apple.product-type.bundle.unit-test"; 192 | }; 193 | /* End PBXNativeTarget section */ 194 | 195 | /* Begin PBXProject section */ 196 | 61BDE1BA19C1D9380036C993 /* Project object */ = { 197 | isa = PBXProject; 198 | attributes = { 199 | LastUpgradeCheck = 0600; 200 | ORGANIZATIONNAME = "Christophe Dellac"; 201 | TargetAttributes = { 202 | 61BDE1C119C1D9380036C993 = { 203 | CreatedOnToolsVersion = 6.0; 204 | }; 205 | 61BDE1D719C1D9380036C993 = { 206 | CreatedOnToolsVersion = 6.0; 207 | TestTargetID = 61BDE1C119C1D9380036C993; 208 | }; 209 | }; 210 | }; 211 | buildConfigurationList = 61BDE1BD19C1D9380036C993 /* Build configuration list for PBXProject "CDSideBar" */; 212 | compatibilityVersion = "Xcode 3.2"; 213 | developmentRegion = English; 214 | hasScannedForEncodings = 0; 215 | knownRegions = ( 216 | en, 217 | Base, 218 | ); 219 | mainGroup = 61BDE1B919C1D9380036C993; 220 | productRefGroup = 61BDE1C319C1D9380036C993 /* Products */; 221 | projectDirPath = ""; 222 | projectRoot = ""; 223 | targets = ( 224 | 61BDE1C119C1D9380036C993 /* CDSideBar */, 225 | 61BDE1D719C1D9380036C993 /* CDSideBarTests */, 226 | ); 227 | }; 228 | /* End PBXProject section */ 229 | 230 | /* Begin PBXResourcesBuildPhase section */ 231 | 61BDE1C019C1D9380036C993 /* Resources */ = { 232 | isa = PBXResourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | 61BDE1D119C1D9380036C993 /* Main.storyboard in Resources */, 236 | 61BDE1F219C1EA100036C993 /* menuIcon.png in Resources */, 237 | 61BDE1D319C1D9380036C993 /* Images.xcassets in Resources */, 238 | 61BDE1F719C2F8920036C993 /* menuChat.png in Resources */, 239 | 61BDE1F919C2F8920036C993 /* menuMap.png in Resources */, 240 | 61BDE1F819C2F8920036C993 /* menuClose.png in Resources */, 241 | 61BDE1FA19C2F8920036C993 /* menuUsers.png in Resources */, 242 | ); 243 | runOnlyForDeploymentPostprocessing = 0; 244 | }; 245 | 61BDE1D619C1D9380036C993 /* Resources */ = { 246 | isa = PBXResourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXResourcesBuildPhase section */ 253 | 254 | /* Begin PBXSourcesBuildPhase section */ 255 | 61BDE1BE19C1D9380036C993 /* Sources */ = { 256 | isa = PBXSourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 61BDE1CE19C1D9380036C993 /* ViewController.m in Sources */, 260 | 61BDE1ED19C1E3B10036C993 /* CDSideBarController.m in Sources */, 261 | 61BDE1CB19C1D9380036C993 /* AppDelegate.m in Sources */, 262 | 61BDE1C819C1D9380036C993 /* main.m in Sources */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | 61BDE1D419C1D9380036C993 /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 61BDE1DF19C1D9380036C993 /* CDSideBarTests.m in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | /* End PBXSourcesBuildPhase section */ 275 | 276 | /* Begin PBXTargetDependency section */ 277 | 61BDE1DA19C1D9380036C993 /* PBXTargetDependency */ = { 278 | isa = PBXTargetDependency; 279 | target = 61BDE1C119C1D9380036C993 /* CDSideBar */; 280 | targetProxy = 61BDE1D919C1D9380036C993 /* PBXContainerItemProxy */; 281 | }; 282 | /* End PBXTargetDependency section */ 283 | 284 | /* Begin PBXVariantGroup section */ 285 | 61BDE1CF19C1D9380036C993 /* Main.storyboard */ = { 286 | isa = PBXVariantGroup; 287 | children = ( 288 | 61BDE1D019C1D9380036C993 /* Base */, 289 | ); 290 | name = Main.storyboard; 291 | sourceTree = ""; 292 | }; 293 | /* End PBXVariantGroup section */ 294 | 295 | /* Begin XCBuildConfiguration section */ 296 | 61BDE1E019C1D9380036C993 /* Debug */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ALWAYS_SEARCH_USER_PATHS = NO; 300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 301 | CLANG_CXX_LIBRARY = "libc++"; 302 | CLANG_ENABLE_MODULES = YES; 303 | CLANG_ENABLE_OBJC_ARC = YES; 304 | CLANG_WARN_BOOL_CONVERSION = YES; 305 | CLANG_WARN_CONSTANT_CONVERSION = YES; 306 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 307 | CLANG_WARN_EMPTY_BODY = YES; 308 | CLANG_WARN_ENUM_CONVERSION = YES; 309 | CLANG_WARN_INT_CONVERSION = YES; 310 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 311 | CLANG_WARN_UNREACHABLE_CODE = YES; 312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 313 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 314 | COPY_PHASE_STRIP = NO; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | GCC_C_LANGUAGE_STANDARD = gnu99; 317 | GCC_DYNAMIC_NO_PIC = NO; 318 | GCC_OPTIMIZATION_LEVEL = 0; 319 | GCC_PREPROCESSOR_DEFINITIONS = ( 320 | "DEBUG=1", 321 | "$(inherited)", 322 | ); 323 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 324 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 325 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 326 | GCC_WARN_UNDECLARED_SELECTOR = YES; 327 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 328 | GCC_WARN_UNUSED_FUNCTION = YES; 329 | GCC_WARN_UNUSED_VARIABLE = YES; 330 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 331 | METAL_ENABLE_DEBUG_INFO = YES; 332 | ONLY_ACTIVE_ARCH = YES; 333 | SDKROOT = iphoneos; 334 | }; 335 | name = Debug; 336 | }; 337 | 61BDE1E119C1D9380036C993 /* Release */ = { 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_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 355 | COPY_PHASE_STRIP = YES; 356 | ENABLE_NS_ASSERTIONS = NO; 357 | ENABLE_STRICT_OBJC_MSGSEND = YES; 358 | GCC_C_LANGUAGE_STANDARD = gnu99; 359 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 360 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 361 | GCC_WARN_UNDECLARED_SELECTOR = YES; 362 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 363 | GCC_WARN_UNUSED_FUNCTION = YES; 364 | GCC_WARN_UNUSED_VARIABLE = YES; 365 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 366 | METAL_ENABLE_DEBUG_INFO = NO; 367 | SDKROOT = iphoneos; 368 | VALIDATE_PRODUCT = YES; 369 | }; 370 | name = Release; 371 | }; 372 | 61BDE1E319C1D9380036C993 /* Debug */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 376 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 377 | INFOPLIST_FILE = CDSideBar/Info.plist; 378 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 379 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | }; 382 | name = Debug; 383 | }; 384 | 61BDE1E419C1D9380036C993 /* Release */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 388 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 389 | INFOPLIST_FILE = CDSideBar/Info.plist; 390 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 391 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | }; 394 | name = Release; 395 | }; 396 | 61BDE1E619C1D9380036C993 /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CDSideBar.app/CDSideBar"; 400 | FRAMEWORK_SEARCH_PATHS = ( 401 | "$(SDKROOT)/Developer/Library/Frameworks", 402 | "$(inherited)", 403 | ); 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | INFOPLIST_FILE = CDSideBarTests/Info.plist; 409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 410 | METAL_ENABLE_DEBUG_INFO = YES; 411 | PRODUCT_NAME = "$(TARGET_NAME)"; 412 | TEST_HOST = "$(BUNDLE_LOADER)"; 413 | }; 414 | name = Debug; 415 | }; 416 | 61BDE1E719C1D9380036C993 /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CDSideBar.app/CDSideBar"; 420 | FRAMEWORK_SEARCH_PATHS = ( 421 | "$(SDKROOT)/Developer/Library/Frameworks", 422 | "$(inherited)", 423 | ); 424 | INFOPLIST_FILE = CDSideBarTests/Info.plist; 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 426 | METAL_ENABLE_DEBUG_INFO = NO; 427 | PRODUCT_NAME = "$(TARGET_NAME)"; 428 | TEST_HOST = "$(BUNDLE_LOADER)"; 429 | }; 430 | name = Release; 431 | }; 432 | /* End XCBuildConfiguration section */ 433 | 434 | /* Begin XCConfigurationList section */ 435 | 61BDE1BD19C1D9380036C993 /* Build configuration list for PBXProject "CDSideBar" */ = { 436 | isa = XCConfigurationList; 437 | buildConfigurations = ( 438 | 61BDE1E019C1D9380036C993 /* Debug */, 439 | 61BDE1E119C1D9380036C993 /* Release */, 440 | ); 441 | defaultConfigurationIsVisible = 0; 442 | defaultConfigurationName = Release; 443 | }; 444 | 61BDE1E219C1D9380036C993 /* Build configuration list for PBXNativeTarget "CDSideBar" */ = { 445 | isa = XCConfigurationList; 446 | buildConfigurations = ( 447 | 61BDE1E319C1D9380036C993 /* Debug */, 448 | 61BDE1E419C1D9380036C993 /* Release */, 449 | ); 450 | defaultConfigurationIsVisible = 0; 451 | }; 452 | 61BDE1E519C1D9380036C993 /* Build configuration list for PBXNativeTarget "CDSideBarTests" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 61BDE1E619C1D9380036C993 /* Debug */, 456 | 61BDE1E719C1D9380036C993 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | }; 460 | /* End XCConfigurationList section */ 461 | }; 462 | rootObject = 61BDE1BA19C1D9380036C993 /* Project object */; 463 | } 464 | --------------------------------------------------------------------------------