iPhone: Use apple sample code AVCam to open new view controller after capturing video
<p>I am using the apple sample code AVCam for capturing video</p>

<p>But i want to navigate to another view after pressing stop capturing video button</p>

<p>But i am unable to do this </p>

<p>Please suggest me the proper way to do this task</p>

<p>I am doing the follwing coding in  AVCam sample code method</p>

<pre><code>- (void)captureManagerRecordingFinished:(AVCamCaptureManager *)captureManager
{
    CFRunLoopPerformBlock(CFRunLoopGetMain(), kCFRunLoopCommonModes, ^(void) 
    {

        [[self recordButton] setTitle:@"Record"];
        [[self recordButton] setEnabled:YES];

    });

    [self dismissModalViewControllerAnimated:YES];

    NextViewController *test=[[NextViewController alloc]init];
    [self.navigationController pushViewController:test animated:YES];

}
</code></pre>

<p>Please tell me where i am going wrong or any other way to do this task</p>
