这是我的代码:
// View Controller with navigation bar
InAppPurchaseViewController *purchaseViewController = [[InAppPurchaseViewController alloc] init];
purchaseViewController.title = @"Magasin";
purchaseViewController.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissViewController:)] autorelease];
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:purchaseViewController] autorelease];
// Add `purchaseViewcontroller` TO container AND container ON openGLView
UIViewController *container = [[UIViewController alloc] init];
[container setView:[[CCDirector sharedDirector] openGLView]];
[container setModalTransitionStyle: UIModalTransitionStyleCoverVertical];
[container presentViewController:navController animated:YES completion:nil];
在UITableView
purchaseViewController 中。
我正在考虑使用[UIColor clearColor]
,但无论我使用它,我的UITableView
. 单元格变得不可选择和不可滑动(除了单元格中的元素)
编辑:appdelegate
这是.h
@class AudioEngine;
@class RootViewController;
@class Score;
@interface AppDelegate : NSObject <UIApplicationDelegate, GameCenterManagerDelegate>
@property int CurrentPackage;
@property int CurrentScore;
@property int CurrentHighScore;
@property BOOL SoundShouldPlay;
@property BOOL PauseScreenUp;
@property(nonatomic, retain) AudioEngine *CustomAudioEngine;
@property(nonatomic, retain) GameCenterManager *CustomGameCenterManager;
@property(nonatomic, retain) UIWindow *window;
@property(nonatomic, readonly) RootViewController *ViewController;
@property(nonatomic, retain) NSString* CurrentLeaderBoard;
@property(nonatomic, retain) NSMutableArray *TenLastScoresArray;
+(AppDelegate *)get;
-(void)connectToGameCenter;
-(void)addScoreToLastScore:(Score*)score;
该方法确实完成了启动
-(void)applicationDidFinishLaunching:(UIApplication*)application
{
CC_DIRECTOR_INIT();
self.CurrentLeaderBoard = kLeaderboardID;
[[SKPaymentQueue defaultQueue] addTransactionObserver:[InAppPurchaseSingleton sharedHelper]];
[AudioEngine preloadBackgroundMusic];
[AudioEngine playBackgroundMusic:3];
self.SoundShouldPlay = YES;
[SceneManager goSplash];
}