Created
October 5, 2013 10:28
-
-
Save michaelcontento/6839251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git template/multi-platform-cpp/proj.ios_mac/ios/AppController.h template/multi-platform-cpp/proj.ios_mac/ios/AppController.h | |
index 0c73d6a..e155cc9 100644 | |
--- template/multi-platform-cpp/proj.ios_mac/ios/AppController.h | |
+++ template/multi-platform-cpp/proj.ios_mac/ios/AppController.h | |
@@ -4,7 +4,7 @@ | |
@interface AppController : NSObject <UIApplicationDelegate> { | |
UIWindow *window; | |
- RootViewController *viewController; | |
+ @public RootViewController *viewController; | |
} | |
@end | |
diff --git template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h | |
index 25f728b..9c8911c 100644 | |
--- template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h | |
+++ template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h | |
@@ -1,7 +1,7 @@ | |
#import <UIKit/UIKit.h> | |
+#import <GameKit/GameKit.h> | |
- | |
-@interface RootViewController : UIViewController { | |
+@interface RootViewController : UIViewController <GKAchievementViewControllerDelegate, GKLeaderboardViewControllerDelegate> { | |
} | |
- (BOOL) prefersStatusBarHidden; | |
diff --git template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm | |
index 906aeaf..2af11dd 100644 | |
--- template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm | |
+++ template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm | |
@@ -3,6 +3,18 @@ | |
@implementation RootViewController | |
+// GKLeaderboardViewControllerのDelegate | |
+-(void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController | |
+{ | |
+ [self dismissViewControllerAnimated:YES completion:nil]; | |
+} | |
+ | |
+// GKAchievementViewControllerのDelegate | |
+-(void)achievementViewControllerDidFinish:(GKAchievementViewController *)viewController | |
+{ | |
+ [self dismissViewControllerAnimated:YES completion:nil]; | |
+} | |
+ | |
/* | |
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. | |
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment