0

I have an issue with presenting/dismissing viewControllers on iOS

Lets say i have an UIViewController *A and inside it a add a subview lets say UIViewController *mySubview this goes well as i can have N subviews dynamically within my first view...

Then lets say mySubview it's a UITableVIew so when user select´s a cell it present another View let´s call it UIViewController *C and that goes OK too, the problem is when i want to dismiss C i expected the iPhone to display the A UIViewController with de B subview inside it but instead i get the iPhone fully displaying the subview and not the A UIViewController

So this is the code that the subview is executing when some cell it´s clicked

cuest=[[CuestionarioViewController alloc]initWithNibName:@"Cuestionario" bundle:nil];
cuest.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;                          [self presentModalViewController:cuest animated:YES];

and on the UIViewController C this is what dismiss it:

[self dismissViewControllerAnimated:YES completion:nil];

I want to come with a solution not involving resizing the frame again or so.

Any help would be appreciated!

Thanks a lot!

Scott
  • 21,211
  • 8
  • 65
  • 72
  • Well maybe if i present the UIViewController *C from the controller *A it would work, but for that i may use a delegate that notify the cell clicked from the subview to the view A – user1852154 Jul 27 '13 at 22:22

1 Answers1

0

Yes, as i posted on my comments delegations worked like a charm, thanks a lot anyway.