Quiero construir una aplicación para reproducir archivos de audio locales en el iPhone, pero estoy atascado con algunos de mis códigos. Me pregunto cómo se puede presionar una vista, volver al controlador de uitableview y usar un botón (como el botón "AHORA REPRODUCIENDO" en el reproductor multimedia) para volver a la vista sin introducir ningún hilo nuevo en ella ...¿Cómo presionar una vista, regresar y volver a la vista?
GRACIAS
¿Qué debería cambiar de mis códigos?
en el 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
}
en mPlayerViewController.m
-(IBAction) backtoplayer{
myDetViewCont = [[mPlayerViewController alloc] initWithNibName:@"mPlayerViewController" bundle:nil];
}
Amazing !!!! ¡GRACIAS a los dos! Pero, ¿cómo puedo evitar que se cree un nuevo mPlayerViewController cada vez que alguien hace clic en una fila (canción) en el controlador uitableviewController? '(void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { myDetViewCont = [[mPlayerViewController alloc] initWithNibName: @" mPlayerViewController "paquete: nil]; ' – Alby