如何取得单独的成就
我在 iPhone 的游戏中心中有成就,但我的应用程序是通用的,所以我正在为 iPad 制作成就,我不希望它们与 iPhone 成就一起显示,我希望它们都分开
-(void)checkAchievements6
{
if(score>10000)//achievement for getting 10000 points.
{
GKAchievement *achievement= [[GKAchievement alloc] initWithIdentifier:@"5Digit"];
achievement.percentComplete = 100.0;
achievement.showsCompletionBanner=YES;
if(achievement!= NULL)
{
[achievement reportAchievementWithCompletionHandler: ^(NSError *error)
{
if(error != nil){
NSLog(@"Achievement failed");
}
else
{
NSLog(@"Achievement Success");
}
}];
}
}
}
I have achievements in game Center for my iPhone but my app is universal so am making achievements for the iPad i don't want them to be displayed with the iPhone achievements i want them both to be seperate
-(void)checkAchievements6
{
if(score>10000)//achievement for getting 10000 points.
{
GKAchievement *achievement= [[GKAchievement alloc] initWithIdentifier:@"5Digit"];
achievement.percentComplete = 100.0;
achievement.showsCompletionBanner=YES;
if(achievement!= NULL)
{
[achievement reportAchievementWithCompletionHandler: ^(NSError *error)
{
if(error != nil){
NSLog(@"Achievement failed");
}
else
{
NSLog(@"Achievement Success");
}
}];
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定这是否正是您要问的,但可能是这样的吗?
I'm not sure if this is exactly what you are asking, but could it be something like this?