質問編集履歴
1
コードを修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,16 +19,16 @@
|
|
19
19
|
#import <Social/Social.h>
|
20
20
|
|
21
21
|
-(void)score{
|
22
|
+
if ([GKLocalPlayer localPlayer].isAuthenticated) {
|
22
|
-
GKScore
|
23
|
+
GKScore* score = [[GKScore alloc] initWithLeaderboardIdentifier:@"achievement"];
|
23
|
-
|
24
|
+
|
24
|
-
scoreR=スコアの値;
|
25
|
-
|
25
|
+
score.value = 100.0;
|
26
|
-
[
|
26
|
+
[GKScore reportScores:@[score] withCompletionHandler:^(NSError *error) {
|
27
|
-
if (error
|
27
|
+
if (error) {
|
28
|
-
{
|
29
|
-
//
|
28
|
+
// エラーの場合
|
30
|
-
NSLog(@"error %@",error);
|
31
29
|
}
|
32
30
|
}];
|
31
|
+
}
|
32
|
+
|
33
33
|
}
|
34
34
|
```
|