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

  • SEARCH
  • Home
  • 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 7065183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:55:32+00:00 2026-05-28T04:55:32+00:00

When clicks on done button application crashes and gives message that program received signal

  • 0

When clicks on done button application crashes and gives message that program received signal SIGABRT.

In the ModalViewController.h delegated protocol and method

@protocol ModalViewDelegate <NSObject>

-(void) dismissModalView:(UIViewController *) viewController;

@end

@interface Infoviewcontroller : UIViewController <ModalViewDelegate>

{
    id<ModalViewDelegate> dismissDelegate;
}

@property (nonatomic, retain) id<ModalViewDelegate> dismissDelegate;

@end

In modalviewcontroller. m file

@synthesize dismissDelegate;

-(void) dismissModalView:(UIViewController *) viewController;
{

   [self dismissModalViewControllerAnimated:YES];

}
@end

In done button definition

UIButton* backButton = [UIButton buttonWithType:101]; 
[backButton addTarget:self action:@selector(dismissView:) forControlEvents:UIControlEventTouchUpInside];
[backButton setTitle:@"Done" forState:UIControlStateNormal];

// create button item
UIBarButtonItem* backItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];

// add the button to navigation bar
self.navigationItem.leftBarButtonItem = backItem;
[backItem release];


-(void) dismissView: (id)sender

{
    [UIViewController dismissDelegate];
}

When clicks on done button application crashes and gives message that program received signal SIGABRT. So i think i m doing something wrong in dismissView method of done button that is why it gives message that UIViewController dismissDelegate unrecognized selector

Help will be appreciated.

Thanks

  • 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-28T04:55:32+00:00Added an answer on May 28, 2026 at 4:55 am

    You’re calling a class method on UIViewController which doesn’t exist (dismissDelegate – which you’ve defined as a property of Infoviewcontroller).

    I think you’re somewhat confused with the use of the ModalViewDelegate, let me try to explain…

    In the Apple View Controller Programming Guide, the recommendation is that the ViewController that presents the modal controller is responsible for dismissing it. Therefore you need a way for the modal controller to talk to the presenting controller.

    So… Your presenting controller should conform to your ModalViewDelegate protocol ( not your modal controller as you have here).

    When you present the modal view controller, you set its delegate to self (self being the presenting view controller).

    Your dismissView method should then be:

    -(void) dismissView: (id)sender
    {
        [self.dismissDelegate dismissModalView:self];
    }
    

    Actually, you probably don’t even need to pass the UIViewController parameter to the delegate as you won’t end up using it.

    Finally, your dismissDelegate property really should not be retained, it should be assigned instead (otherwise you end up with a circular retain relationship).

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

Sidebar

Related Questions

I'm using C# .NET. Its a GUI application. When user clicks a button work
I have application I want a button to open another screen with done button
It's 5 button clicks to get eclipse to create a deployable war file for
When a user clicks a submit button I want the form to be submitted.
When the user clicks a button, I want his browser to automatically scroll to
When a user clicks on a button or link, I use the SimpleModal jQuery
I have an aspx page that on a button click creates a BackgroundWorker and
I'm using Mathjax to display equations in a web application done in PHP/Ajax. The
I am building an application that has the functionality like 3 tabs created using
I'm currently working with a part of my application that uses Dynamic Web User

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.