1. <tfoot id='bTm60'></tfoot>
      • <bdo id='bTm60'></bdo><ul id='bTm60'></ul>
      <i id='bTm60'><tr id='bTm60'><dt id='bTm60'><q id='bTm60'><span id='bTm60'><b id='bTm60'><form id='bTm60'><ins id='bTm60'></ins><ul id='bTm60'></ul><sub id='bTm60'></sub></form><legend id='bTm60'></legend><bdo id='bTm60'><pre id='bTm60'><center id='bTm60'></center></pre></bdo></b><th id='bTm60'></th></span></q></dt></tr></i><div id='bTm60'><tfoot id='bTm60'></tfoot><dl id='bTm60'><fieldset id='bTm60'></fieldset></dl></div>
      <legend id='bTm60'><style id='bTm60'><dir id='bTm60'><q id='bTm60'></q></dir></style></legend>

      <small id='bTm60'></small><noframes id='bTm60'>

      不断收到“对 &lt;ViewController&gt; 的开始/结束外观转换的不平衡调用"

      时间:2023-06-12
    1. <i id='2csad'><tr id='2csad'><dt id='2csad'><q id='2csad'><span id='2csad'><b id='2csad'><form id='2csad'><ins id='2csad'></ins><ul id='2csad'></ul><sub id='2csad'></sub></form><legend id='2csad'></legend><bdo id='2csad'><pre id='2csad'><center id='2csad'></center></pre></bdo></b><th id='2csad'></th></span></q></dt></tr></i><div id='2csad'><tfoot id='2csad'></tfoot><dl id='2csad'><fieldset id='2csad'></fieldset></dl></div>

        • <bdo id='2csad'></bdo><ul id='2csad'></ul>
            <tfoot id='2csad'></tfoot>
          • <small id='2csad'></small><noframes id='2csad'>

            <legend id='2csad'><style id='2csad'><dir id='2csad'><q id='2csad'></q></dir></style></legend>

                <tbody id='2csad'></tbody>

                本文介绍了不断收到“对 &lt;ViewController&gt; 的开始/结束外观转换的不平衡调用""错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个几乎运行完美的应用程序.以下是我的应用的结构:

                I have an app that is almost running perfectly. Here is how my app is structured:

                故事板上共有 6 个视图控制器.前 3 个 View Controller 是最重要的.初始视图控制器具有登录"和注册"按钮.登录"按钮模态显示登录视图控制器,注册"按钮模态显示注册视图控制器.

                6 total View Controllers on the storyboard. The first 3 View Controllers are the most important. The initial View Controller has buttons to "Login" and "Signup". The "Login" button modally presents a Login View Controller and the "Signup" button modally presents a Signup View Controller.

                注册视图控制器有 3 个字段,分别是用户名、密码和电子邮件,然后是一个提交"按钮.提交按钮将数据提交到我的网络服务器,如果所有内容都提交成功,它会自行调用performSegueWithIdentifier"方法.

                The Signup View Controller has 3 fields for username, password, and email and then a "submit" button. The submit button submits the data to my web server and if everything submits successfully it calls the "performSegueWithIdentifier" method on itself.

                声明如下:

                [self performSegueWithIdentifier:@"superSegue" sender:self];
                

                今晚我花了 2 个小时试图让上述方法调用起作用,它终于起作用了.为了让它工作,我必须在故事板上选择我的注册视图控制器,然后转到编辑器 > 嵌入 > 导航控制器(如果我没记错的话,我必须这样做,因为注册视图控制器是以模态方式呈现的).然后我从我的注册视图控制器的提交按钮拖到我想要推送到的视图控制器并选择推送,然后输入一个标识符名称.

                I spent 2 hours tonight trying to get the above method call to work and it finally does work. To get it to work, I had to select my Signup View Controller on the storyboard and go to Editor > Embed In > Navigation Controller (If I remember correctly I had to do this because the signup view controller is presented modally). I then dragged from my Signup View Controller's submit button to the View Controller I want to push to and selected Push and then typed in an identifier name.

                无论如何,在我尝试使用我们使用方法调用推送到的视图控制器上的后退按钮之前,上述所有操作都非常好.如果我点击后退按钮,它将进入 90% 的黑屏,顶部有一个空白导航栏和一个后退按钮,当然该后退按钮也没有任何作用.

                Anyways, all of the above works perfectly fine until I try to use the back button on the View Controller that we pushed to using the method call. If I tap the back button, it goes to a 90% black screen with a blank nav bar at the top with a back button and of course that back button does nothing as well.

                这是我在控制台中遇到的错误:

                This is the error that I get in the console:

                Unbalanced calls to begin/end appearance transitions for <VerificationViewController: 0x14ed1bb0>
                

                验证视图控制器是注册视图控制器通过 performSegueWithIdentifier 方法推送到的视图控制器.

                Verification View Controller is the View Controller that the Signup View Controller pushes to via the performSegueWithIdentifier method.

                有谁知道我该如何解决这个错误?

                Does anyone know how I can fix this error?

                我在下面附上了我的故事板在 xcode 中的截图.我已经编写了一个视图控制器,但还没有连接,无论如何都不应该有所作为,因此您可以忽略 Login VC 右侧的视图控制器.

                I have included a screenshot below of what my storyboard looks like in xcode. There is a view controller that I have coded but not connected yet and shouldn't make a difference anyways so you can ignore the View Controller to the right of the Login VC.

                推荐答案

                今天早上我在另一个 stackoverflow 问题中找到了答案.可以在这里找到答案.

                I found the answer this morning in another stackoverflow question. The answer can be found here.

                当我最初设置 Push Segue 时,我单击并拖动按钮,并且还在该按钮的 IBAction 方法实现中调用 performSegueWIthIdentifier 方法.这导致在按钮按下时执行 2 个相同的 push segues.我只是将我的方法调用留在了 IBAction 中,删除了旧的 push segue,并创建了一个新的 push segue,只是这次我点击并从整个 View Controller 中拖动而不是它的按钮.

                When I had originally setup the Push Segue, I clicked on and dragged from a button, and was also calling the performSegueWIthIdentifier method inside that button's IBAction method implementation. This was causing 2 identical push segues to be executed on the button press. I just left my method call in the IBAction, deleted the old push segue, and created a new push segue only this time I clicked on and dragged from the entire View Controller instead of it's button.

                这篇关于不断收到“对 &lt;ViewController&gt; 的开始/结束外观转换的不平衡调用""错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:UINavigationController 上的确认返回按钮 下一篇:向没有导航控制器的视图添加导航栏

                相关文章

                  <bdo id='b9FNi'></bdo><ul id='b9FNi'></ul>
                1. <small id='b9FNi'></small><noframes id='b9FNi'>

                2. <tfoot id='b9FNi'></tfoot>

                  <i id='b9FNi'><tr id='b9FNi'><dt id='b9FNi'><q id='b9FNi'><span id='b9FNi'><b id='b9FNi'><form id='b9FNi'><ins id='b9FNi'></ins><ul id='b9FNi'></ul><sub id='b9FNi'></sub></form><legend id='b9FNi'></legend><bdo id='b9FNi'><pre id='b9FNi'><center id='b9FNi'></center></pre></bdo></b><th id='b9FNi'></th></span></q></dt></tr></i><div id='b9FNi'><tfoot id='b9FNi'></tfoot><dl id='b9FNi'><fieldset id='b9FNi'></fieldset></dl></div>
                    <legend id='b9FNi'><style id='b9FNi'><dir id='b9FNi'><q id='b9FNi'></q></dir></style></legend>