アプリを開いてバックグラウンドに行き、最後にフォアグラウンドに戻ったときに私のインターフェースに問題があります。だから、バックグラウンドから復帰したときに、常にアプリを起動させたいと思っています。 クラッシュ・ロワイヤルのゲームがそのように機能しているのを見ました。 私はすぐに開発しています3バックグラウンドから復帰した後にアプリを起動するよう強制する。 Swift 3
0
A
答えて
1
あなたのホームページは、バックグラウンドから復帰した後にロードしたいと思うものは正確にはわかりませんが、AppDelegateの機能を使用してバックグラウンド状態からの復帰時や、アプリケーションの終了時に目的のビューを設定できるように、必要に応じて値を設定してシーンやビューをロードします。
AppDelegateに既に組み込まれている機能の一覧を示します。
func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
関連する問題
- 1. ロケーションの変更をバックグラウンドでアプリケーションを再起動できますか?バックグラウンドから強制終了した後
- 2. viewDidAppear、また、アプリがバックグラウンドから復帰したとき
- 3. iOS10のバックグラウンドからアクティブに復帰するたびにアプリがクラッシュする
- 4. アプリがバックグラウンドから復帰したときのMvvmCross ViewModel例外
- 5. AndroidアプリがAPIレベルで起動するように強制します<012
- 6. Swift 3:イニシャライザエラーからの復帰
- 7. iOSプライベートAPI:バックグラウンドからアプリを復帰させる
- 8. アプリが3回起動した後にAlertDialogを表示する
- 9. アプリのインストール後にBlackBerryが強制的に再起動するようにする
- 10. ゴランの強制復帰エラー
- 11. ホームボタンからバックグラウンドを移動した後にアプリケーションを再起動する方法
- 12. swift - バックグラウンドからの復帰後に特定のビューを表示する方法を教えてください。
- 13. アプリ内のコードからアプリを再起動するiOS swift
- 14. iPodがスタンバイモードから復帰した後、iPodアプリが応答を停止する
- 15. デバッグ中に関数からの強制復帰
- 16. Tombstonedから復旧したときにアプリを再起動するには?
- 17. Swift 3がリリースされた後、Swift 2アプリが動作しますか?
- 18. AVPlayerViewControllerがフルスクリーンから復帰した後に停止する
- 19. バックグラウンドからの復帰コードを再開する
- 20. Windowsがスリープモードから復帰するときのアプリケーションの起動
- 21. iOSでバックグラウンドでアプリを強制終了できますか?
- 22. Android - 強制的にアプリをバックグラウンドで閉じたままにする
- 23. デバイスの再起動後にバックグラウンドでアプリを自動実行
- 24. バックグラウンドから再開するときにアプリを再起動する
- 25. バックグラウンドから外出するときにアプリを再起動する
- 26. バックグラウンドでコンパニオンウォッチアプリからメインiOSアプリを起動するにはどうすればよいですか?
- 27. セロリがPython 3を使用するように強制する
- 28. 強制的にコンピュータを自動的に起動しますか?
- 29. iOSアプリケーションはバックグラウンドから復帰した後にメモリ警告からクラッシュしますが、以前は復帰していませんか?
- 30. 3分後にiOSがアプリを強制終了させないようにする
http://stackoverflow.com/a/3098252/1072229試しましたか? –