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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:22:06+00:00 2026-06-11T03:22:06+00:00

My app uses UIStepper controls in a few different views. I released a minor

  • 0

My app uses UIStepper controls in a few different views. I released a minor update to the app that shouldn’t affect these views at all, and I started getting reports that all the UISteppers in the app are now disabled. One user sent a screen shot, and the stepper control appears as if its enabled property were set to NO. However, there’s no place in my code where I set this property at all, and the default is YES. I’ve searched my app for instances of the term “enabled” to make sure I’m not somehow disabling it accidentally, and I’m not.

I thought perhaps the default value for the enabled property changed between iOS versions, but the users who have reported this are running iOS 5.1.1, the same as my development devices. And I only started hearing about the problem with this app update.

Besides setting the enabled property, I found that the steppers will be disabled if the min and max values are set to the same value. I’m pretty sure this is not happening in my app. The values are hard-coded and passed to a setup method, and I haven’t changed this code since many app versions ago.

Do you know any other reason why this would happen? I can’t reproduce the problem myself, and it only affects some users, so it’s difficult to troubleshoot.

Here’s my code for creating the UISteppers, for what it’s worth:

- (UIStepper *)makeStepperInput:(float )currentValue minValue:(float)minValue maxValue:(float)maxValue increment:(float)increment {
    int stepperWidth = 94;
    int stepperHeight = 27;
    CGRect stepperFrame = CGRectMake(0, 0, stepperWidth, stepperHeight);

    UIStepper *stepperInput = [[[UIStepper alloc] initWithFrame:stepperFrame] autorelease];
    stepperInput.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;

    [stepperInput setValue:currentValue];
    [stepperInput setMinimumValue:minValue];
    [stepperInput setMaximumValue:maxValue];
    [stepperInput setStepValue:stepValue];
    [stepperInput setContinuous:NO];

    NSLog(@"making stepper with values %f, %f, %f, %f (%i)", currentValue, minValue, maxValue, stepValue, stepperInput.enabled);

    [stepperInput addTarget:self action:@selector(onChange:) forControlEvents:UIControlEventValueChanged];

    return stepperInput;
}

UPDATE: I have a user who was willing to install a debug version with the NSLog line above. He sent me the console output and it shows that the min and max value of the stepper are correct (1 and 20 in one case) and that the enabled property is YES. Unfortunately, that eliminates both of my theories about what could be happening here…

  • 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-11T03:22:07+00:00Added an answer on June 11, 2026 at 3:22 am

    Okay, here’s what happened. The method posted above is a simplified version of my real method, which provides some branching for pre-iOS 5 devices. To help with pre-iOS 5 support, I was actually declaring stepperInput as a UIControl, and then returning something different on iOS versions that don’t support UIStepper.

    Now the interesting part. I rolled my project back and started looking at my build settings, and remembered that before my last release, Xcode gave me one of those alert messages about my build settings being out of date. I had clicked the button to allow Xcode to make all the recommended changes. This time, I performed one change at a time and tested my app after each change.

    The first of the recommended changes was to “Upgrade Compiler configuration to LVVM”. (“The compiler configuration is set to ‘com.apple.compilers.llvmgcc42’. This will upgrade to ‘Apple LLVM compiler 4.0’, which is the recommended setting for iOS targets.”) As soon as I made that change, the problem appeared on my test device. So it seems that the old compiler allowed me to set UIStepper properties on an object declared as a UIControl, while the new compiler did not. Indeed, when I changed my NSLog line above to output the actual values of the stepper, instead of the values passed into the method, they all returned 0. Having its min and max values both set to 0 is what made the stepper appear to be disabled.

    I didn’t think this affected all users because I couldn’t reproduce it, but I was testing with the older build settings rather than the build settings used for the release. So now I’m thinking that this probably does affect all users, and only some users have noticed it.

    Anyway, the solution is to reorganize my code so I can declare that UIStepper as a real UIStepper, since the newer compiler doesn’t allow the kind of fudging I was doing before.

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

Sidebar

Related Questions

My app uses a method that was deprecated since Android 2.1 with a different
My app uses Handler and sendEmptyMessageDelayed to get timed messages that produce debug output.
Our app uses a component that requires a license file in the directory with
My app uses javascript to generate all the HTML for my website. The index.html
My app uses Mochiweb. I have noticed that Mochiweb files reside in the myapp/deps/mochiweb
My app uses NSTimer and it appears that NSTimer doesn't fire when the iPhone
My app uses two databases (separate files). To handle these databases I have created
My app uses monetary values, and I would like to represent these values in
My app uses a lot of AsyncTasks. It is a web app after all.
My app uses the TelephonyManager.ACTION_PHONE_STATE_CHANGED for some actions. But I want a different action

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.