2014-09-21 56 views
0

我有一个非常恼人的问题。我有两个视图控制器。我只是称他们为ViewController和SecondViewController。它们不在UINavigationController中链接。 当我介绍SecondViewController时,我不会收到任何错误。现在我回到ViewController。当我现在所说的SecondViewController,我得到两个错误:Xcode展示ViewController的问题

Presenting view controllers on detached view controllers is discouraged <ViewController: 0xadd5220>. 

*** -[SecondViewController isKindOfClass:]: message sent to deallocated instance 0x16bc1e30 

我使用自定义塞格斯,但它是相同的,当我使用模式塞格斯

你能帮助我吗?

问候 雅尼

+0

代替呈现,解除视图控制器.... – Avis 2014-09-21 20:13:52

+0

我使用StoryboardSegues。我提出SecondViewController通过键入[自performSegueWithIdentifier ... – Jannes 2014-09-22 12:40:52

回答

1

看起来你SecondViewController实例由你回到你的ViewController的时间了。确保在调用它之前再次实例化它。

+0

它,当我用一个标准的StoryboardSegue – Jannes 2014-09-22 12:45:25

+0

哦,等一下甚至不工作..当我选择偏曲过渡,一切工作正常。没有错误,没有警告... – Jannes 2014-09-22 12:47:25