Pregunta

Mi aplicación abre una pantalla de visualización de uitable cuando el usuario hace clic en un botón de configuración. No puedo averiguar cómo conectar la solicitud para desestimar la acción.

¿Cómo descarto esta vista dentro de uitableview?

Configuración de la vista:

SettingsController *rootViewController = [[SettingsController alloc]
  initWithStyle:UITableViewStyleGrouped];
UINavigationController *navigationController = [[UINavigationController alloc] 
  initWithRootViewController:rootViewController];
settingsView = navigationController.view;
settingsView.frame = 
  CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[self.view insertSubview:settingsView atIndex:0];   

Trayendo vista al frente:

- (IBAction)settingsPressed:(id)sender{
[self.view bringSubviewToFront:settingsView];
}

Colocando la vista en la parte posterior:

- (void)QuitSettings {
[self.view sendSubviewToBack:settingsView];
}

Capturar " retorno " botón de hacer clic en SettingsController:

- (void) action:(id) sender{
//[super.view sendSubviewToBack:holdingView];   
// access error [self release];
// nothing [holdingView removeFromSuperview];
// access error [super QuitSettings];
 }
¿Fue útil?

Solución

Parece que desea utilizar una vista modal en lugar de insertar una subvista en un índice particular.

Deberías usar

[self presentModalViewController:myTableViewController animated:YES];

donde self es el controlador de vista que realizará la llamada para abrir la vista de tabla.

Luego puede adjuntar un botón o acción en algún lugar del controlador de vista de tabla que llamará

[self.parentViewController dismissModalViewControllerAnimated:YES];

para descartar el controlador de vista de tabla.

Otros consejos

¿No funciona esto?

[settingsView removeFromSuperView]
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top