views:

121

answers:

2

I am creating a modal view which is opened using the following code

[[self navigationController] presentModalViewController:registrationController animated:NO];

And until recently the following code was used to hide it on a button press

[self dismissModalViewControllerAnimated:YES];

However for some reason that line is no longer removing the view and no errors are presented.

I have also tried

[self.view removeFromSuperView];

But that just leaves me with a completely white screen

Any suggestions on how I go about debugging this issue will be great as Im stumped

+2  A: 

Assuming your controller is a subclass of UIViewController, then inside the modal view controller:

[self.parentViewController dismissModalViewControllerAnimated:YES];
freespace
unfortunately that has made no difference either, it just doesnt want to remove from the stack :(
tigermain
+1  A: 

I worked out the problem I was updating the Navigation Controller after loading the modal in order to change the style, changing the order solved the problem

tigermain
Since I didn't solve your problem, you should unaccept my answer, and accept your own.
freespace
actually yours is a valid answer to the question, but my situation is not completely outlined in the question so I feel yours is more appropriate, thanks for the honesty though
tigermain
re: honesty: one has to sleep at night :)
freespace