开发者

Creating Protocol/Delegate in Monotouch

I'm a bit confused with how to create a custom protocol/delegate type in Monotouch.

The obj-c equivalent is

@protocol CellController
   - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath (NSIndexPath *)indexPath;
   @optional
   - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
@end

Does the implementation have to be an ab开发者_如何学Cstract class, an interface or what?

I'm sure its not complicated, I just can't get my head around it. A code example would be helpful, but getting pointed in the right direction will still be extremely helpful

Cheers

R


So what I ended up doing was creating an interface and using that :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜