0

私は Chaos In Motion を使用しています。http: //www.chaosinmotion.com/flowcover.html で、cocos2d を使用して iOS でカバーフロー ベースのアプリを作成しています。[[ccdirector sharedirector]pushscene:[myscene scene]] を使用してシーンをプッシュしています。 ;

それは特定のコントロールを示しており、[self schedule:] を使用して実行中の更新メソッドがあります。その後、シーンをポップして以前に存在していた画面に戻りますが、以前のシーンのスケジュールはまだ実行中であり、押すことができません現在の画面上の任意のボタン。私はそれで立ち往生しています。

[[CCDirector sharedDirector] pushScene: [CCTransitionFadeBL transitionWithDuration:3 scene:[AvatarSelection scene]]]; を使用しています。シーンをプッシュするために、アバター選択クラスには、というメソッドがあります

**-(void) ShowCoverFlow { FlowCoverViewController *flowCover; flowCoverView = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] 境界]] autorelease];

//using a navigation controller to present FlowCover without it rotating to portrait
testViewController = [[UINavigationController alloc] init];

//The navigation controller will try to put a nav bar in the window, so we hide it
[testViewController setNavigationBarHidden:YES animated:NO];

[testViewController setView:flowCoverView];

NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"TestFC" owner:self options:nil];
flowCover = [array objectAtIndex:0];
testViewController.delegate = self;
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
[[[[CCDirector sharedDirector] openGLView] window]addSubview:flowCoverView];
//testViewController.view.backgroundColor = [UIColor redColor];

double delayInSeconds = 0.1;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
    [testViewController presentModalViewController:flowCover animated:YES];
});



[testViewController  setModalPresentationStyle:UIModalPresentationFullScreen];

}**

次に、カバーフローを選択すると、残りを削除します ** - (void)flowCover:(FlowCoverView *)view didSelect:(int)image {

[flowCoverView removeFromSuperview];

    [testViewController dismissModalViewControllerAnimated:YES];
    [testViewController release];
    testViewController = nil;
  [[CCDirector sharedDirector] popScene];
[[NSNotificationCenter defaultCenter] postNotificationName:@"avatarchanged" object:self];

}**

そして、前の画面のボタンをどれもポップした後、プッシュできるようになりました

4

0 に答える 0