0
回報,我知道這是一個僞問題,但我不知道是什麼問題。我有兩個viewcontrollers,其中之一是作爲彈出窗口打開。當我點擊彈出窗口中的關閉按鈕時,我將調用unwind segue,但viewdidappear函數不會在我的父視圖控制器中調用。 我從這篇文章得到了幫助。 Unwound by a childViewdidappear不打電話時,從子視圖
override func viewDidAppear(_ animated: Bool)
{
// Handle controller being exposed from push/present or pop/dismiss
if (self.isMovingToParentViewController || self.isBeingPresented){
// Controller is being pushed on or presented.
print("hello")
}
else{
// Controller is being shown as result of pop/dismiss/unwind.
print("hello2")
}
}
也許無關,但要確保你調用'super.viewDidAppear(動畫)'。 – rmaddy
我做它已經:( –
首先,在你沒有做rmaddy建議什麼的問題。其次你能請把斷點到該行並告訴我們,如果它沒有停止應用程序。 –