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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:46:47+00:00 2026-05-13T17:46:47+00:00

Im trying to do something that I think is super simple. i have 3

  • 0

Im trying to do something that I think is super simple.

i have 3 integers – prevgues1 , 2 and 3

and i have 3 UILabels prevguess1, 2 and 3

the ints have 1 less s.

When I set the text of the label so

prevguess1.text = [NSString stringWithFormat:@"%d", prevguess1]
prevguess2.text = [NSString stringWithFormat:@"%d", prevguess2];
prevguess3.text = [NSString stringWithFormat:@"%d", prevguess3];

the label just set to a number like 89324 or something like that.

I just don’t know what my problem is.

Any ideas would be helpful

Cheers

Sam

Note:

I have tried setting the text simply to a string – and have had luck.
but when i set it to a integer, which start as 0 value, (in viewdidload) the weirdness happens

  • 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-13T17:46:48+00:00Added an answer on May 13, 2026 at 5:46 pm
    prevguess1.text = [NSString stringWithFormat:@"%d", prevguess1];
    

    Here you treat prevguess1 as a label and as an integer – probably there’s a typo somewhere?

    Even if it’s not a matter of your problems I think you should consider changing the way you name your variables a bit to avoid possible confusion.

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

Sidebar

Related Questions

I am trying to accomplish something that seemed quite simple... I have 3 div
I'm trying to do something that gets a cs file in runtime from user
I'm trying to write something that puts the contents of the message on a
I am trying to write my first real python function that does something real.
I'm trying to create a user control that allows users to make something like
I am trying to define a WCF contract that returns an interface, something like
I am new to mysqli, and trying to confirm that if I so something
I am trying something very simple, but for some reason it does not work.
I'm trying something like this Output.py print Hello Input.py greeting = raw_input(Give me the
All I am currently trying implement something along the lines of dim l_stuff as

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.