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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:35:40+00:00 2026-05-23T09:35:40+00:00

I have tried and got SIGBRT exception. In Global.m , I have methodBGlobal() .

  • 0

I have tried and got “SIGBRT” exception.
In Global.m, I have methodBGlobal().

In ClassA, I included Global.h in order to use methodGlobal().
ClassA.methodA() has methodGlobal() in it.

Then I have button in Global.m. Since I do not know how to call methodGlobal() properly in Global.m. SO I call the methodGlobal() through ClassA instance.

[mybutton addTarget:ClassA instance action:@selector(methodA:) ...];

It does not work. I got “SIGBRT” exception and I do not know that methodGlobal() in ClassA.methodA() was called or not? I want methodGlobal to work.

  • 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-23T09:35:41+00:00Added an answer on May 23, 2026 at 9:35 am

    Two things you need to consider here.

    1. If the method is a class method, then the target should be [ClassA class].
    2. If the method signature doesn’t include any arguments , for ex., -(void) methodA; then, there should be not colon(“:”) included in the @selector. So, the selector should be just @selector(methodA).

    Finally the addTarget: method should look like,

    [mybutton addTarget:[ClassA class] action:@selector(methodA) ...];
    

    References:

    1. Target-Action from Cocoa Application Competencies for iOS.
    2. The Target-Action Mechanism from Cocoa Fundamentals Guide.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried: use information_schema update referential_constraints set delete_rule='cascade'; but got the following error:
i have tried the table view sample with the viewcontroller.when im running i got
I have tried to ask a variant of this question before. I got some
I have got a file containing a large amount of numbers. I have tried
I have tried this <?php print_r(apache_get_modules()); ?> and got this Fatal error: Call to
I have got some code from my client. I have tried to build that
I have tried searching for it online, but I got confused. I didn't get
So I got a problem looks like with string conversion. I have tried everything
I have tried googling it but didn't got the exact answer as required. I
I have tried to perform nested loop in the XSL file but got stuck

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.