关于使用 DDMenuController 类的方法笔记:参考

DDMenuController 是一款非常好用的抽屉类文件。

#pragma mark - 界面配置左右导航条的按钮
//[self configureLeftButton];//配置导航条左边按钮
[self configureRightButton];//配置导航条右边按钮 上面是要在ViewDidLoad 里面调用的 下面是方法的实现
#pragma mark - 界面配置类
//配置导航条左边按钮
- (void)configureLeftButton {
UIBarButtonItem *left = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"qr_toolbar_more_hl"] style:UIBarButtonItemStylePlain target:self action:@selector(handleLeftBack:)];
self.navigationItem.leftBarButtonItem = left; }
//配置导航条右边按钮
- (void)configureRightButton {
UIBarButtonItem *right = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"qr_toolbar_more_hl"] style:UIBarButtonItemStylePlain target:self action:@selector(handleRightBack:)];
self.navigationItem.rightBarButtonItem = right; }
#pragma mark -action
//导航条左边按钮点击事件
- (void)handleLeftBack:(UIBarButtonItem *)item {
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
DDMenuController *menuC = delegate.menuController;
[menuC showLeftController:YES];
}
//导航条右边按钮点击事件
- (void)handleRightBack:(UIBarButtonItem *)item {
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
DDMenuController *menuC = delegate.menuController;
[menuC showRightController:YES];
}

使用方法一

可以使用appdelegate

-(void)leftBtnClick
{
[(DDMenuController *)[UIApplication sharedApplication].delegate.window.rootViewController showLeftController:YES]; }

使用方法二

最新文章

  1. kettle中变量的设置和使用介绍
  2. Python验证码6位自动生成器
  3. docker网络配置之自定义网桥
  4. canvas圆环进度
  5. 学习javascript基础知识系列第二节 - this用法
  6. 未能加载文件或程序集 system.data.sqlite 完美解决
  7. HTML5示例之WebSocket
  8. 如何使用.net开发一款小而美的O2O移动应用? ——“家庭小秘”APP介绍及采访记录
  9. 并发框架Disruptor场景应用
  10. 背水一战 Windows 10 (117) - 后台任务: 后台下载任务
  11. git中的忽略配置文件中没有忽略该文件,却提交不到服务器上。
  12. composer Content-Length mismatch
  13. cocos2dx 3.4 测试例 目录
  14. 搭建SpringCloud-Eureka 注册中心以及服务提供与调用 快速了解 SpringCloud-Eureka
  15. dtruss
  16. 【题解】 Codeforces 919F A Game With Numbers(拓扑排序+博弈论+哈希)
  17. 关于caffe的安装问题
  18. css修改select默认样式
  19. Specified VM install not found: type Standard VM, name jdk1.7
  20. js判断用户关闭页面或浏览器

热门文章

  1. 混合背包 hdu5410 CRB and His Birthday
  2. mysql报错锦集
  3. php实现双色球算法
  4. VMware安装ubuntu学习笔记(只是笔记)
  5. 针对基于Phison(群联)U盘的BadUSB攻击
  6. Erlang Shell调试网络程序真方便
  7. live555中fDurationInMicroseconds的计算
  8. Lombok引入简化Java代码
  9. 九度OJ 1142:Biorhythms(生理周期) (中国剩余定理)
  10. git 的安装