0

私のアプリには「シーン」が 1 つしかありません。

すべての UI はストーリーボードから読み込まれますが、ユーザーはフォント、色、位置などを変更してこれを変更できます。

ユーザーがアプリを閉じたときにこれをリセットして、起動時にデフォルトに戻るようにしたいと思います。

ストーリーボードからビューをリロードする方法はありますか?

4

3 に答える 3

2

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.

于 2013-06-19T08:54:25.393 に答える
0

appdelegate のメソッドから

  • (void)applicationWillEnterForeground:(UIApplication *)アプリケーション

コントローラーのviewdidloadを呼び出します

appdelegate のこのメソッドは、アプリがバックグラウンドからフォアグラウンドに移行するたびに呼び出されるため

于 2013-06-19T09:42:58.050 に答える