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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:51:36+00:00 2026-05-14T03:51:36+00:00

I have a button in a view which refuses to work. I’ve got in

  • 0

I have a button in a view which refuses to work. I’ve got in working in a blank, default view application from X-Code, but in none of my applications will it work, instead it gives me the following error.

Terminating app due to uncaught
exception
‘NSInvalidArgumentException’, reason:
‘*** -[UIViewController showVicInfo:]:
unrecognized selector sent to instance
0x3c084f0’

The debugger isn’t any help either. I’ve made sure that I hook up the button to the file’s owner (not the other way around) as well. Below is the code for the action. And I know it’s not the alert view, because the breakpoint doesn’t even reach there.

about.h

    @interface about : UIViewController {

}

-(IBAction)showVicInfo:(id)sender;

about.m

-(IBAction)showVicInfo:(id)sender {
    UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@"You require an internet connection via WiFi or cellular network for iFirelert to work." delegate:self cancelButtonTitle:@"OK, thanks" otherButtonTitles:nil];
    [myAlert show];
    [myAlert release];
}

Update: FYI this is how I went about creating the button,if it helps.

  1. Created new view (File>New File>UIViewControllerSubclass w/XIB for interface)
  2. Added -(IBAction)showInfo:(id)sender; to about.h
  3. Added
  4. -(IBAction)showVicInfo:(id)sender {
    UIAlertView *myAlert = [[UIAlertView alloc]
    initWithTitle:@”No Internet
    Connection” message:@”You require an
    internet connection via WiFi or
    cellular network for iFirelert to
    work.” delegate:self
    cancelButtonTitle:@”OK, thanks”
    otherButtonTitles:nil];
    [myAlert show];
    [myAlert release];
    } to about.m
  5. Opened About.xib in Interface Builder, dragged a Rectangular Button onto the View
  6. Hooked up the button to the -showVicInfo action by ctrl-clicking the button to the File’s Owner property (not the other way around).
  7. Checked the File’s Owner was set to “about” class which it is.

And then built and run with failure in X-Code.

Update 2: OK, I’ve worked out it must be a setting or something in my existing project.I’ve copied the two class files and XIB file which does work in another X-Code project, but the button also throws the same error in the existing app.

  • 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-14T03:51:37+00:00Added an answer on May 14, 2026 at 3:51 am

    I think Squeegy is right, your VC is a plain old UIViewController and doesn’t accept showVicInfo.

    Did you set the class (command-4) for your ViewController in IB?

    Or if you are allocating it yourself, are you doing it like this:

    vc = [UIViewController alloc];    // wrong class
    

    when you should be doing this:

    vc = [about alloc];     
    

    The error message is telling you that showVicInfo was being sent to 0x3c084f0. Check the address of the view controller that you created (like the value in “vc” above), if it’s 0x3c084f0 that’s your answer. Of course the value may be different next time, but NSLog it when you create it and then compare it to the error message to know for sure what it is referring to.

    Check also that you have the button hooked up correctly in IB. If you select the button and go to the Button Connections tab you should have connections. For Touch Up Inside should connect to your action function, in your IB it should connect to showVicInfo:

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

Sidebar

Ask A Question

Stats

  • Questions 380k
  • Answers 380k
  • 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 Since you can't use a table parameter (not on SQL… May 14, 2026 at 9:56 pm
  • Editorial Team
    Editorial Team added an answer Ewww… don't put macros in a .pch file! A .pch… May 14, 2026 at 9:56 pm
  • Editorial Team
    Editorial Team added an answer The click should do an AJAX call that adds data… May 14, 2026 at 9:56 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

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.