Best way to use navigation controller for uipopoverview

I want to push to another view from a popoverview. For that purpose I had a taken navigation controller to that popover. And also its working fine.

The problem occurs in the second view. To allow the user to send an email i show a mail composer. But i am getting two navigation controllers.

Here is the code for the first popoverview:

SettingsVC *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SettingsVC"];
vc.delegate = self;
UINavigationController *naviCon = [[UINavigationController alloc]initWithRootViewController:vc];

self.settingsPopover = [[UIPopoverController alloc] initWithContentViewController:naviCon];

CGRect frame = CGRectMake(974.f, 36.f, 0, 0);

 self.settingsPopover.popoverContentSize = CGSizeMake(300, 250);
[self.settingsPopover presentPopoverFromRect:frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

Answers


When I needed something similar, I called the MFMailComposeViewController from the ViewController which calls the PopoverController (the parent ViewController) and also included the delegate ect in that ViewController. I defined a protocol in the ContentViewController of the PopoverViewController which informs the parent ViewController when it needs to call the MFMailComposeViewController. All worked perfectly without a problem... hope that helps


Need Your Help

DB2 & SQL Table Views

db2 sql-view

I am attempting to pull some information from a DB2 table to be inputted into an SQL view/ table. I have the AQT application and the Primary key is an account number in both the SQL and DB2 table. ...

how Create setAdapter() for a AlertDialog

android android-arrayadapter alertdialog

i create a CustomDialogBuilder which extends Dialog... i want to create the method setApater().. i create that section but the onClick method on the adapter is not working..

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.