stackoverflow  上讲解:http://stackoverflow.com/a/12660523/4563358

delegate是将需要处理交给自己的代理。

在自己的对应的类中.h文件中申明对应的delegate

@class CSPopMenu;
@protocol CSPopMenuDelegate <NSObject>
@optional
-(void)PopMenuDimiss:(CSPopMenu *)popMenu;
@end

插入一个可选择的方法,定义一个协议。

@property(nonatomic,weak)id <CSPopMenuDelegate> delegate;

delegate属性设定。

在类的.m文件中

-(void)dismiss
{
if ([self.delegate respondsToSelector:@selector(PopMenuDimiss:)]) {
[self.delegate PopMenuDimiss:self];
}
[self removeFromSuperview];
}

调用对应的delegate的方法。

要对这个类进行相关的操作,那么首先你要成为这个类的一个代理

 CSPopMenu *menuView= [[CSPopMenu alloc]initWithContentView:menuTableView];
menuView.popMenuPosition = CSPopMenuBackgroundleft;
[menuView showRect:CGRectMake(, , , )];
menuView.delegate = self;

把当前的类成为对应的类的一个代理。

然后就可以调用代理方法

//设置对应的转动的方向
-(void)PopMenuDimiss:(CSPopMenu *)popMenu
{
CSMainBtn *mainBtn = (CSMainBtn *)self.navigationItem.titleView;
[mainBtn setImage:[UIImage imageNamed:@"navigationbar_arrow_down"] forState:UIControlStateNormal]; }

得到的效果如图

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOoAAADwCAYAAAAO2fizAAAL+GlDQ1BJQ0MgUHJvZmlsZQAASImVVwdUU8kanntvGpCEklClhN4EQ29SQkeqdLARkkACIcQUFOxlcQXXLiJYVnQVRMEKyFoRxbYKWLAvqKio6+IqWFB5kwR13ztvzzvvz5nMd7/7//98M3dmzgwA1HS2WCxEtQAoEMkkiRHBjPSMTAbxd4AATUAGtgBlc6RiVkJCDPhHG74JvaFdc1Lk+me//2raXJ6UAwCSAHE2V8opgPgwAFgARyyRAYB7C3nLWTIxxHgDiOkSKBDi8Qqcq8JBCpytwslKn+TEEIj5AJDIbLYkFwAKjAeMIk4urCnrIWaKuAIRxO0QB3D4bC4AVBzE4wsKChWYCbFd9t/y5P5bzuxvOdns3G9Y1Relk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QSIChbyIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIQGEamFQcAkCiQQQaiIR9iFgIYH/B6YAGgKCp/1yAAAAAElFTkSuQmCC" alt="" />

使得首先右边的箭头改变方向。

关于delegate(代理)总结的更多相关文章

  1. iOS阶段学习第30天笔记( UIViewController—Delegate(代理) )

    iOS学习(UI)知识点整理 一.UIViewController的介绍 1)概念:UIViewController 即视图控制器,用来管理和控制页面跳转的一个类 ,iOS里面采用了MVC的体系结构, ...

  2. Delegate(代理)异常:该委托必须有一个目标

    转自 Delegate(代理)异常:该委托必须有一个目标 在代理调用BeginInvoke(new AsyncCallback(callBack), null);时,会抛这个异常的原因是该代理变量代理 ...

  3. View 与 Controller 之间的delegate(代理)传值

    这个代理传值是经常使用的一种传值方式,下面介绍一种View 和 Controller 之间的代理传值方法. 先建立一个View视图 如 LoginView 是继承于一个UIView 在LoginVie ...

  4. UIApplication和delegate代理

    所有的移动操作系统都有个致命的缺点:app很容易受到打扰,比如一个来电或者锁屏都会导致app进入后台甚至被终止 还有很多其他类似的情况会导致app受到干扰,在app受到干扰时,会产生一些系统事件,这是 ...

  5. Block作为property属性实现页面之间传值(代替Delegate代理与协议结合的方法)

    需求:在ViewController中,点击Button,push到下一个页面NextViewController,在NextViewController的输入框TextField中输入一串字符,返回 ...

  6. iOS delegate, 代理/委托与协议.

    之前知知道iOS协议怎么写, 以为真的跟特么java接口一样, 后来发现完全不是. 首先, 说说应用场景, 就是当你要用一个程序类, 或者说逻辑类, 去控制一个storyboard里面的label, ...

  7. iOS - Delegate 代理

    1.Delegate 1.1 协议 协议:是多个类共享的一个方法列表.协议中列出的方法没有相应的实现,计划由其他人来实现.协议中列出的方法,有些是可以选择实现,有些是必须实现. 1>.如果你定义 ...

  8. ios delegate 代理模式 观察者模式 不同视图间的通信

    delegate,在ios中比比皆是,NSURLConnection(网络请求有),tableView, connectionView,等系统自带 的常见代理.甚至,自己写代码的时候,随意间敲打出了p ...

  9. ios 页面传值4种方式(四) 之通过delegate(代理)

    这是ios里最常用的设计模式了,简直贯穿了整个cocoa touch框架.废话不多说,直接上代码: 场景是: A--打开--B; B里输入数值,点击--返回--A; A里显示B输入的值; △在开始写之 ...

随机推荐

  1. [转]Jenkins使用 管理节点

    现在我们已经搭建好了基本的Jenkins环境,在这一集里,我们说一说如何管理节点. 进入“系统管理”中的“管理节点”. 创建Windos系统的奴隶节点 先创建一台安装了Win7系统的虚拟机,作为Jen ...

  2. 理解MySQL——索引与优化

    转自:理解MySQL——索引与优化 写在前面:索引对查询的速度有着至关重要的影响,理解索引也是进行数据库性能调优的起点.考虑如下情况,假设数据库中一个表有10^6条记录,DBMS的页面大小为4K,并存 ...

  3. DotNetBar 第2课,窗口设置 Ribbon Form 样式

    1. 新增 windows 窗体时,选 Ribbon Form 2. 窗体继承 Office2007RibbonForm 3. 设计窗口下面,删除 删除styleManager1  组件 窗口效果如下 ...

  4. 用python+selenium抓取知乎今日最热和本月最热的前三个问题及每个问题的首个回答并保存至html文件

    抓取知乎今日最热和本月最热的前三个问题及每个问题的首个回答,保存至html文件,该html文件的文件名应该是20160228_zhihu_today_hot.html,也就是日期+zhihu_toda ...

  5. Nginx Debug Log

    //检查nginx.conf时(sudo ./nginx -t),输出数据到检测结果 //ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "配置解析处理&q ...

  6. 用 pytube 爬取 youtube 视频

    这个方法比直接用浏览器插件逼格高点 1. 简介 需要用到 pytube 这个第三方库:https://github.com/nficano/pytube 这里只是把这个页面捡重要部分翻译了一下. py ...

  7. Java设计模式(十三) 别人再问你设计模式,叫他看这篇文章

    原创文章,转载请务注明出处 OOP三大基本特性 封装 封装,也就是把客观事物封装成抽象的类,并且类可以把自己的属性和方法只让可信的类操作,对不可信的进行信息隐藏. 继承 继承是指这样一种能力,它可以使 ...

  8. jQuery判断一个字符串中是否包含一个字符串(一)

    var key = 'java'; var str = "hello,javascript,welcome to my world"; if(key.indexOf(str)!=- ...

  9. ased

    1.document.write(""); 输出语句 2.JS 中的注释为 // 3. 传统的 HTML 文档顺序是 :document->html->(head,bo ...

  10. android 底层入门开发(二)

    LED将为我闪烁:控制发光二极管 对于大多数Linux驱动来说,需要直接与硬件交互,本章主要介绍用Linux驱动来控制二极管的明暗,即通过Linux驱动发送数据控制开发板上LED灯的开关. 第一节介绍 ...