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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:32:50+00:00 2026-05-13T20:32:50+00:00

my protocol: @protocol ElectricalSystemEngineDelegate -(void)didRequestMainMenu:(id)sender; @end I designed this protocol in order to handle

  • 0

my protocol:

@protocol ElectricalSystemEngineDelegate
-(void)didRequestMainMenu:(id)sender;
@end

I designed this protocol in order to handle dismissal of a modal View Controller inside my rootView controller. My rootView controller adopts this protocol and is declared as follows:

#import "ElectricalSystemEngineDelegate.h"

@interface RootViewController: UIViewController <ElectricalSystemEngineDelegate>
//other ivars & methods including instantiation of my modalViewController.

I use an out-of-the-box:

-(IBAction)displayElectricalViewController

-to display the modal controller… which works fine. I am, however, confused on how to proceed further with the implementation of this protocol to handle dismissal of the controller..

//The implementation of my root view controller.
-(void)didRequestMainMenu:(id)sender {
    [self dismissModalViewControllerAnimated: YES];
}

Obviously, I correctly implemented the protocol by using the prescribed method. I want the method to dismiss my view controller when called. I also want it to be called by the tapping of a back button in the modalViewController.

As the apple docs say, “In some cases, an object might be willing to notify other objects of its actions so that they can take whatever collateral measures might be required.” My goal is for my ElecticalViewController to notify its parent (the RootViewController) that it should be dismissed. That dismissal should be triggered by tapping the back button. How does the object accomplish this notification?

  • 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-05-13T20:32:51+00:00Added an answer on May 13, 2026 at 8:32 pm

    You need to add id <ElectricalSystemEngineDelegate> delegate property to your ElectricalViewController.

    Then you need to assign self (RootViewController) to that delegate after you created ElectricalViewController.

    Then you call [delegate didRequestMainMenu] when you dispose ElectricalViewController.

    Then you need to create a method didRequestMainMenu to your RootViewController.

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

Sidebar

Ask A Question

Stats

  • Questions 522k
  • Answers 522k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In Firefox, the current document is accessible in JavaScript by… May 16, 2026 at 9:26 pm
  • Editorial Team
    Editorial Team added an answer Since you're already using MySQL, why don't you select only… May 16, 2026 at 9:26 pm
  • Editorial Team
    Editorial Team added an answer I'd start with something like set long 100000 select dbms_metadata.get_ddl('TABLE',… May 16, 2026 at 9:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

@protocol MyViewDelegate <NSObject> - (void) didFinishProcessing:(MyView*)myView; //compiler stops here with error @end @interface MyView
@protocol Eating @end @interface Eat : NSObject<Eating> { } - (id<Eating> *)me; @end @implementation
@protocol Runnable - (id<Runnable>) works; //this compiles fine - (Runnable *) broke; // get
In the NSObject protocol, it defines a method that is similar to this: -(Class)
I use the protocol jsonp to call web methods. I use this code for
Is Protocol Buffer for .NET gonna be lightweight/faster than Remoting(the SerializationFormat.Binary)? Will there be
In protocol buffers is there a way to have a message with collection of
What protocol definition do you recommend? I evaluated Google's protocol buffers, but it does
What protocol should I use to secure a webservice. I'm considering CHAP, but I
For general protocol message exchange, which can tolerate some packet loss. How much more

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.