开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜