2011-05-13 70 views
0
-(void)countdown:(NSTimer *)timer{ 

    _value -=1; 
    if ((_delegate != nil) && [_delegate respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction)]) { // error: expected ':' before ')' token 
     [_delegate countdownTicker:self didUpdateValue:_value withAction:ZIMCountdownTickerTickAction]; 
    } 
    if (_value <= 0) { 
     [self stop]; 
     if ((_delegate != nil) && [_delegate respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction)]) { // error: expected ':' before ')' token 
      [_delegate countdownTickerDidFinish:self]; 
     } 
    } 
} 
+0

@sidyl和@MarkPowell:谢谢..你说的那样,它的工作。谢谢很多。 – Angus 2011-05-13 13:08:38

+0

然后不要忘记标记答案是正确的... – sidyll 2011-05-13 13:20:16

回答

4

修复它完全一样的错误说:

... respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction:)] 
                     ^
+0

这个人是正确的。 – pzearfoss 2011-05-13 13:05:52

+0

@pzearfoss:两个答案都是正确的! – Angus 2011-05-13 13:36:16

2

你需要把一个“:”在你withAction参数的选择到底。

相关问题