Opening UIImagePickerController from within modal view controler
<p>I am trying to present a image selector to my user while they are on a view presented as modal view. </p>

<p>I am building the view in a table view app.  Right now the code runs but does not open the ImagePicker.  </p>

<p>In DetailTableViewController.m</p>

<pre><code>@implementation DetailTableViewController
</code></pre>

<p>There is an (+) button in the nav and when it is clicked I call</p>

<pre><code>- (void)add
{
  DetailTableViewController *controller = [[DetailTableViewController alloc]
                                  initWithStyle:UITableViewStyleGrouped];    

UINavigationController *newNavController = [[UINavigationController alloc]
                                            initWithRootViewController:controller];
newNavController.delegate = self;

[[self navigationController] presentModalViewController:newNavController
                                               animated:YES];

DetailTableViewController *controller2 = [[DetailTableViewController alloc]
                                         initWithStyle:UITableViewStyleGrouped];    
imgPicker = [[UIImagePickerController alloc]
                                      initWithRootViewController:controller2];
imgPicker.allowsEditing = YES;
imgPicker.delegate = self;      

//______________HERE I CREATE THE INTERFACE FOR THIS VIEW IN CODE__________________

    NSLog(@"Load add View");
 }
</code></pre>

<p>One of the button on this page is a select image button which is here:</p>

<pre><code>   - (IBAction)grabImage {
        [newNavController pushViewController:imgPicker animated:YES];
    NSLog(@"grabImage");
    }
</code></pre>

<p>This does not present the imgPicker view.  But the button click is logged.</p>

<p>I have in the top of file:  DetailTableViewController.m</p>

<pre><code>@implementation DetailTableViewController

@synthesize imgPicker;
</code></pre>

<p>In DetailTableViewController.h</p>

<pre><code> @interface DetailTableViewController : UITableViewController &lt;UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextViewDelegate&gt; {
    MWFeedItem *item;
    NSString *dateString, *summaryString;
    IBOutlet UIWebView *webview;
    IBOutlet UIButton *dismissViewButton;
    UIImagePickerController *imgPicker;
    UINavigationController *newNavController;
    IBOutlet UIButton *upload;
    IBOutlet UIButton *doneEdit;
    IBOutlet UIImageView *image;
}
</code></pre>

<p>How can I make the imgPicker display?
I have tried:</p>

<ul>
<li>using presentModalViewController instead of push in grabImage </li>
<li>List item many combinations of which controller imgPicker is presented to.  With some
I get the error:  (Application tried to present a nil modal view controller on target)       </li>
<li>several variations from this question:<br>
<a href="http://stackoverflow.com/questions/2108153/iphone-modal-view-inside-another-modal-view">iPhone modal view inside another modal view?</a></li>
</ul>

<p>UPDATED including corrections from @aBitObvious, but the issue remains.</p>
