iPhone でローカル オーディオ ファイルを再生するためのアプリを作成したいのですが、いくつかのコードで行き詰まっています。ビューをプッシュして、uitableviewcontroller に戻り、ボタン (メディア プレーヤーの「NOW PLAYING」ボタンなど) を使用して、新しい文字列をプッシュせずにビューに戻る方法を知りたい..
ありがとうございました
コードから何を変更すればよいですか?
uitableviewcontrollerで..
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath {
selectedSong = [directoryContent objectAtIndex:indexPath.row];
NSString *storyLin = [[directoryContent objectAtIndex:[indexPath row]] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
patch = [NSString stringWithFormat:@"/%@", storyLin];
myDetViewCont = [[mPlayerViewController alloc] initWithNibName:@"mPlayerViewController" bundle:nil];
myDetViewCont.myProgLang = selectedSong; // assigning the correct value to the variable inside DetailViewController
[self.navigationController pushViewController:myDetViewCont animated:YES];
[myDetViewCont release]; // releasing controller from the memory
}
mPlayerViewController.m で
-(IBAction) backtoplayer{
myDetViewCont = [[mPlayerViewController alloc] initWithNibName:@"mPlayerViewController" bundle:nil];
}