这些操作都可以接受一个委托,一般可以使用匿名方法的方式来传递。
These all accept a delegate, usually in the form of an anonymous method.
main方法简单地将每个操作委托给辅助(worker)方法。
The main method simply delegates each operation to worker methods.
可以看到在viewDidLoad方法中设置了tableView委托和数据源。
You can see the tableView delegate and data source set below in the viewDidLoad method.
然后,你必须在这个委托对象上调用BeginInvoke方法。
如委托方有给定的检测方法,该检测方法作为此协议的一部分。
If the clients have test method, the method should be part of this agreement.
委托是包含有对一个方法的引用的对象。
A delegate is an object that contains a reference to a method.
如何在这宝石类工作委托的方法?
我如何传递参数给委托的回调方法?
委托接着调用绑定的方法。
使用对该事件处理程序方法的一个引用创建委托的一个实例。
Create an instance of the delegate, using a reference to the event handler method.
委托是一个方法的引用指针。
注意:它总是把自己作为第一个参数传递给它的委托方法。
Notice that it always sends itself as the first argument to the delegate method.
这里要注意的重要一点是委托和方法的签名。
The important point to note here is the signature of delegates and methods.
这些操作都可以接受一个委托,一般可以使用匿名方法的方式来传递。
These all accept a delegate , usually in the form of an anonymous method.
使委托与匿名方法关联。
创建委托时,请标识将要处理事件的方法。
When you create a delegate, you identify the method that will handle the event.
两种方法都会在调用委托时显示一条消息。
In each case, a message is displayed when the delegate is invoked.
两种方法都会在调用委托时显示一条消息。
In each case, a message is displayed when the delegate is invoked.
应用推荐