私のアプリには「シーン」が 1 つしかありません。
すべての UI はストーリーボードから読み込まれますが、ユーザーはフォント、色、位置などを変更してこれを変更できます。
ユーザーがアプリを閉じたときにこれをリセットして、起動時にデフォルトに戻るようにしたいと思います。
ストーリーボードからビューをリロードする方法はありますか?
私のアプリには「シーン」が 1 つしかありません。
すべての UI はストーリーボードから読み込まれますが、ユーザーはフォント、色、位置などを変更してこれを変更できます。
ユーザーがアプリを閉じたときにこれをリセットして、起動時にデフォルトに戻るようにしたいと思います。
ストーリーボードからビューをリロードする方法はありますか?
Use
-viewWillAppear
that is the purpose of it
-initWithFrame:
If you use Interface Builder to design your interface, this method is not called when your view objects are subsequently loaded from the nib file. Objects in a nib file are reconstituted and then initialized using their initWithCoder: method, which modifies the attributes of the view to match the attributes stored in the nib file.
appdelegate のメソッドから
コントローラーのviewdidloadを呼び出します
appdelegate のこのメソッドは、アプリがバックグラウンドからフォアグラウンドに移行するたびに呼び出されるため