簡體   English   中英

呈現ViewController的Xcode問題

[英]Xcode problems with presenting ViewController

我有一個很煩人的問題。 我有兩個視圖控制器。 我只稱它們為ViewController和SecondViewController。 它們未在UINavigationController中鏈接。 當我呈現SecondViewController時,我沒有任何錯誤。 現在我回到ViewController。 現在調用SecondViewController時,出現兩個錯誤:

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

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

我使用自定義序列,但是使用模態序列時相同

你能幫助我嗎?

問候珍妮

看起來當您回到ViewController時,SecondViewController實例已經不存在了。 確保在調用它出現之前再次實例化它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM