0

在我的登录逻辑中,我有一个“AuthenticationViewController”(这里应用程序检查用户是否已经登录)。我也使用故事板,所有视图都基于推送序列。所以它看起来:

                                    ------ AccountViewController
                                   |
-->  AuthenticationViewController  +
                                   |
                                    ------ LoginViewController

现在,当我使用 UITabbarController 并在标签栏图标“帐户”上按两次时,应用程序会弹回 AuthenticationViewController,然后弹回 accountView 或 loginView。我知道这是一个“瑕疵”,但是当我在帐户图标上按两次时,如何实现这一点,但 AuthenticationViewController 没有显示?还是我有错误的逻辑?

编辑

这就是我的推送功能在 authenticationViewController 中以编程方式初始化的方式:

// Delegate to AccountViewController if Data (Username, Password) is correct

if ([strResult isEqualToString:@"1"]) {
    AccountViewController *AVC = [self.storyboard instantiateViewControllerWithIdentifier:@"AccountView"];
    [self.navigationController pushViewController:AVC animated:NO];
    // [self performSegueWithIdentifier:@"authAccountSegue" sender:self];
}
else {
    LoginViewController *LVC = [self.storyboard instantiateViewControllerWithIdentifier:@"LoginView"];
    [self.navigationController pushViewController:LVC animated:NO];
}

在此处输入图像描述

在此处输入图像描述

4

2 回答 2

0

好吧,我在这里看到了两件事,但不确定它们是否有助于解决您的问题。第一个是你可以只为这两个动作设置 segues,不会有太大区别。另一个是查看您的故事板结构,登录和帐户控制器似乎更适合作为模式视图,而不是将其推入堆栈。

于 2012-09-17T15:10:50.077 回答
0

好的,我自己解决了这个问题:SUBVIEWS 是关键:)

于 2012-09-19T12:01:37.050 回答