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

Related Questions

Is Protocol Buffer for .NET gonna be lightweight/faster than Remoting(the SerializationFormat.Binary)? Will there be
For general protocol message exchange, which can tolerate some packet loss. How much more
I have a protocol that requires a length field up to 32-bits, and it
Is Google's Protocol Buffers used in large scale production applications in production? What is
I'm reading some MPEG Transport Stream protocol over UDP and it has some funky
Is there something like the Python descriptor protocol implemented in other languages? It seems
From my understanding the XMPP protocol is based on an always-on connection where you
I asked here about a protocol that I was asked to implement, and how
I am trying to create a delegate protocol for a custom UIView. Here is
I'm looking for a simple protocol to control remote processes from one managing application.

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.