備忘録として。
UINavigationControllerにViewControllerをpushすると
自動的に前画面のタイトルがBackボタンのタイトルに設定されるが
これを変えたい場合は、画面遷移する前に設定しておく必要がある。
//次の画面に遷移するボタン
- (void)actionButtonNextViewController:(id)sender
{
UIBarButtonItem *backBarButtonItem= [[UIBarButtonItem alloc] initWithTitle:@"戻る"
style:UIBarButtonItemStylePlain
target:nil
action:nil];
//遷移する前にタイトルを設定しておく
[self.navigationItem setBackBarButtonItem:backBarButtonItem];
//画面遷移
[self performSegueWithIdentifier:@"NextViewController" sender:self];
}