自己的代表方法

时间:2010-10-21 07:21:13

标签: iphone delegates touchesbegan

早安用户,

我实施了以下删除方法:

- (void)openFlowView:(AFOpenFlowView *)openFlowView doubleTapOnIndex:(int)index itemView:(AFItemView *)itemView{
    NSLog(@"Der Touch geht!!!!!");
}

应该提示并调用该方法:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    UITouch *touch = [[event allTouches] anyObject]; 
    if ([touch tapCount] == 2) {
        if ([self.viewDelegate respondsToSelector:@selector(openFlowView:doubleTapOnIndex:itemView:)])
            [self.viewDelegate openFlowView:self doubleTapOnIndex:selectedCoverView.number itemView:selectedCoverView];
        }
    else {

但它永远不会进入第二个,如果有人知道为什么会这样吗?

问候并感谢大家 事先帮忙

2 个答案:

答案 0 :(得分:1)

“self.viewDelegate”类是否是您添加委托方法的类?

答案 1 :(得分:0)

您是否在头文件中包含了方法声明?