-1

UIViewController実行後に選択する必要がありますSpash Screen。例:Splash Screen実行後

if (condition) {
   call UIViewController2
}else{
   call UIViewController2
}

ここで正しい情報を見つけましたStoryboardsを使用してプログラムで初期View Controllerを設定し、機能しました。全てに感謝

4

2 に答える 2

0

これはあなたを助けるかもしれません:

viewController.h に ViewController ターゲットをインポートし、ストーリーボードに識別子を指定します。

  if(condition) {

   viewController1 *v1 = (viewController1 *)[self.storyboard instantiateViewControllerWithIdentifier:@"view1"];
   [self presentViewController:v1 animated:YES completion:nil];
  }

 else {

 // same code but with other viewController
 }
于 2013-08-08T10:21:00.817 に答える
0

お役に立てれば

BOOL condition;

if(condition) {
   UIViewController2 *v2 = [[UIViewController2 alloc] init];

   [self presentingViewController:v2 completion:nil];  // iOS 6.0 +
   [self presentModalViewController:v2 animated:YES];  // iOS 2.0, but depreciated in iOS 6
}
else {
   // not fully sure what you're asking for this part, but do the same as above
   // if you're looking for the same view controller
}
于 2013-08-07T18:46:50.637 に答える