My question is similar to: iPhone modal view inside another modal view? and Can I push a modal view controller from within another modal view controller?, however there is one difference:
None of my controllers are UINavigationControllers (i think thats what they are called).
So basically I have this:
RootView (variety of options such as submit expense, check calendar, etc) --> submit expense chosen and the following code is called:
EXP = [[ExpensesViewController alloc] initWithNibName:@"ExpensesViewController" bundle:nil];
[self presentModalViewController:EXP animated:YES];
So now there is one modalview on top of the main view. Then within the expense modal view, I'd like to be able to choose a button that opens a modal view (in similar code)...
I understand from the two questions in my intro above that to do this basically it looks like this:
[controllerA presentModalViewController:Number2 animated:YES];
Could it look like this instead:
[self.view presentModalViewController:Number2 animated:YES];
because I don't know how to reference the viewcontroller without creating a new instance of it.
Also, when it comes time to dismiss the second one so I can return to the first modal view (basically I open a modalview to submit an expense and then as part of the form, they must select a choice -- for UI purposes a new modalview is the best. Once they decide on a choice, they return to the expense view by closing the extra detail modal view, to submit the expense and once they do, then that modal view closes).
So instead of using:
[self dismissModalViewControllerAnimated:YES];
would it be:
[self.view dismissModalViewControllerAnimated:YES];
??
Thanks guys:)