-(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 :(得分:4)
完全按错误说明修复:
... respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction:)]
^
答案 1 :(得分:2)
您需要在选择器中withAction
参数的末尾加上“:”。