viewcontroller wont dismiss
<p>I have the following code</p>

<pre><code>- (void) viewWillAppear:(BOOL)animated
{
   NSLog(@"dismiss view");
   [self dismissModalViewControllerAnimated:YES];
}
</code></pre>

<p>This prints dismiss view but wont execute the view dismissal code.</p>

<p>Can a view be dismissed in code without a trigger from an IBAction?</p>

<p>Why wouldnt this be executing?</p>
