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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:40:25+00:00 2026-06-04T19:40:25+00:00

From Bavarious’ question about UIProgressViews here: I tried implementing what Dave DeLong said and

  • 0

From Bavarious’ question about UIProgressViews here:

I tried implementing what Dave DeLong said and I did everything the exact way he showed in his example, but when I run the program, my progress bar becomes a stretched image if I try changing the value of the progress. The track image however resizes perfectly and repeats along the track. For some reason, the progress isn’t doing this along the progress bar.

UIImage * load = [[UIImage imagedNamed:@"load.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)];
UIImage * track = [[UIImage imageNamed:@"track.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 1, 0, 1)]; 
[progressbar progressImage:load];
[progressbar trackImage:track];
[progressbar setProgress:0.5];

Original images and progress bar results

I tried switching my image variables from the progress image to the track image to see if maybe it was the image that wasn’t resizable (which it shouldn’t have been because they were the exact same image, just different colors). Except when I did this, the track image again resized perfectly and the progress image was the one that stretched. Does anyone know why this may be happening?

  • 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-04T19:40:28+00:00Added an answer on June 4, 2026 at 7:40 pm

    Your resizable cap insets probably shouldn’t be {0,1,0,1}. In your case, it looks like they should be {0,0,0,0}, or UIEdgeInsetsZero.

    I clipped out the little red and blue squares:

    blue red

    … and then threw them into a UIProgressView:

    UIImage *red = [[UIImage imageNamed:@"red"] resizableImageWithCapInsets:UIEdgeInsetsZero];
    UIImage *blue = [[UIImage imageNamed:@"blue"] resizableImageWithCapInsets:UIEdgeInsetsZero];
    
    [pv setTrackImage:blue];
    [pv setProgressImage:red];
    

    When the progress view was placed on the UI with a progress of 0.5, I got this:

    progress view

    Looks good to me.

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

Sidebar

Related Questions

From what I've read about Windsor/Microkernel it is in theory possible to do everything
From 2.13.2/3 The double quote and the question mark ? , can be represented
From here: http://www.codingwithoutcomments.com/ If you do use Singletons, try to use dependency injection instead
The question is from a comment I just added to the answer to this
From here: https://stackoverflow.com/a/2485177/462608 For thread-safe accesses to shared data, we need a guarantee that
From the MSDN about OnCollectionChanged: Occurs when an item is added, removed, changed, moved,
From my previous question I understood that I have to change my SVN repository
From a response to some question yesterday, I learned that it is nonportable and
From my website, I have a button which calls a method and then generates
From this context: import itertools lines = itertools.cycle(open('filename')) I'm wondering how I can implement

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.