Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:34:11+00:00 2026-06-18T03:34:11+00:00

I have a MainController and detailedcontroller. When I popover the Book selection and select

  • 0

I have a MainController and detailedcontroller. When I popover the Book selection and select a Book, the detailcontroller display an UIWebView with the book articles :

@interface IpadBooksViewController : UITableViewController {
    SearchResult                *searchResult;
    IpadArticleViewController   *detailController;
    IpadMainViewController      *mainController;
    UIPopoverController         *popover;
}

Into the UIWebView, I display an Email icon and catch the scheme :

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{

    NSURL *url          = [request URL];
    NSString *scheme    = [url scheme];
    NSString *host      = [url host];

    if ([[url description] hasSuffix:@"next"]) {
        NSLog(@"next Show");
    }

    BOOL isShareLinks       = [host isEqualToString:@"displayShareLinks"];
    BOOL isFavoriteLinks    = [host isEqualToString:@"displayFavoriteLinks"];

    if ([@"myappurl" isEqualToString:scheme] && (isShareLinks || isFavoriteLinks)) {        

        self.selectedArticleNumber  = [url.path lastPathComponent];

        if (isShareLinks) {                     
            [self sendMailArticleNumber:selectedArticleNumber];

        } else if (isFavoriteLinks) {
            NSLog(@"ipad favorite clicked");
            [self toggleFavorite:selectedArticleNumber];

            Broker *broker = [[Broker alloc] init];
            [broker loadProjects:self];
            [broker release];            
        }
    }

    return [super webView:webView shouldStartLoadWithRequest:request navigationType:navigationType];

}

Action is supposed to display the MFMailController under my UIWebView, but nothing is displayed without error message :

- (void) sendMailArticleNumber:(NSString *)articleNumber {
    MFMailComposeViewController* composer = [[MFMailComposeViewController alloc] init];
    composer.mailComposeDelegate = self;
    [composer setSubject:@"Article"];

    NSString *messageBody = [Article fetchBody:articleNumber bookId:bookId];

    [composer setMessageBody:messageBody isHTML:YES];   
    [self presentModalViewController:composer animated:YES];

    [composer release];     
}

Any help will be welcomed. I did try creating a popover, addView atIndex without success … Let me know if you need more code.

David

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:34:12+00:00Added an answer on June 18, 2026 at 3:34 am

    I did solve the issue by loading the controller into the delegate as following :

        [((PublilexAppDelegate*)[[UIApplication sharedApplication] delegate]) sendMailArticleNumber:selectedArticleNumber bookId:self.bookId];
    

    And then into the Delegate :

    - (void) sendMailArticleNumber:(NSString *)articleNumber bookId:(NSString*)bookId {
        MFMailComposeViewController* composer = [[MFMailComposeViewController alloc] init];
        composer.mailComposeDelegate = self;
        [composer setSubject:@"Article"];
    
        NSString *messageBody = [Article fetchBody:articleNumber bookId:bookId];
    
        [composer setMessageBody:messageBody isHTML:YES];
        [self->navigationController presentModalViewController:composer animated:YES];
    
        [composer release];
    }
    

    And to dismiss and comeback to the previous view :

    -(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {
    
        [self->navigationController dismissModalViewControllerAnimated:YES];
    
        //    [self dismissViewControllerAnimated:YES completion:nil];
    
        //    [((PublilexAppDelegate*)[[UIApplication sharedApplication] delegate]) navigateToIpadMain];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Simple java program named MainController.java. Wehn I try to compile it from
Here's my app design. I have mainController which presents secondViewController . Now, I want
i have this class MainController { def test = { def day1 =1 def
I have a main controller header with a color declaration MainViewController.h @interface MainViewController :
I have a simple user application. I have a MainController Servlet that will be
On my controller I have it inherit a MainController and there I override the
Actually, this is my problem. I have a rails app with a MainController, a
I have a MainController, it creates an object(say polygon), a controller(say,polygonViewController). PolygonViewController has two
I have a mainController that can rotate to portrait and landscape mode. I have
I have multiple ActionLinks defined in the Index View of my MainController. Html.ActionLink(admin,controller =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.