表达式结果未用于游戏中心
static GCHelper *sharedHelper =nil;
+ (GCHelper *) sharedInstance
{
@synchronized ([GCHelper class])
{
If (!shareHelper)
{
[[self alloc] init];
}
return nil;
}
我有它来运行游戏中心,但它给了我一个错误“表达式结果未使用”我该如何解决这个问题
static GCHelper *sharedHelper =nil;
+ (GCHelper *) sharedInstance
{
@synchronized ([GCHelper class])
{
If (!shareHelper)
{
[[self alloc] init];
}
return nil;
}
I have it to run gamecenter but it gives me an error of "expression result unused" how do i fix this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您实际上并没有将
[[self alloc] init]
的结果分配给shareHelper
,这几乎肯定是您的意思。这个警告指出了你的错误。You're not actually assigning the result of
[[self alloc] init]
toshareHelper
, which you almost certainly mean to do. This warning is pointing out your mistake.