我在我的應用程序中創建了某種密碼安全性,因此除了iPhone所有者之外,沒有人可以打開應用程序。我想加載我每次用戶點擊應用程序圖標時創建的密碼視圖。每當應用程序變爲活動狀態時加載視圖
我知道在AppDelegate中有一個很好的方法,叫做-(void)applicationWillResignActive:(UIApplication *)application
。但是,在AppDelegate中,您無法使用我非常喜歡的presentModalViewController: animated:
。
如何在用戶每次打開應用程序時加載密碼視圖? 謝謝。
爲什麼applicationWillResignActive:其workes接近應用程序?使用applicationDidBecomeActive。你可以做一些像[self.viewController presentModalViewController:vc animated:YES]; – aknew
謝謝,你是對的 – SmartTree