スクリプトにエラーがありますが、機能しません。しかし、私はそれを変更する方法がわかりません。2つのビューを使用していますが、if / elseを使用して、最初のビューから2番目のビューのfavoriteColorLabelのテキストを変更したいと思います。誰かが問題を知っているなら、私を助けてください。私のコード:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.row==1) {
DetailVC.favoriteColorLabel=@"Bonjour";
DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:[NSBundle mainBundle]];
dvController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:dvController animated:YES];
}
}
ありがとう。