1
我在我的應用程序委託中有一個計時器,用戶選擇在另一個不在標籤欄中的viewController中執行該計時器的選擇器所需的時間間隔;選擇時間間隔後一個模式SEGUE用於加載第一的viewController中的UITabBarController時的時間間隔經過我希望應用程序呈現警報嘗試在其視圖不在窗口層次結構中的UITabBarController上呈現UIAlertController
,但它給了我這樣的:警告:試圖提出UIAlertController上的UITabBarController,其視圖不在窗口層次結構中!
這裏是我'使用的代碼:
let alert = UIAlertController(title: "alert", message: "test", preferredStyle: .Alert)
self.window?.rootViewController?.presentViewController(alert, animated: true, completion: nil)
謝謝你,它一直 – Theilya
沒問題,夥計! – Dmitry
uitabbarcontroller中的uisplitviewcontroller怎麼樣? – SAHM