1

英語が下手でごめんなさい。ストーリーボードに2つのビューがありMainViewControllerます。アプリTabBarControllerのボタンを(モーダルセグエを使用して)押すと、条件に切り替えたり、条件に応じて切り替えたりします。正常に動作しますが、その後、tabBarViewsの下部で失われました。MainviewControllerfirstTabBarViewsecondTabBarViewTabBarControls

UPD:バーボタンを押した後のアクション

-(IBAction)barButtonPressed:(id)sender
{
    if (condition !=0 ) {
        [self performSegueWithIdentifier:@"segue1" sender:nil];
    } else {
        [self performSegueWithIdentifier:@"segue2" sender:nil];
    }
}
4

1 に答える 1

0

アドバイスどおりに動作しています。モーダル セグエは「フルスクリーン セグエ」であり、標準のナビゲーション スタックをカバーします。選択したビューコントローラーを変更したいだけの場合は、

[yourTabBarControllerInstance setSelectedIndex:index];
于 2012-10-31T16:59:18.550 に答える