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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:47:19+00:00 2026-05-23T04:47:19+00:00

In my view controller I call with a reference to game, which is an

  • 0

In my view controller I call with a reference to game, which is an istance of Game class

score.text = [NSString stringWithFormat:@"%d", [game score]];

Game has this:

int score
@property (nonatomic, readwrite) int *score ;

son normally score has a getter.
Game.h is included in ViewController.h

Why do I get “unrecognized selector sent to instance”?

  • 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-23T04:47:19+00:00Added an answer on May 23, 2026 at 4:47 am

    Did you synthesize it in your implementation?

    @synthesize score;
    

    Also, you do not want a pointer to an int, but an int itself. Remove the ‘*’.

    Thirdly, I’m assuming score.text is setting the text for a UILabel or similar? And is different from Game’s score.

    Another check you can use is to make use of dot-notation. If the property is not properly set, you will get an error rather than a warning. I.e. game.score instead of [game score].

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

Sidebar

Related Questions

I have an Objective-C view controller class, from which I am trying to call
I am developing an application that currently has a View Controller (call it ViewControllerX).
In my view controller's -viewDidLoad method, I call [myTextField becomeFirstResponder]; This works like a
I have been trying to write a delegate to a view controller which has
I want to call a controller function from a view. Is that possible in
In asp.net mvc, you can easily call/add a controller from a view, but what
I have a Table View Controller with cells. I want to update the text
I am trying to call up a modal table view controller using presentModalViewController but
For reference, please visit this page here . When trying to get a view
I'm trying to create programatically a custom view controller with subviews which center on

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.