定义一个委托public delegate void CalculateDelegate(int 32 x,int 32 y);定义一个委托类型的变量public static CalculateDelegate mydelegate;定义一个方法和委托绑定,注意定义的方法和委托的参数要统一publ...
分类:
其他好文 时间:
2014-09-19 15:26:15
阅读次数:
133
Initializing a Central Manager- (instancetype)initWithDelegate:(id)delegate queue:(dispatch_queue_t)queue- (instancetype)initWithDelegate:(id)delegate...
分类:
其他好文 时间:
2014-09-19 11:38:46
阅读次数:
446
private delegate void AsyncDel(); private void Do() { AsyncDel del = new AsyncDel(DoWork); AsyncCallback callback = new AsyncCallback(CallBack); del.B...
分类:
其他好文 时间:
2014-09-18 11:23:53
阅读次数:
163
被反射类中: public delegate void CompeletedHandler(); public static event CompeletedHandler AnalysisCompeleted; static void BasePath_AnalysisCompel...
分类:
其他好文 时间:
2014-09-17 13:24:12
阅读次数:
179
属性作用CGPoint contentOffSet监控目前滚动的位置CGSize contentSize滚动范围的大小UIEdgeInsets contentInset视图在scrollView中的位置id delegate 设置协议 BOOL directionalL...
分类:
其他好文 时间:
2014-09-17 11:44:12
阅读次数:
133
IOS中有许多网络请求的函数,同步的,异步的,通过delegate异步回调的。 在做一个项目的时候,上网看了很多别人的例子,发现都没有一个简单的,方便的异步请求的封装例子。我这里要给出的封装代码,是异步的,post的请求方式。通过ios的原生函数简单封装。通过这个封装可以方便的访问http服务...
分类:
移动开发 时间:
2014-09-15 21:04:29
阅读次数:
213
一.理解什么事委托?1.使用委托可以把一个方法以一个参数的形式代入到另一个方法里面(可以理解为指向一个函数的指针)。例子:using System;using System.Collections.Generic;using System.Text;namespace Delegate{ //定义委...
分类:
其他好文 时间:
2014-09-15 19:18:09
阅读次数:
206
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Input; namespace SC { /// /// delegate comm...
分类:
其他好文 时间:
2014-09-15 00:56:17
阅读次数:
516
写法有点怪异,记一下吧_, implemented := this.delegate.(IGenTcpServerDelegate)if implemented { this.delegate.GenTcpServerClientConnected(this.getClientInfoMap(...
分类:
其他好文 时间:
2014-09-14 20:33:37
阅读次数:
153
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"选择图片" delegate:(self) cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherB...
分类:
其他好文 时间:
2014-09-13 21:26:35
阅读次数:
279