How to dismiss presentmodelviewController with other presentmodelviewController
<p>I have a presentModelViewControler (A) which pops up when there is no network connectivity. Now i have a another presentModelViewController (B) which shows calendar. </p>

<p>Difficulty is when B is active i.e. shows calendar view then if internet goes down then A doesnot get active. </p>

<p>I want when B is active if A starts i.e. internet goes down, then it release B and pop up A.</p>

<pre><code>        CalendarTestViewController *clau=[[CalendarTestViewController alloc]init];



        if (clau.modalViewController==TRUE) {


            [clau dismissModalViewControllerAnimated:YES];
            [NSThread sleepForTimeInterval:0.2f];


        }




        [self.navigationController presentModalViewController:inter animated:YES];//network view controller

        [inter release];
</code></pre>

<p>}</p>
