UINavigationController在显示topViewController之前显示RootViewController

时间:2015-10-01 16:43:28

标签: ios iphone xcode swift xcode6

我试图在导航视图控制器中显示视图控制器,它是第二视图控制器。如果点击连接,我想显示RegistraionViewController。基于此。我将registrationViewController推送到导航控制器,其中LoginViewController是rootView控制器。现在的问题是何时加入了Tap。它应该显示registrationView控制器,但它显示登录屏幕,并在延迟大约半秒后。它显示注册屏幕。我的守则如下:

<aside class="left-off-canvas-menu">
    <ul class="off-canvas-list">
        <li><label>Foundation</label></li>
        <li><a href="#">Option 1</a></li>
        <li>
            <a href="#" class="off-canvas-submenu-call">Option 2 <span class="right"> + </span></a>
            <ul class="off-canvas-submenu">
                <li><a href="#">Sub menu 1</a></li>
                <li><a href="#">Sub menu 2</a></li>
                <li><a href="#">Sub menu 3</a></li>
            </ul>
        </li>
       <li>
            <a href="#" class="off-canvas-submenu-call">Option 3 <span class="right"> + </span></a>
            <ul class="off-canvas-submenu">
                <li><a href="#">Sub menu 1</a></li>
                <li><a href="#">Sub menu 2</a></li>
                <li><a href="#">Sub menu 3</a></li>
            </ul>
        </li>
    </ul>
</aside>

我也试过改变视图的转换并将动画时间设为0.但是没有运气。这是:

           if  let navC = self.selectedViewController as? UINavigationController
            {
                if  let vc = navC.viewControllers.first as? LoginViewController
                {
                    if let registerVC = self.storyboard?.instantiateViewControllerWithIdentifier("RegistrationViewControllerIdentifier") as? RegistrationViewController
                    {
                        var view = navC.view
                        vc.navigationController?.pushViewController(registerVC, animated: false)

                    }
                }

            }

0 个答案:

没有答案