title: In Modal View, DismissViewControllerAnimated After PresentViewController Not Working
body: <p>I come across this issue while doing some testing. I have presented a Modal view, called ModalView1. In ModalView1, when a button is pressed, another Modal view, called ModalView2 would be presented using <code>presentViewController</code>. Then I tried dismissing ModalView2 using <code>dismissViewControllerAnimated</code> but it is not working. <br/>
  Here is the code fragment in button action</p>
  
  <pre><code>- (void) buttonAction: (UIButton*) sender
  {
      ModalView *ModalView2 = [[ModalView alloc] init];
      [self presentViewController:ModalView2 animated:YES completion:nil];
      [self dismissViewControllerAnimated:YES completion:nil];
  }
  </code></pre>
  
  <p>Any help would be much appreciated. Thank you. </p>