私のアプリケーションには、4 つのボタンといくつかのテキスト ラベルがあります。ラベルのテキストは、インターフェイス ビルダーによって定義されます。私は言葉が苦手なので、以下のコードが私がやろうとしていることを指摘するのに十分明確であることを願っています.
- (void)viewDidLoad
{
[super viewDidLoad];
//Default view loaded as defined in Interface Builder
}
- (IBAction)button_1_Pressed:(id)sender {
// Programmatically Change text in Labels
}
- (IBAction)button_2_pressed:(id)sender {
// Programmatically Change text in labels
}
- (IBAction)button_3_pressed:(id)sender {
// Programmatically Change text in labels
}
- (IBAction)button_4_pressed:(id)sender {
// Change text in labels back to the values when the view first loaded.
// That is, to the text defined in Interface builder instead of changing
// it back programmatically.
}
または、ボタン 4 が押されたときにビューをリセット/「再起動」する方法はありますか?