Me veo en la necesidad de acceder a viewcontroller desde su vista.
Aquí está el método
-(void)changePageView:(UIViewController*)newviewcont withtransitiontype:(int)t andtransitionspeed:(int)s
{
//Remove whatever view is currently loaded at index 0, this index is only to be used by page views
UIView *oldview = [self.view.subviews objectAtIndex:0];
[UIView beginAnimations:@View Flip context:nil];
[UIView setAnimationDuration:s];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
[newviewcont viewWillAppear:YES];
//[oldview viewWillDisappear:YES];
[oldview removeFromSuperview];
[self.view insertSubview:newviewcont.view atIndex:0];
//[oldview viewDidDisappear:YES];
[newviewcont viewDidAppear:YES];
}
Básicamente, estoy tratando de escribir un método genérico de cambio de vista que es llamado por el controlador raíz para intercambiar vistas de subviewcontorllers desde la vista de controladores raíz.
Paso en un controlador de subvista y puedo eliminar la subvista actual. Pero para hacer una animación de conmutación de visualización adecuada necesito acceder al controlador de vista de vistas actual. ¿Es este el enfoque equivocado y se puede hacer?













