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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:26:19+00:00 2026-06-10T10:26:19+00:00

So I have setup my UILabel, but when I set the text in my

  • 0

So I have setup my UILabel, but when I set the text in my game loop to a string that is the score (so the Text is reset every loop) my app crashes.

This is the error I get:

0x15560b0: cmpl (%eax), %ecx Thread 1

The Breakpoint says this:

EXC_BAD_ACCESS(code=1, address=0x67b30064

Here is how I am setting up my UILabel (in my init method) :

//SET UP THE SCORE LABEL HERE
scoreLabel = [[UILabel alloc] init];
scoreString = [NSString stringWithFormat:@"%d", score];
[scoreLabel setFont: [UIFont fontWithName: @"TimesNewRoman" size: 10.0f]];
[scoreLabel setFrame: CGRectMake(262, 250, 100, 40)];
[scoreLabel setBackgroundColor:[UIColor clearColor]];
[scoreLabel setTextColor: [UIColor clearColor]];
[scoreLabel setTextColor: [UIColor whiteColor]];
scoreLabel.transform = CGAffineTransformMakeRotation(89.53);
[self addSubview: scoreLabel];
//[scoreLabel setText: scoreString];

Thank You!

  • 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-10T10:26:20+00:00Added an answer on June 10, 2026 at 10:26 am
    //in your .h file
    UILabel *scoreLabel;
    NSString *scoreString;
    
    
    //in your .m file    
    //SET UP THE SCORE LABEL HERE 
    scoreLabel = [[UILabel alloc] init];
     [scoreLabel setFont: [UIFont fontWithName: @"TimesNewRoman" size: 10.0f]];
     [scoreLabel setFrame: CGRectMake(262, 250, 100, 40)];
     [scoreLabel setBackgroundColor:[UIColor clearColor]];
     [scoreLabel setTextColor: [UIColor clearColor]];
     [scoreLabel setTextColor: [UIColor whiteColor]];
     scoreLabel.transform = CGAffineTransformMakeRotation(89.53);
     [self addSubview: scoreLabel]; 
    
    
    //In your update method
     scoreString = [NSString stringWithFormat:@"%d", score];
    scoreLabel.text = scoreString;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have setup airbrake in my app but it doesn't seem to log any
I have a long text string (including \n newline characters) that I feed into
I have a simple UILabel setup and was receiving reports from some users that
I have setup an app project and a static project in a workspace in
I have setup some simple associations in my rails app: resources :properties do resources
My Setup: In my iPhone app, I have a loading View (which is an
I have a UITableView . In row I need to setup text, so I
I have a navController and tableViewController set up such that selecting a table row
I have UITableViewController. In cellForRowAtIndexPath method I added custom setup for label: UILabel *lblMainLabel
I have setup everything with the in-app email. I'm trying to gather the UITextField

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.