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 9011865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:51:16+00:00 2026-06-16T02:51:16+00:00

My ipad project is master-detail view based. There is a button on detail view’s

  • 0

My ipad project is master-detail view based. There is a button on detail view’s toolbar, when user tap on the button, it popup a popover view to show four buttons (as menu). Three of buttons’ actions are like the following (the three buttons show three different model form sheets):

- (void) showOnlineSgf
{
    NSLog(@"showOnlineSgf");
    TGOOnlineSgfViewController *dlg =
    [[TGOOnlineSgfViewController alloc] initWithNibName:@"TGOOnlineSgfViewController"
                                                 bundle:nil];
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:dlg];

    [nav setModalPresentationStyle:UIModalPresentationFormSheet];
    [self presentViewController:nav animated:YES completion:nil];
    dlg = nil;
    nav = nil;
}

The other button’s action is to show a MFMailComposeViewController. Code is like the following:

- (void) emailCurrentGame
{
    NSLog(@"email current game");
    MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
    picker.mailComposeDelegate = self;
    [self presentModalViewController:picker animated:YES];
    picker = nil;
}

The weird behavior is that when I tap the button what should execute showOnlineSgf(), but emailCurrentGame() is actually executed. When I set a breakpoint in showOnlineSgf(), it’s hit, and step by step, each statement in showOnlineSgf() is executed. But the result on screen is a MFMainComposeViewController shows up.

I know this question is hard to answer. Any idea is appreciated.

  • 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-16T02:51:17+00:00Added an answer on June 16, 2026 at 2:51 am

    Check your outlet connection of your UIButton that triggers showOnlineSgf. Most likely you copy pasted your UIButton in Interface Builder, which causes it to copy its assigned action as well. Then you’ve connected your other action, resulting in your UIButton having two actions.

    To resolve the problem, simply disconnect your UIButton that triggers showOnlineSgf from the emailCurrentGame action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an OpenGL-based iPad project. In one view I have objects being rendered
After creating an Xcode project from the iPad master/detail storyboard template, I cannot seem
I created a project using the master detail application template. The project is targeted
I have taken a project based on the standard iPad SplitViewerController template and implemented
I have an iPad project structured as: - AppDelegate - MainWindow - View Controller
I'm working on an iPad project, currently it's on Landscape view. And I tried
Using Xcode 4.2.1 iPad iOS 5.0.1, create a new Single View iPad project. In
I have started a new Storyboard (iPad) based XCode project that should have a
In my iPad application, on a single view there is one text field, 2
I have an XCode iPad project using a navigation controller. I tried to get

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.