购买完成后,iPhone 重新加载桌面视图会出现奇怪的错误。 ”错误:预期 ':'在“.”之前令牌”
伙计们,我正在使用下面的代码。 Xcode 拒绝编译最后一行。我得到:
“错误:在 '.' 之前预期有 ':'令牌”
在最后一行。无法弄清楚出了什么问题...
- (void) failedTransaction: (SKPaymentTransaction *)transaction
{
if (transaction.error.code != SKErrorPaymentCancelled)
{
// Optionally, display an error here.
}
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
[SelectorController.tableView reloadData];
}
Guys I'm using the code below. Xcode refuses to compile the last line. I get:
"error: expected ':' before '.' token"
on the last line. Can't figure out what is wrong...
- (void) failedTransaction: (SKPaymentTransaction *)transaction
{
if (transaction.error.code != SKErrorPaymentCancelled)
{
// Optionally, display an error here.
}
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
[SelectorController.tableView reloadData];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
难道您的
SelectorController
是一个类,而不是类的实例?Could it be that your
SelectorController
is a class, not an instance of a class?在您的代码中,什么是
SelectorController
?鉴于 CamelCaseCapitalization,它看起来像是一个类名。也许在代码的其他地方有一行定义了 SelectorController 的实例,如下所示:在这种情况下(双关语)有问题的行应该是:
In your code, what is a
SelectorController
? Given the CamelCaseCapitalization, it looks like it's a class name. Perhaps somewhere else in your code you have a line that defines an instance of theSelectorController
something like this:In which case (pun intended) the problematic line should be: