2016-12-17 14 views

答えて

2

ここでコードを追加すると、ウォークスルー画面をアプリケーションライフサイクル全体で1回だけ表示することができました。これはあなたにとって有益です。

// show walkthough for first time only (first time the app launches after download). 
    bool shownFlag = [[NSUserDefaults standardUserDefaults] boolForKey:@"walkthroughShownOnce"]; 
    if(!shownFlag){ 
     [[NSUserDefaults standardUserDefaults] setBool:TRUE forKey:@"walkthroughShownOnce"]; 
     [[NSUserDefaults standardUserDefaults] synchronize]; 
     WalkThroughViewController *vc=[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"WalkThroughViewController"]; 
     [self.window makeKeyAndVisible]; 
     [self.window setRootViewController:vc]; 
    }else{ 
     //if not walkthough go and check other task 

    } 
+0

私はこのコードを適切な権限で追加する必要がありますか? –

+0

@ShikhaはいinFinishLaunchingWithOptions – Saraswati

関連する問題