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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:01:15+00:00 2026-05-24T02:01:15+00:00

I am trying to implement a UISlider that has a minimum of 1 and

  • 0

I am trying to implement a UISlider that has a minimum of 1 and a maximum of 10. I set up an IBOutlet for the slider and an IBAction for when the slider’s value changes. Here is my code:

//scale is the slider, and scaleValue is a label that displays the slider's value.
- (IBAction)scaleChanged
{
    scaleValue.text = [NSString stringWithFormat:@"%d", scale.value];
    NSLog(scaleValue.text);
}

The problem is what NSLog gives me:

[Session started at 2011-07-25 20:36:22 -0700.]
2011-07-25 20:36:25.626 LineModel[1672:207] 0
2011-07-25 20:36:25.861 LineModel[1672:207] 0
2011-07-25 20:36:25.877 LineModel[1672:207] 0
2011-07-25 20:36:25.894 LineModel[1672:207] -536870912
2011-07-25 20:36:25.911 LineModel[1672:207] -536870912
2011-07-25 20:36:25.928 LineModel[1672:207] -1073741824
2011-07-25 20:36:25.944 LineModel[1672:207] 1610612736
2011-07-25 20:36:25.961 LineModel[1672:207] 1073741824
2011-07-25 20:36:25.978 LineModel[1672:207] 1073741824
2011-07-25 20:36:25.994 LineModel[1672:207] 1073741824
2011-07-25 20:36:26.011 LineModel[1672:207] 1073741824
2011-07-25 20:36:26.028 LineModel[1672:207] -2147483648
2011-07-25 20:36:26.044 LineModel[1672:207] 0
2011-07-25 20:36:26.061 LineModel[1672:207] -2147483648

You get the idea. Now, I know the slider’s value is a float and not an integer, but the strange thing is that it was actually working fine before, when I had the maximum set instead at 50. Now, though, even if I set the maximum back to 50, it still prints this out. What is going on?

  • 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-24T02:01:15+00:00Added an answer on May 24, 2026 at 2:01 am

    your NSLog is not following the right syntax, write like this

     NSLog(@"%@",scaleValue.text);
    

    instead NSLog(scaleValue.text);

    Try this

    - (IBAction)scaleChanged
    {
        scaleValue.text = [NSString stringWithFormat:@"%.2f", scale.value];
        NSLog(scaleValue.text);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

SetFocus I'm trying implement the above Se Focus code in a Class Library that
when trying to implement an Aspect, that is responsible for catching and logging a
It is ok to set the max & min value for a UISlider control
Found a really nice code for Accordion nav and am trying implement on our
Trying to implement the decorator pattern in C# from the code in the Head
Trying to implement some nested loops that are spitting out good old nested html
Trying to implement the excellent jQuery bidirectional infite scroll as explained here: http://www.bennadel.com/blog/1803-Creating-A-Bidirectional-Infinite-Scroll-Page-With-jQuery-And-ColdFusion.htm For
Trying to implement a function that will return a list of ints the represent
Trying to implement this gallery on my website. http://coffeescripter.com/code/ad-gallery/ It is noted in the
I am trying to implement JQ UIslider - but I keep running into problems,

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.