“对开始/结束外观转换的不平衡调用”使用Storyboard在XCode 4中以模态方式推送视图时发出警告 [英] "Unbalanced calls to begin/end appearance transitions" warning when push a view in a modal way in XCode 4 with Storyboard
问题描述
经过网上的一些研究没有成功,我来这里问你关于我警告的问题。
After some research on the web without success, I come here to ask you the question about my warning.
实际上,我有一个带导航控制器的视图V1我想在V1完成加载时推送模态视图V2。
所以我使用 performSegueWithIdentifier
方法(我正在使用storyboard)。
这是我的代码:
Actually, I have a view V1 with a navigation controller and I want to push a modal view V2 when V1 has finished loading.
So I use the performSegueWithIdentifier
method (I'm using storyboard).
Here is my code:
[self performSegueWithIdentifier:@"showConnexionViewSegue" sender:self];
当我编译时,我收到了这个警告:
And when I compile, I got this warning:
Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x6849b30>
任何人都可以帮助我吗?
Can anyone help me?
推荐答案
听起来你可能正在 -viewWillAppear:
中执行segue,从而生成两个 -viewWillAppear:
没有2个相应 -viewDidAppear
消息的消息。
It sounds like you may be performing the segue in -viewWillAppear:
thus generating two -viewWillAppear:
messages without 2 corresponding -viewDidAppear
messages.
尝试在 -viewDidAppear
。
这篇关于“对开始/结束外观转换的不平衡调用”使用Storyboard在XCode 4中以模态方式推送视图时发出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!