error: expected ':' before ')' token
-(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) {
开发者_StackOverflow社区 [self stop];
if ((_delegate != nil) && [_delegate respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction)]) { // error: expected ':' before ')' token
[_delegate countdownTickerDidFinish:self];
}
}
}
Fix it exactly as the error says:
... respondsToSelector:@selector(countdownTicker:didUpdateValue:withAction:)]
^
You need to put a ':' at the end of your withAction
parameter in the selector.
精彩评论