반응형
아래 처럼 뷰콘트롤러를 하나 만드신후 거기에 GKAchievementViewController 를 삽입 하시면 됩니다.
UIViewController *tempVC = [[UIViewController alloc] init];
- (void) showAchievements
{
GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init];
if (achievements != NULL)
{
achievements.achievementDelegate = self;
[[[CCDirector sharedDirector] openGLView] addSubview:tempVC.view];
[tempVC presentModalViewController:achievements animated:YES];
}
}
- (void)achievementViewControllerDidFinish:(GKAchievementViewController *)viewController;
{
[tempVC dismissModalViewControllerAnimated:YES];
[tempVC.view.superview removeFromSuperview];
[viewController release];
}
반응형
'iDev' 카테고리의 다른 글
Sound Programming Topics for Cocoa (0) | 2011.01.09 |
---|---|
webview 에서 html 한글이 깨질때 (0) | 2011.01.06 |
[iOS Dev] modifying layer that is being finalized - error (0) | 2010.12.15 |
Linking Error: CGRectZero and CGRectOffset - [#iOSDevKor] (0) | 2010.07.14 |
iAd 적용시 주의 할점 - [#iOSDevKor] (0) | 2010.07.14 |