前のビューから「次へ」ボタンが押されたときに、新しいビューに UIButton のテキストを設定しようとしています。IBOutlet を正しく設定し、これに対する回答を探しましたが、まったく機能していません。
これが私がやろうとしていることのサンプルです:
- (IBAction)computeQuiz:(id)sender
{
[fiveFootUniversalResults setTitle:@"Test" forState:UIControlStateNormal];
}
- (IBAction)jumpT10ResultsView:(id)sender
{
NSString *nibFileToLoad = @"JumpT10Results";
UIDevice *device = [UIDevice currentDevice];
if([device userInterfaceIdiom] == UIUserInterfaceIdiomPad)
{
nibFileToLoad = [nibFileToLoad stringByAppendingString:@"-iPad"];
}
JumpmasterPathfinderViewController *nextView = [[JumpmasterPathfinderViewController alloc] initWithNibName:nibFileToLoad bundle:nil];
// Modal view controller
nextView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:nextView animated:YES];
[nextView release];
[scrollView setContentSize:CGSizeMake(imageViewWidth, imageViewHeight + 44.0)];
}
これらのアクションは両方とも、前のビューのボタンに接続されています。ビューは正常に読み込まれ、すべてが読み込まれます。唯一の問題は、ボタンのテキストが変更されないことです。IBOutlets が正しく設定されていることは 100% 確信していますが、何が間違っているのかわかりません。何か案は?