├── GIF └── 1.gif ├── README.md └── XLSlideMenuExample ├── XLSlideMenu ├── UIViewController+XLSlideMenu.h ├── UIViewController+XLSlideMenu.m ├── XLSlideMenu.h └── XLSlideMenu.m ├── XLSlideMenuExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── MengXianLiang.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── MengXianLiang.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── XLSlideMenuExample.xcscheme │ └── xcschememanagement.plist └── XLSlideMenuExample ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── LeftViewController.h ├── LeftViewController.m ├── Resource ├── QQChatList.png ├── QQLeftMenu.png ├── header@2x.png ├── more@2x.png └── navbarBackImage.png ├── RightViewController.h ├── RightViewController.m ├── ViewController.h ├── ViewController.m └── main.m /GIF/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/GIF/1.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XLSlideMenu 2 | 3 | ## 实现功能 4 | 5 | - [x] 滑动显示左右菜单(支持快速滑动) 6 | - [x] 调用方法显示左右菜单 7 | - [x] 支持UINavigationController、UItabbarController,即UIViewController及其子类作为Window的根控制器 8 | - [x] 滑动区域为界面两侧,不会和界面中的滚动视图发生冲突,并可自定义相应区域大小 9 | - [x] 滑动只在NavigationController的个控制器显示时才会触发,其他自控制器不会触发菜单滑动方法 10 | 11 | ## 显示效果 12 | 13 | *示例图中的QQ界面只是截图* 14 | 15 | 16 | 17 | ## 使用方法 18 | 19 | ### 1、创建方法: 20 | 21 | #### (1)、导入头文件: 22 | 23 | ```objc 24 | #import "XLSlideMenu.h" 25 | ``` 26 | 27 | #### (2)、创建菜单并设置成window的rootviewControler 28 | 29 | ```objc 30 | XLSlideMenu *slideMenu = [[XLSlideMenu alloc] initWithRootViewController:rootNav]; 31 | //设置左右菜单 32 | slideMenu.leftViewController = leftVC; 33 | slideMenu.rightViewController = rightVC; 34 | self.window.rootViewController = slideMenu; 35 | ``` 36 | 37 | ### 2、使用方法: 38 | 39 | #### (1)、显示左菜单 40 | 41 | ```objc 42 | [self.xl_sldeMenu showLeftViewControllerAnimated:true]; 43 | ``` 44 | 45 | #### (2)、显示右菜单 46 | 47 | ```objc 48 | [self.xl_sldeMenu showRightViewControllerAnimated:true]; 49 | ``` 50 | 51 | #### (3)、显示主界面 52 | 53 | ```objc 54 | [self.xl_sldeMenu showRootViewControllerAnimated:true]; 55 | ``` 56 | 57 | #### (4)、获取菜单宽度 58 | 59 | ```objc 60 | self.xl_sldeMenu.menuWidth 61 | ``` 62 | 63 | #### (5)、获取留白宽度 64 | 65 | ```objc 66 | self.xl_sldeMenu.emptyWidth 67 | ``` 68 | 69 | #### (6)、关闭滑动功能 70 | 71 | ```objc 72 | self.xl_sldeMenu.slideEnabled = false; 73 | ``` 74 | 75 | #### (7)、跳转新界面 76 | 77 | * 判断RootViewController类型 78 | 79 | * 第一种情况:如果是UINavigationController就直接push 80 | 81 | ```objc 82 | UINavigationController *nav = (UINavigationController *)self.xl_sldeMenu.rootViewController; 83 | [nav pushViewController:newVc animated:false]; 84 | ``` 85 | 86 | * 第二种情况:如果是Tabbar就找到Tabbar的selectedViewController执行Push动作 87 | 88 | ```objc 89 | UITabBarController *tabBarController = (UITabBarController *)self.xl_sldeMenu.rootViewController; 90 | UINavigationController *nav = (UINavigationController *)tabBarController.selectedViewController; 91 | [nav pushViewController:newVc animated:true]; 92 | ``` 93 | 94 | ### 个人开发过的UI工具集合 [XLUIKit](https://github.com/mengxianliang/XLUIKit) 95 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenu/UIViewController+XLSlideMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+XLSlideMenu.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // GitHub:https://github.com/mengxianliang/XLSlideMenu 8 | 9 | #import 10 | @class XLSlideMenu; 11 | 12 | @interface UIViewController (XLSlideMenu) 13 | 14 | @property (nonatomic, strong, readonly) XLSlideMenu *xl_sldeMenu; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenu/UIViewController+XLSlideMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+XLSlideMenu.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // GitHub:https://github.com/mengxianliang/XLSlideMenu 8 | 9 | #import "UIViewController+XLSlideMenu.h" 10 | #import "XLSlideMenu.h" 11 | 12 | @implementation UIViewController (XLSlideMenu) 13 | 14 | - (XLSlideMenu *)xl_sldeMenu { 15 | UIViewController *sldeMenu = self.parentViewController; 16 | while (sldeMenu) { 17 | if ([sldeMenu isKindOfClass:[XLSlideMenu class]]) { 18 | return (XLSlideMenu *)sldeMenu; 19 | } else if (sldeMenu.parentViewController && sldeMenu.parentViewController != sldeMenu) { 20 | sldeMenu = sldeMenu.parentViewController; 21 | } else { 22 | sldeMenu = nil; 23 | } 24 | } 25 | return nil; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenu/XLSlideMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // XLSlideMenu.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIViewController+XLSlideMenu.h" 11 | 12 | @interface XLSlideMenu : UIViewController 13 | //主视图 14 | @property (nonatomic, strong) UIViewController *rootViewController; 15 | //左侧视图 16 | @property (nonatomic, strong) UIViewController *leftViewController; 17 | //右侧视图 18 | @property (nonatomic, strong) UIViewController *rightViewController; 19 | //菜单宽度 20 | @property (nonatomic, assign, readonly) CGFloat menuWidth; 21 | //留白宽度 22 | @property (nonatomic, assign, readonly) CGFloat emptyWidth; 23 | //是否允许滚动 24 | @property (nonatomic ,assign) BOOL slideEnabled; 25 | //创建方法 26 | -(instancetype)initWithRootViewController:(UIViewController*)rootViewController; 27 | //显示主视图 28 | -(void)showRootViewControllerAnimated:(BOOL)animated; 29 | //显示左侧菜单 30 | -(void)showLeftViewControllerAnimated:(BOOL)animated; 31 | //显示右侧菜单 32 | -(void)showRightViewControllerAnimated:(BOOL)animated; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenu/XLSlideMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // XLSlideMenu.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // GitHub:https://github.com/mengxianliang/XLSlideMenu 8 | 9 | #import "XLSlideMenu.h" 10 | 11 | //菜单的显示区域占屏幕宽度的百分比 12 | static CGFloat MenuWidthScale = 0.8f; 13 | //遮罩层最高透明度 14 | static CGFloat MaxCoverAlpha = 0.3; 15 | //快速滑动最小触发速度 16 | static CGFloat MinActionSpeed = 500; 17 | 18 | @interface XLSlideMenu (){ 19 | //记录起始位置 20 | CGPoint _originalPoint; 21 | } 22 | 23 | //遮罩view 24 | @property (nonatomic, strong) UIView *coverView; 25 | //拖拽手势 26 | @property (nonatomic, strong) UIPanGestureRecognizer *pan; 27 | 28 | @end 29 | 30 | @implementation XLSlideMenu 31 | 32 | -(instancetype)initWithRootViewController:(UIViewController*)rootViewController{ 33 | if (self = [super init]) { 34 | _rootViewController = rootViewController; 35 | [self addChildViewController:_rootViewController]; 36 | [self.view addSubview:_rootViewController.view]; 37 | [_rootViewController didMoveToParentViewController:self]; 38 | } 39 | return self; 40 | } 41 | 42 | - (void)viewDidLoad { 43 | [super viewDidLoad]; 44 | 45 | self.view.backgroundColor = [UIColor whiteColor]; 46 | 47 | _pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)]; 48 | _pan.delegate = self; 49 | [self.view addGestureRecognizer:_pan]; 50 | 51 | _coverView = [[UIView alloc] initWithFrame:self.view.bounds]; 52 | _coverView.backgroundColor = [UIColor blackColor]; 53 | _coverView.alpha = 0; 54 | _coverView.hidden = true; 55 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)]; 56 | [_coverView addGestureRecognizer:tap]; 57 | [_rootViewController.view addSubview:_coverView]; 58 | } 59 | 60 | -(void)viewDidAppear:(BOOL)animated{ 61 | 62 | [super viewDidAppear:animated]; 63 | 64 | [self updateLeftMenuFrame]; 65 | 66 | [self updateRightMenuFrame]; 67 | } 68 | 69 | #pragma mark - 70 | #pragma mark Setter&&Getter 71 | 72 | -(void)setLeftViewController:(UIViewController *)leftViewController{ 73 | _leftViewController = leftViewController; 74 | //提前设置ViewController的viewframe,为了懒加载view造成的frame问题,所以通过setter设置了新的view 75 | _leftViewController.view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [self menuWidth], self.view.bounds.size.height)]; 76 | //自定义View需要主动调用viewDidLoad 77 | [_leftViewController viewDidLoad]; 78 | [self addChildViewController:_leftViewController]; 79 | [self.view insertSubview:_leftViewController.view atIndex:0]; 80 | [_leftViewController didMoveToParentViewController:self]; 81 | } 82 | 83 | -(void)setRightViewController:(UIViewController *)rightViewController{ 84 | _rightViewController = rightViewController; 85 | //提前设置ViewController的viewframe,为了懒加载view造成的frame问题,所以通过setter设置了新的view 86 | _rightViewController.view = [[UIView alloc] initWithFrame:CGRectMake([self emptyWidth], 0, [self menuWidth], self.view.bounds.size.height)]; 87 | //自定义View需要主动调用viewDidLoad 88 | [_rightViewController viewDidLoad]; 89 | [self addChildViewController:_rightViewController]; 90 | [self.view insertSubview:_rightViewController.view atIndex:0]; 91 | [_rightViewController didMoveToParentViewController:self]; 92 | } 93 | 94 | -(void)setSlideEnabled:(BOOL)slideEnabled{ 95 | _pan.enabled = slideEnabled; 96 | } 97 | 98 | -(BOOL)slideEnabled{ 99 | return _pan.isEnabled; 100 | } 101 | 102 | #pragma mark - 103 | #pragma mark 拖拽方法 104 | -(void)pan:(UIPanGestureRecognizer*)pan{ 105 | switch (pan.state) { 106 | //记录起始位置 方便拖拽移动 107 | case UIGestureRecognizerStateBegan: 108 | _originalPoint = _rootViewController.view.center; 109 | break; 110 | case UIGestureRecognizerStateChanged: 111 | [self panChanged:pan]; 112 | break; 113 | case UIGestureRecognizerStateEnded: 114 | //滑动结束后自动归位 115 | [self panEnd:pan]; 116 | break; 117 | 118 | default: 119 | break; 120 | } 121 | } 122 | 123 | 124 | //拖拽方法 125 | -(void)panChanged:(UIPanGestureRecognizer*)pan{ 126 | //拖拽的距离 127 | CGPoint translation = [pan translationInView:self.view]; 128 | //移动主控制器 129 | _rootViewController.view.center = CGPointMake(_originalPoint.x + translation.x, _originalPoint.y); 130 | //判断是否设置了左右菜单 131 | if (!_rightViewController && CGRectGetMinX(_rootViewController.view.frame) <= 0 ) { 132 | _rootViewController.view.frame = self.view.bounds; 133 | } 134 | if (!_leftViewController && CGRectGetMinX(_rootViewController.view.frame) >= 0) { 135 | _rootViewController.view.frame = self.view.bounds; 136 | } 137 | //滑动到边缘位置后不可以继续滑动 138 | if (CGRectGetMinX(_rootViewController.view.frame) > self.menuWidth) { 139 | _rootViewController.view.center = CGPointMake(_rootViewController.view.bounds.size.width/2 + self.menuWidth, _rootViewController.view.center.y); 140 | } 141 | if (CGRectGetMaxX(_rootViewController.view.frame) < self.emptyWidth) { 142 | _rootViewController.view.center = CGPointMake(_rootViewController.view.bounds.size.width/2 - self.menuWidth, _rootViewController.view.center.y); 143 | } 144 | //判断显示左菜单还是右菜单 145 | if (CGRectGetMinX(_rootViewController.view.frame) > 0) { 146 | //显示左菜单 147 | [self.view sendSubviewToBack:_rightViewController.view]; 148 | //更新左菜单位置 149 | [self updateLeftMenuFrame]; 150 | //更新遮罩层的透明度 151 | _coverView.hidden = false; 152 | [_rootViewController.view bringSubviewToFront:_coverView]; 153 | _coverView.alpha = CGRectGetMinX(_rootViewController.view.frame)/self.menuWidth * MaxCoverAlpha; 154 | }else if (CGRectGetMinX(_rootViewController.view.frame) < 0){ 155 | //显示右菜单 156 | [self.view sendSubviewToBack:_leftViewController.view]; 157 | //更新右侧菜单的位置 158 | [self updateRightMenuFrame]; 159 | //更新遮罩层的透明度 160 | _coverView.hidden = false; 161 | [_rootViewController.view bringSubviewToFront:_coverView]; 162 | _coverView.alpha = (CGRectGetMaxX(self.view.frame) - CGRectGetMaxX(_rootViewController.view.frame))/self.menuWidth * MaxCoverAlpha; 163 | } 164 | } 165 | 166 | //拖拽结束 167 | - (void)panEnd:(UIPanGestureRecognizer*)pan { 168 | 169 | //处理快速滑动 170 | CGFloat speedX = [pan velocityInView:pan.view].x; 171 | if (ABS(speedX) > MinActionSpeed) { 172 | [self dealWithFastSliding:speedX]; 173 | return; 174 | } 175 | //正常速度 176 | if (CGRectGetMinX(_rootViewController.view.frame) > self.menuWidth/2) { 177 | [self showLeftViewControllerAnimated:true]; 178 | }else if (CGRectGetMaxX(_rootViewController.view.frame) < self.menuWidth/2 + self.emptyWidth){ 179 | [self showRightViewControllerAnimated:true]; 180 | }else{ 181 | [self showRootViewControllerAnimated:true]; 182 | } 183 | } 184 | 185 | //处理快速滑动 186 | - (void)dealWithFastSliding:(CGFloat)speedX { 187 | //向左滑动 188 | BOOL swipeRight = speedX > 0; 189 | //向右滑动 190 | BOOL swipeLeft = speedX < 0; 191 | //rootViewController的左边缘位置 192 | CGFloat roootX = CGRectGetMinX(_rootViewController.view.frame); 193 | if (swipeRight) {//向右滑动 194 | if (roootX > 0) {//显示左菜单 195 | [self showLeftViewControllerAnimated:true]; 196 | }else if (roootX < 0){//显示主菜单 197 | [self showRootViewControllerAnimated:true]; 198 | } 199 | } 200 | if (swipeLeft) {//向左滑动 201 | if (roootX < 0) {//显示右菜单 202 | [self showRightViewControllerAnimated:true]; 203 | }else if (roootX > 0){//显示主菜单 204 | [self showRootViewControllerAnimated:true]; 205 | } 206 | } 207 | return; 208 | } 209 | 210 | #pragma mark - 211 | #pragma mark PanDelegate 212 | //设置拖拽响应范围、设置Navigation子视图不可拖拽 213 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 214 | //设置Navigation子视图不可拖拽 215 | if ([_rootViewController isKindOfClass:[UINavigationController class]]) { 216 | UINavigationController *navigationController = (UINavigationController *)_rootViewController; 217 | if (navigationController.viewControllers.count > 1 && navigationController.interactivePopGestureRecognizer.enabled) { 218 | return NO; 219 | } 220 | } 221 | //如果Tabbar的当前视图是UINavigationController,设置UINavigationController子视图不可拖拽 222 | if ([_rootViewController isKindOfClass:[UITabBarController class]]) { 223 | UITabBarController *tabbarController = (UITabBarController*)_rootViewController; 224 | UINavigationController *navigationController = tabbarController.selectedViewController; 225 | if ([navigationController isKindOfClass:[UINavigationController class]]) { 226 | if (navigationController.viewControllers.count > 1 && navigationController.interactivePopGestureRecognizer.enabled) { 227 | return NO; 228 | } 229 | } 230 | } 231 | //设置拖拽响应范围 232 | if ([gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]]) { 233 | //拖拽响应范围是距离边界是空白位置宽度 234 | CGFloat actionWidth = [self emptyWidth]; 235 | CGPoint point = [touch locationInView:gestureRecognizer.view]; 236 | if (point.x <= actionWidth || point.x > self.view.bounds.size.width - actionWidth) { 237 | return YES; 238 | } else { 239 | return NO; 240 | } 241 | } 242 | return YES; 243 | } 244 | 245 | - (void)tap { 246 | [self showRootViewControllerAnimated:true]; 247 | } 248 | 249 | #pragma mark - 250 | #pragma mark 显示/隐藏方法 251 | //显示主视图 252 | -(void)showRootViewControllerAnimated:(BOOL)animated{ 253 | 254 | [UIView animateWithDuration:[self animationDurationAnimated:animated] animations:^{ 255 | CGRect frame = _rootViewController.view.frame; 256 | frame.origin.x = 0; 257 | _rootViewController.view.frame = frame; 258 | [self updateLeftMenuFrame]; 259 | [self updateRightMenuFrame]; 260 | _coverView.alpha = 0; 261 | }completion:^(BOOL finished) { 262 | _coverView.hidden = true; 263 | }]; 264 | } 265 | 266 | //显示左侧菜单 267 | - (void)showLeftViewControllerAnimated:(BOOL)animated { 268 | if (!_leftViewController) {return;} 269 | [self.view sendSubviewToBack:_rightViewController.view]; 270 | _coverView.hidden = false; 271 | [_rootViewController.view bringSubviewToFront:_coverView]; 272 | [UIView animateWithDuration:[self animationDurationAnimated:animated] animations:^{ 273 | _rootViewController.view.center = CGPointMake(_rootViewController.view.bounds.size.width/2 + self.menuWidth, _rootViewController.view.center.y); 274 | _leftViewController.view.frame = CGRectMake(0, 0, [self menuWidth], self.view.bounds.size.height); 275 | _coverView.alpha = MaxCoverAlpha; 276 | }]; 277 | } 278 | 279 | //显示右侧菜单 280 | - (void)showRightViewControllerAnimated:(BOOL)animated { 281 | if (!_rightViewController) {return;} 282 | _coverView.hidden = false; 283 | [_rootViewController.view bringSubviewToFront:_coverView]; 284 | [self.view sendSubviewToBack:_leftViewController.view]; 285 | [UIView animateWithDuration:[self animationDurationAnimated:animated] animations:^{ 286 | _rootViewController.view.center = CGPointMake(_rootViewController.view.bounds.size.width/2 - self.menuWidth, _rootViewController.view.center.y); 287 | _rightViewController.view.frame = CGRectMake([self emptyWidth], 0, [self menuWidth], self.view.bounds.size.height); 288 | _coverView.alpha = MaxCoverAlpha; 289 | }]; 290 | } 291 | 292 | #pragma mark - 293 | #pragma mark 其它方法 294 | //更新左侧菜单位置 295 | - (void)updateLeftMenuFrame { 296 | _leftViewController.view.center = CGPointMake(CGRectGetMinX(_rootViewController.view.frame)/2, _leftViewController.view.center.y); 297 | } 298 | 299 | //更新右侧菜单位置 300 | - (void)updateRightMenuFrame { 301 | _rightViewController.view.center = CGPointMake((self.view.bounds.size.width + CGRectGetMaxX(_rootViewController.view.frame))/2, _rightViewController.view.center.y); 302 | } 303 | 304 | //菜单宽度 305 | - (CGFloat)menuWidth { 306 | return MenuWidthScale * self.view.bounds.size.width; 307 | } 308 | 309 | //空白宽度 310 | - (CGFloat)emptyWidth { 311 | return self.view.bounds.size.width - self.menuWidth; 312 | } 313 | 314 | //动画时长 315 | - (CGFloat)animationDurationAnimated:(BOOL)animated { 316 | return animated ? 0.25 : 0; 317 | } 318 | 319 | //取消自动旋转 320 | - (BOOL)shouldAutorotate { 321 | return false; 322 | } 323 | 324 | - (void)didReceiveMemoryWarning { 325 | [super didReceiveMemoryWarning]; 326 | } 327 | 328 | 329 | @end 330 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5EA480071EC06C6200291174 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA480061EC06C6200291174 /* main.m */; }; 11 | 5EA4800A1EC06C6200291174 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA480091EC06C6200291174 /* AppDelegate.m */; }; 12 | 5EA4800D1EC06C6200291174 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA4800C1EC06C6200291174 /* ViewController.m */; }; 13 | 5EA480101EC06C6200291174 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EA4800E1EC06C6200291174 /* Main.storyboard */; }; 14 | 5EA480121EC06C6200291174 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5EA480111EC06C6200291174 /* Assets.xcassets */; }; 15 | 5EA480151EC06C6200291174 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EA480131EC06C6200291174 /* LaunchScreen.storyboard */; }; 16 | 5EA4801F1EC06C9F00291174 /* XLSlideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA4801E1EC06C9F00291174 /* XLSlideMenu.m */; }; 17 | 5EA480221EC0711500291174 /* LeftViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA480211EC0711500291174 /* LeftViewController.m */; }; 18 | 5EA480251EC0711E00291174 /* RightViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA480241EC0711E00291174 /* RightViewController.m */; }; 19 | 5EA480281EC0733300291174 /* UIViewController+XLSlideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA480271EC0733300291174 /* UIViewController+XLSlideMenu.m */; }; 20 | 5EB25D8E1EC2A08C000CE892 /* header@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5EB25D891EC2A08C000CE892 /* header@2x.png */; }; 21 | 5EB25D8F1EC2A08C000CE892 /* more@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5EB25D8A1EC2A08C000CE892 /* more@2x.png */; }; 22 | 5EB25D901EC2A08C000CE892 /* navbarBackImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 5EB25D8B1EC2A08C000CE892 /* navbarBackImage.png */; }; 23 | 5EB25D911EC2A08C000CE892 /* QQChatList.png in Resources */ = {isa = PBXBuildFile; fileRef = 5EB25D8C1EC2A08C000CE892 /* QQChatList.png */; }; 24 | 5EB25D921EC2A08C000CE892 /* QQLeftMenu.png in Resources */ = {isa = PBXBuildFile; fileRef = 5EB25D8D1EC2A08C000CE892 /* QQLeftMenu.png */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 5EA480021EC06C6200291174 /* XLSlideMenuExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XLSlideMenuExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 5EA480061EC06C6200291174 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | 5EA480081EC06C6200291174 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 31 | 5EA480091EC06C6200291174 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 32 | 5EA4800B1EC06C6200291174 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 33 | 5EA4800C1EC06C6200291174 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 34 | 5EA4800F1EC06C6200291174 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 35 | 5EA480111EC06C6200291174 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 36 | 5EA480141EC06C6200291174 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 37 | 5EA480161EC06C6200291174 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 5EA4801D1EC06C9F00291174 /* XLSlideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XLSlideMenu.h; sourceTree = ""; }; 39 | 5EA4801E1EC06C9F00291174 /* XLSlideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XLSlideMenu.m; sourceTree = ""; }; 40 | 5EA480201EC0711500291174 /* LeftViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LeftViewController.h; sourceTree = ""; }; 41 | 5EA480211EC0711500291174 /* LeftViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LeftViewController.m; sourceTree = ""; }; 42 | 5EA480231EC0711E00291174 /* RightViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RightViewController.h; sourceTree = ""; }; 43 | 5EA480241EC0711E00291174 /* RightViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RightViewController.m; sourceTree = ""; }; 44 | 5EA480261EC0733300291174 /* UIViewController+XLSlideMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+XLSlideMenu.h"; sourceTree = ""; }; 45 | 5EA480271EC0733300291174 /* UIViewController+XLSlideMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+XLSlideMenu.m"; sourceTree = ""; }; 46 | 5EB25D891EC2A08C000CE892 /* header@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "header@2x.png"; sourceTree = ""; }; 47 | 5EB25D8A1EC2A08C000CE892 /* more@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "more@2x.png"; sourceTree = ""; }; 48 | 5EB25D8B1EC2A08C000CE892 /* navbarBackImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = navbarBackImage.png; sourceTree = ""; }; 49 | 5EB25D8C1EC2A08C000CE892 /* QQChatList.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = QQChatList.png; sourceTree = ""; }; 50 | 5EB25D8D1EC2A08C000CE892 /* QQLeftMenu.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = QQLeftMenu.png; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 5EA47FFF1EC06C6200291174 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 5EA47FF91EC06C6200291174 = { 65 | isa = PBXGroup; 66 | children = ( 67 | 5EA4801C1EC06C8400291174 /* XLSlideMenu */, 68 | 5EA480041EC06C6200291174 /* XLSlideMenuExample */, 69 | 5EA480031EC06C6200291174 /* Products */, 70 | ); 71 | sourceTree = ""; 72 | }; 73 | 5EA480031EC06C6200291174 /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 5EA480021EC06C6200291174 /* XLSlideMenuExample.app */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | 5EA480041EC06C6200291174 /* XLSlideMenuExample */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 5EA480081EC06C6200291174 /* AppDelegate.h */, 85 | 5EA480091EC06C6200291174 /* AppDelegate.m */, 86 | 5EA4800B1EC06C6200291174 /* ViewController.h */, 87 | 5EA4800C1EC06C6200291174 /* ViewController.m */, 88 | 5EA480201EC0711500291174 /* LeftViewController.h */, 89 | 5EA480211EC0711500291174 /* LeftViewController.m */, 90 | 5EA480231EC0711E00291174 /* RightViewController.h */, 91 | 5EA480241EC0711E00291174 /* RightViewController.m */, 92 | 5EA4800E1EC06C6200291174 /* Main.storyboard */, 93 | 5EA480111EC06C6200291174 /* Assets.xcassets */, 94 | 5EA480131EC06C6200291174 /* LaunchScreen.storyboard */, 95 | 5EA480161EC06C6200291174 /* Info.plist */, 96 | 5EA480051EC06C6200291174 /* Supporting Files */, 97 | ); 98 | path = XLSlideMenuExample; 99 | sourceTree = ""; 100 | }; 101 | 5EA480051EC06C6200291174 /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 5EB25D881EC2A08C000CE892 /* Resource */, 105 | 5EA480061EC06C6200291174 /* main.m */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | 5EA4801C1EC06C8400291174 /* XLSlideMenu */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 5EA4801D1EC06C9F00291174 /* XLSlideMenu.h */, 114 | 5EA4801E1EC06C9F00291174 /* XLSlideMenu.m */, 115 | 5EA480261EC0733300291174 /* UIViewController+XLSlideMenu.h */, 116 | 5EA480271EC0733300291174 /* UIViewController+XLSlideMenu.m */, 117 | ); 118 | path = XLSlideMenu; 119 | sourceTree = ""; 120 | }; 121 | 5EB25D881EC2A08C000CE892 /* Resource */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 5EB25D891EC2A08C000CE892 /* header@2x.png */, 125 | 5EB25D8A1EC2A08C000CE892 /* more@2x.png */, 126 | 5EB25D8B1EC2A08C000CE892 /* navbarBackImage.png */, 127 | 5EB25D8C1EC2A08C000CE892 /* QQChatList.png */, 128 | 5EB25D8D1EC2A08C000CE892 /* QQLeftMenu.png */, 129 | ); 130 | path = Resource; 131 | sourceTree = ""; 132 | }; 133 | /* End PBXGroup section */ 134 | 135 | /* Begin PBXNativeTarget section */ 136 | 5EA480011EC06C6200291174 /* XLSlideMenuExample */ = { 137 | isa = PBXNativeTarget; 138 | buildConfigurationList = 5EA480191EC06C6200291174 /* Build configuration list for PBXNativeTarget "XLSlideMenuExample" */; 139 | buildPhases = ( 140 | 5EA47FFE1EC06C6200291174 /* Sources */, 141 | 5EA47FFF1EC06C6200291174 /* Frameworks */, 142 | 5EA480001EC06C6200291174 /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = XLSlideMenuExample; 149 | productName = XLSlideMenuExample; 150 | productReference = 5EA480021EC06C6200291174 /* XLSlideMenuExample.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 5EA47FFA1EC06C6200291174 /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0830; 160 | ORGANIZATIONNAME = MengXianLiang; 161 | TargetAttributes = { 162 | 5EA480011EC06C6200291174 = { 163 | CreatedOnToolsVersion = 8.3.2; 164 | DevelopmentTeam = X496RVQDTB; 165 | ProvisioningStyle = Manual; 166 | }; 167 | }; 168 | }; 169 | buildConfigurationList = 5EA47FFD1EC06C6200291174 /* Build configuration list for PBXProject "XLSlideMenuExample" */; 170 | compatibilityVersion = "Xcode 3.2"; 171 | developmentRegion = English; 172 | hasScannedForEncodings = 0; 173 | knownRegions = ( 174 | en, 175 | Base, 176 | ); 177 | mainGroup = 5EA47FF91EC06C6200291174; 178 | productRefGroup = 5EA480031EC06C6200291174 /* Products */; 179 | projectDirPath = ""; 180 | projectRoot = ""; 181 | targets = ( 182 | 5EA480011EC06C6200291174 /* XLSlideMenuExample */, 183 | ); 184 | }; 185 | /* End PBXProject section */ 186 | 187 | /* Begin PBXResourcesBuildPhase section */ 188 | 5EA480001EC06C6200291174 /* Resources */ = { 189 | isa = PBXResourcesBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | 5EB25D901EC2A08C000CE892 /* navbarBackImage.png in Resources */, 193 | 5EA480151EC06C6200291174 /* LaunchScreen.storyboard in Resources */, 194 | 5EB25D911EC2A08C000CE892 /* QQChatList.png in Resources */, 195 | 5EB25D921EC2A08C000CE892 /* QQLeftMenu.png in Resources */, 196 | 5EB25D8F1EC2A08C000CE892 /* more@2x.png in Resources */, 197 | 5EA480121EC06C6200291174 /* Assets.xcassets in Resources */, 198 | 5EB25D8E1EC2A08C000CE892 /* header@2x.png in Resources */, 199 | 5EA480101EC06C6200291174 /* Main.storyboard in Resources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | /* End PBXResourcesBuildPhase section */ 204 | 205 | /* Begin PBXSourcesBuildPhase section */ 206 | 5EA47FFE1EC06C6200291174 /* Sources */ = { 207 | isa = PBXSourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 5EA4800D1EC06C6200291174 /* ViewController.m in Sources */, 211 | 5EA480221EC0711500291174 /* LeftViewController.m in Sources */, 212 | 5EA4800A1EC06C6200291174 /* AppDelegate.m in Sources */, 213 | 5EA4801F1EC06C9F00291174 /* XLSlideMenu.m in Sources */, 214 | 5EA480071EC06C6200291174 /* main.m in Sources */, 215 | 5EA480251EC0711E00291174 /* RightViewController.m in Sources */, 216 | 5EA480281EC0733300291174 /* UIViewController+XLSlideMenu.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 5EA4800E1EC06C6200291174 /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 5EA4800F1EC06C6200291174 /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 5EA480131EC06C6200291174 /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 5EA480141EC06C6200291174 /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 5EA480171EC06C6200291174 /* Debug */ = { 243 | isa = XCBuildConfiguration; 244 | buildSettings = { 245 | ALWAYS_SEARCH_USER_PATHS = NO; 246 | CLANG_ANALYZER_NONNULL = YES; 247 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_MODULES = YES; 251 | CLANG_ENABLE_OBJC_ARC = YES; 252 | CLANG_WARN_BOOL_CONVERSION = YES; 253 | CLANG_WARN_CONSTANT_CONVERSION = YES; 254 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 255 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INFINITE_RECURSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 261 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 262 | CLANG_WARN_UNREACHABLE_CODE = YES; 263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 264 | CODE_SIGN_IDENTITY = "iPhone Developer: xianliang meng (79SX5888C3)"; 265 | CODE_SIGN_STYLE = Manual; 266 | COPY_PHASE_STRIP = NO; 267 | DEBUG_INFORMATION_FORMAT = dwarf; 268 | DEVELOPMENT_TEAM = X496RVQDTB; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | ENABLE_TESTABILITY = YES; 271 | GCC_C_LANGUAGE_STANDARD = gnu99; 272 | GCC_DYNAMIC_NO_PIC = NO; 273 | GCC_NO_COMMON_BLOCKS = YES; 274 | GCC_OPTIMIZATION_LEVEL = 0; 275 | GCC_PREPROCESSOR_DEFINITIONS = ( 276 | "DEBUG=1", 277 | "$(inherited)", 278 | ); 279 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 281 | GCC_WARN_UNDECLARED_SELECTOR = YES; 282 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 283 | GCC_WARN_UNUSED_FUNCTION = YES; 284 | GCC_WARN_UNUSED_VARIABLE = YES; 285 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 286 | MTL_ENABLE_DEBUG_INFO = YES; 287 | ONLY_ACTIVE_ARCH = YES; 288 | PROVISIONING_PROFILE = "78c48479-d780-497e-ab3b-acd5638b252e"; 289 | SDKROOT = iphoneos; 290 | }; 291 | name = Debug; 292 | }; 293 | 5EA480181EC06C6200291174 /* Release */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ALWAYS_SEARCH_USER_PATHS = NO; 297 | CLANG_ANALYZER_NONNULL = YES; 298 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 299 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 300 | CLANG_CXX_LIBRARY = "libc++"; 301 | CLANG_ENABLE_MODULES = YES; 302 | CLANG_ENABLE_OBJC_ARC = YES; 303 | CLANG_WARN_BOOL_CONVERSION = YES; 304 | CLANG_WARN_CONSTANT_CONVERSION = YES; 305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 306 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 307 | CLANG_WARN_EMPTY_BODY = YES; 308 | CLANG_WARN_ENUM_CONVERSION = YES; 309 | CLANG_WARN_INFINITE_RECURSION = YES; 310 | CLANG_WARN_INT_CONVERSION = YES; 311 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 312 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 313 | CLANG_WARN_UNREACHABLE_CODE = YES; 314 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 315 | CODE_SIGN_IDENTITY = "iPhone Developer: xianliang meng (79SX5888C3)"; 316 | CODE_SIGN_STYLE = Manual; 317 | COPY_PHASE_STRIP = NO; 318 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 319 | DEVELOPMENT_TEAM = X496RVQDTB; 320 | ENABLE_NS_ASSERTIONS = NO; 321 | ENABLE_STRICT_OBJC_MSGSEND = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_NO_COMMON_BLOCKS = YES; 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 = 10.3; 331 | MTL_ENABLE_DEBUG_INFO = NO; 332 | PROVISIONING_PROFILE = "78c48479-d780-497e-ab3b-acd5638b252e"; 333 | SDKROOT = iphoneos; 334 | VALIDATE_PRODUCT = YES; 335 | }; 336 | name = Release; 337 | }; 338 | 5EA4801A1EC06C6200291174 /* Debug */ = { 339 | isa = XCBuildConfiguration; 340 | buildSettings = { 341 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 342 | CODE_SIGN_IDENTITY = "iPhone Developer: xianliang meng (79SX5888C3)"; 343 | CODE_SIGN_STYLE = Manual; 344 | DEVELOPMENT_TEAM = X496RVQDTB; 345 | INFOPLIST_FILE = XLSlideMenuExample/Info.plist; 346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 347 | PRODUCT_BUNDLE_IDENTIFIER = mxl.XLSlideMenuExample; 348 | PRODUCT_NAME = "$(TARGET_NAME)"; 349 | PROVISIONING_PROFILE = "78c48479-d780-497e-ab3b-acd5638b252e"; 350 | PROVISIONING_PROFILE_SPECIFIER = mxlDev; 351 | }; 352 | name = Debug; 353 | }; 354 | 5EA4801B1EC06C6200291174 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 358 | CODE_SIGN_IDENTITY = "iPhone Developer: xianliang meng (79SX5888C3)"; 359 | CODE_SIGN_STYLE = Manual; 360 | DEVELOPMENT_TEAM = X496RVQDTB; 361 | INFOPLIST_FILE = XLSlideMenuExample/Info.plist; 362 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 363 | PRODUCT_BUNDLE_IDENTIFIER = mxl.XLSlideMenuExample; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | PROVISIONING_PROFILE = "78c48479-d780-497e-ab3b-acd5638b252e"; 366 | PROVISIONING_PROFILE_SPECIFIER = mxlDev; 367 | }; 368 | name = Release; 369 | }; 370 | /* End XCBuildConfiguration section */ 371 | 372 | /* Begin XCConfigurationList section */ 373 | 5EA47FFD1EC06C6200291174 /* Build configuration list for PBXProject "XLSlideMenuExample" */ = { 374 | isa = XCConfigurationList; 375 | buildConfigurations = ( 376 | 5EA480171EC06C6200291174 /* Debug */, 377 | 5EA480181EC06C6200291174 /* Release */, 378 | ); 379 | defaultConfigurationIsVisible = 0; 380 | defaultConfigurationName = Release; 381 | }; 382 | 5EA480191EC06C6200291174 /* Build configuration list for PBXNativeTarget "XLSlideMenuExample" */ = { 383 | isa = XCConfigurationList; 384 | buildConfigurations = ( 385 | 5EA4801A1EC06C6200291174 /* Debug */, 386 | 5EA4801B1EC06C6200291174 /* Release */, 387 | ); 388 | defaultConfigurationIsVisible = 0; 389 | defaultConfigurationName = Release; 390 | }; 391 | /* End XCConfigurationList section */ 392 | }; 393 | rootObject = 5EA47FFA1EC06C6200291174 /* Project object */; 394 | } 395 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/project.xcworkspace/xcuserdata/MengXianLiang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample.xcodeproj/project.xcworkspace/xcuserdata/MengXianLiang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcschemes/XLSlideMenuExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample.xcodeproj/xcuserdata/MengXianLiang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | XLSlideMenuExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5EA480011EC06C6200291174 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. 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 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | #import "LeftViewController.h" 12 | #import "RightViewController.h" 13 | #import "XLSlideMenu.h" 14 | 15 | @interface AppDelegate () 16 | 17 | @end 18 | 19 | @implementation AppDelegate 20 | 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 23 | 24 | //主界面 25 | ViewController *vc = [[ViewController alloc] init]; 26 | //配置NavigationBar 27 | UINavigationController *rootNav = [[UINavigationController alloc] initWithRootViewController:vc]; 28 | [rootNav.navigationBar setBackgroundImage:[UIImage imageNamed:@"navbarBackImage"] forBarMetrics:UIBarMetricsDefault]; 29 | rootNav.navigationBar.tintColor = [UIColor whiteColor]; 30 | [rootNav.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName, nil]]; 31 | //左侧菜单 32 | LeftViewController *leftVC = [[LeftViewController alloc] init]; 33 | //右侧菜单 34 | RightViewController *rightVC = [[RightViewController alloc] init]; 35 | //创建滑动菜单 36 | XLSlideMenu *slideMenu = [[XLSlideMenu alloc] initWithRootViewController:rootNav]; 37 | //设置左右菜单 38 | slideMenu.leftViewController = leftVC; 39 | slideMenu.rightViewController = rightVC; 40 | self.window.rootViewController = slideMenu; 41 | return YES; 42 | } 43 | 44 | 45 | - (void)applicationWillResignActive:(UIApplication *)application { 46 | // 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. 47 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 48 | } 49 | 50 | 51 | - (void)applicationDidEnterBackground:(UIApplication *)application { 52 | // 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. 53 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 54 | } 55 | 56 | 57 | - (void)applicationWillEnterForeground:(UIApplication *)application { 58 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 59 | } 60 | 61 | 62 | - (void)applicationDidBecomeActive:(UIApplication *)application { 63 | // 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. 64 | } 65 | 66 | 67 | - (void)applicationWillTerminate:(UIApplication *)application { 68 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 69 | } 70 | 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "size" : "1024x1024", 46 | "scale" : "1x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/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 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | QQ侧滑工具 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/LeftViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LeftViewController.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LeftViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/LeftViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LeftViewController.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import "LeftViewController.h" 10 | #import "XLSlideMenu.h" 11 | @interface LeftViewController () { 12 | UIImageView *_imageView; 13 | } 14 | @end 15 | 16 | @implementation LeftViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | self.view.backgroundColor = [UIColor whiteColor]; 21 | _imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"QQLeftMenu"]]; 22 | _imageView.frame = self.view.bounds; 23 | [self.view addSubview:_imageView]; 24 | } 25 | 26 | - (void)didReceiveMemoryWarning { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | /* 32 | #pragma mark - Navigation 33 | 34 | // In a storyboard-based application, you will often want to do a little preparation before navigation 35 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 36 | // Get the new view controller using [segue destinationViewController]. 37 | // Pass the selected object to the new view controller. 38 | } 39 | */ 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Resource/QQChatList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample/Resource/QQChatList.png -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Resource/QQLeftMenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample/Resource/QQLeftMenu.png -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Resource/header@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample/Resource/header@2x.png -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Resource/more@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample/Resource/more@2x.png -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/Resource/navbarBackImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mengxianliang/XLSlideMenu/3935bb09a889a31120e28ca5f8e41daa91dde7ed/XLSlideMenuExample/XLSlideMenuExample/Resource/navbarBackImage.png -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/RightViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RightViewController.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RightViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/RightViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RightViewController.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // GitHub:https://github.com/mengxianliang/XLSlideMenu 8 | 9 | #import "RightViewController.h" 10 | #import "XLSlideMenu.h" 11 | 12 | @interface RightViewController () { 13 | UITableView *_tableView;; 14 | } 15 | @end 16 | 17 | @implementation RightViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | _tableView = [[UITableView alloc] initWithFrame:self.view.bounds]; 23 | _tableView.delegate = self; 24 | _tableView.dataSource = self; 25 | [self.view addSubview:_tableView]; 26 | } 27 | 28 | #pragma mark - 29 | #pragma mark TableViewDelegate&DataSource 30 | 31 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 32 | return 60; 33 | } 34 | 35 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 36 | return @"Tips"; 37 | } 38 | 39 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 40 | return 60; 41 | } 42 | 43 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 44 | return [self titles].count; 45 | } 46 | 47 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 48 | NSString* cellIdentifier = @"cell"; 49 | UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; 50 | if (cell == nil) { 51 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier]; 52 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 53 | } 54 | cell.textLabel.text = [self titles][indexPath.row]; 55 | cell.detailTextLabel.textColor = [UIColor colorWithRed:3/255.0f green:102/255.0f blue:214/255.0f alpha:1]; 56 | cell.detailTextLabel.text = [self subTitles][indexPath.row]; 57 | return cell; 58 | } 59 | 60 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 61 | switch (indexPath.row) { 62 | case 0: 63 | [self.xl_sldeMenu showRootViewControllerAnimated:true]; 64 | break; 65 | case 1: 66 | [self.xl_sldeMenu showLeftViewControllerAnimated:true]; 67 | break; 68 | case 2: 69 | [self.xl_sldeMenu showRightViewControllerAnimated:true]; 70 | break; 71 | case 3: { 72 | [self.xl_sldeMenu showRootViewControllerAnimated:true]; 73 | UIViewController *vc = [[UIViewController alloc] init]; 74 | vc.title = @"新界面"; 75 | vc.view.backgroundColor = [UIColor whiteColor]; 76 | UINavigationController *nav = (UINavigationController *)self.xl_sldeMenu.rootViewController; 77 | [nav pushViewController:vc animated:true]; 78 | } 79 | break; 80 | case 4: 81 | self.xl_sldeMenu.slideEnabled = !self.xl_sldeMenu.slideEnabled; 82 | [tableView reloadData]; 83 | break; 84 | default: 85 | break; 86 | } 87 | } 88 | 89 | #pragma mark - 90 | #pragma mark TableViewDelegate&DataSource 91 | - (NSArray *)titles { 92 | return @[@"显示主界面",@"显示左菜单",@"显示右菜单",@"Push新界面",@"设置滑动开关"]; 93 | } 94 | 95 | - (NSArray *)subTitles { 96 | NSString *subTitle = self.xl_sldeMenu.slideEnabled ? @"(已打开)" : @"(已关闭)" ; 97 | return @[@"",@"",@"",@"",subTitle]; 98 | } 99 | 100 | - (void)didReceiveMemoryWarning { 101 | [super didReceiveMemoryWarning]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "XLSlideMenu.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | 23 | self.title = @"消息"; 24 | 25 | //左 26 | UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 37, 37)]; 27 | headerButton.layer.cornerRadius = headerButton.bounds.size.width/2.0f; 28 | headerButton.layer.masksToBounds = true; 29 | [headerButton setImage:[UIImage imageNamed:@"header"] forState:UIControlStateNormal]; 30 | [headerButton addTarget:self action:@selector(showLeft) forControlEvents:UIControlEventTouchUpInside]; 31 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:headerButton]; 32 | 33 | //右 34 | UIButton *moreButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 25, 25)]; 35 | [moreButton setImage:[UIImage imageNamed:@"more"] forState:UIControlStateNormal]; 36 | [moreButton addTarget:self action:@selector(showRight) forControlEvents:UIControlEventTouchUpInside]; 37 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:moreButton]; 38 | 39 | 40 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 64)]; 41 | imageView.image = [UIImage imageNamed:@"QQChatList"]; 42 | [self.view addSubview:imageView]; 43 | } 44 | 45 | -(void)showLeft{ 46 | [self.xl_sldeMenu showLeftViewControllerAnimated:true]; 47 | } 48 | 49 | -(void)showRight{ 50 | [self.xl_sldeMenu showRightViewControllerAnimated:true]; 51 | } 52 | 53 | - (void)didReceiveMemoryWarning { 54 | [super didReceiveMemoryWarning]; 55 | // Dispose of any resources that can be recreated. 56 | } 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /XLSlideMenuExample/XLSlideMenuExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // XLSlideMenuExample 4 | // 5 | // Created by MengXianLiang on 2017/5/8. 6 | // Copyright © 2017年 MengXianLiang. 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 | --------------------------------------------------------------------------------