UIViewController
実行後に選択する必要がありますSpash Screen
。例:Splash Screen
実行後
if (condition) {
call UIViewController2
}else{
call UIViewController2
}
ここで正しい情報を見つけましたStoryboardsを使用してプログラムで初期View Controllerを設定し、機能しました。全てに感謝
UIViewController
実行後に選択する必要がありますSpash Screen
。例:Splash Screen
実行後
if (condition) {
call UIViewController2
}else{
call UIViewController2
}
ここで正しい情報を見つけましたStoryboardsを使用してプログラムで初期View Controllerを設定し、機能しました。全てに感謝
これはあなたを助けるかもしれません:
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
}
お役に立てれば
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
}