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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:49:54+00:00 2026-05-27T07:49:54+00:00

im trying to add a UIStepper programmatically, HEre is my code: the stepper wont

  • 0

im trying to add a UIStepper programmatically, HEre is my code: the stepper wont show up. :

     stepper =  [[UIStepper alloc]init];
     [stepper setFrame:CGRectMake(216, 91, 155, 25)];
     [stepper setMinimumValue:0];
     [cell addSubview:stepper];

Thank you!

CELLFORROWATINDEXPATH:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";

    cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
     {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];

         UIStepper * myStepper =  [[UIStepper alloc]initWithFrame:CGRectMake(206,20,94,27)];
         [myStepper setMinimumValue:0];
         [cell addSubview:myStepper];

         cellLabel = [[UILabel alloc]init];
         [cellLabel setFrame:CGRectMake(65, 22, 27, 27)];
         [cellLabel setText:@"1"];
         [cell.contentView addSubview:cellLabel];
    } 
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    cell.imageView.image = [imageArray objectAtIndex:indexPath.row];    
   // cell.textLabel.text = [cells objectAtIndex:indexPath.row];
    if ([cell.imageView.image  isEqual:[UIImage imageNamed:@"paddle5.png"]]) {
        [cellLabel setFrame:CGRectMake (175, 22, 30, 30)];
    }
    if ([cell.imageView.image  isEqual:[UIImage imageNamed:@"paddle4.png"]]) {
        [cellLabel setFrame:CGRectMake (150, 22, 30, 30)];
    }
    if ([cell.imageView.image  isEqual:[UIImage imageNamed:@"paddle3.png"]]) {
        [cellLabel setFrame:CGRectMake (120, 22, 30, 30)];
    }
    if ([cell.imageView.image  isEqual:[UIImage imageNamed:@"paddle2.png"]]) {
        [cellLabel setFrame:CGRectMake (90, 22, 30, 30)];
    }
return cell;
}

the if statements right above return cell; is just to position a few labels i have on the cell.

  • 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-27T07:49:55+00:00Added an answer on May 27, 2026 at 7:49 am
    [cell.contentView addSubview:stepper];
    

    EDIT:
    In your code, you have:

     [stepper setFrame:CGRectMake(216, 91, 155, 25)];
    

    Yet you claim that your cell is 73px tall and 320px wide.

    Currently, you are setting the stepper to be 155px wide, 25px tall, at an x origin of 216 and a y origin of 91.

    The stepper, appearing at y of 91 is outside of the view of the cell.

    Try this:

    [stepper setFrame:CGRectMake(216, 22, 100, 30)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I trying add arrow buttons to my app. I dont know how to show
I'm trying add some code at run time to the head element. When I
Im trying to add a little code to an already made thumbnail plugin. Basically
I'm trying add a tab to my web page that looks like this: Using
Trying to add an onclick handler to my tabs, and can't seem to get
trying to add an ExpiresDefault ExpiresByType to content on my website so that way
Trying to add a 'box' to a form at design time, I looked up
Trying to add email notification to my app in the cleanest way possible. When
Im trying to add an element to a database and then return a new
Im trying to add some short file names to a Wise installer to fix

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.