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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:33:51+00:00 2026-06-11T21:33:51+00:00

I just got to start developing for ios 6 on xcode. But as a

  • 0

I just got to start developing for ios 6 on xcode.
But as a novice developer, i have come into a problem.
Following the guide in the book ‘beginning ios5 development: exploring the ios sdk’ on chapter 3, the ‘Button fun’ example.

I am having problems with the identifier ‘statusText’ which i have already declared in the .h code.

Here’s my code so far, any help would be highly appreciated. thank you in advance.

my BIDViewController.h is like so

#import <UIKit/UIKit.h>

@interface BIDViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *
statusText;
- (IBAction)buttonPress:(UIButton *)sender;

@end`

and my BIDViewController.m is like so

#import "BIDViewController.h"

 @interface BIDViewController ()

 @end

 @implementation BIDViewController

 - (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
 }

 - (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

 - (IBAction)buttonPress:(UIButton *)sender {
    NSString *title = [sender titleForState:<#(UIControlState)#>];
    statusText.text = [NSString stringWithFormat:@"%@ button pressed.", title];
}
@end

i have followed the book but can’t seem to understand why this occurs, pls help.

  • 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-06-11T21:33:52+00:00Added an answer on June 11, 2026 at 9:33 pm

    Well, for starters, this should be only one line

    @property (weak, nonatomic) IBOutlet UILabel *statusText;
    

    Now, when you declare a property, you don’t get a variable named like that unless you synthesize it like this:

    @implementation Class
    
    @synthesize propertyName;
    
    @end
    

    That’s why statusText doesn’t exist.

    You have three options:

    1. Synthesize statusText like that so you can use that ivar.
    2. instead of accessing the var directly, access the property like this self.statusText.
    3. XCode is creating it’s own variable, it’s probably named _statusText, access it like that to access the variable directly.

    You can also use a combination of 2 and 3

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

Sidebar

Related Questions

I just got a job offer to be a FE Developer, but I've never
I just got SQL Server 2008 Enterprise edition, but I can't start the Agent
I just got tomcat 7.0.27. I have kept the time to start tomcat 45sec.
i got the following problem: I am developing an app which requires the zxing-QR-Code
Just got the XCode 4.2 for iOS SDK 5.0 installed on Snow Leopard. Just
I just got an email from twitter saying my keys have now been enabled
I just got pagination to work on my site, but I wanted to use
I've run into an early problem with developing for android. I've made my own
I know many developers just do it like this: They start developing their app
I just got started today developing for Android. I tried to make an 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.