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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:57:07+00:00 2026-05-19T00:57:07+00:00

Is there an apple-house-made way to get a UISlider with a ProgressView. This is

  • 0

Is there an apple-house-made way to get a UISlider with a ProgressView. This is used by many streaming applications e.g. native quicktimeplayer or youtube.
(Just to be sure: i’m only in the visualization interested)

Slider  with loader

cheers Simon

  • 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-19T00:57:08+00:00Added an answer on May 19, 2026 at 12:57 am

    Here’s a simple version of what you’re describing.

    alt text

    It is “simple” in the sense that I didn’t bother trying to add the shading and other subtleties. But it’s easy to construct and you can tweak it to draw in a more subtle way if you like. For example, you could make your own image and use it as the slider’s thumb.

    This is actually a UISlider subclass lying on top of a UIView subclass (MyTherm) that draws the thermometer, plus two UILabels that draw the numbers.

    The UISlider subclass eliminates the built-in track, so that the thermometer behind it shows through. But the UISlider’s thumb (knob) is still draggable in the normal way, and you can set it to a custom image, get the Value Changed event when the user drags it, and so on. Here is the code for the UISlider subclass that eliminates its own track:

    - (CGRect)trackRectForBounds:(CGRect)bounds {
        CGRect result = [super trackRectForBounds:bounds];
        result.size.height = 0;
        return result;
    }
    

    The thermometer is an instance of a custom UIView subclass, MyTherm. I instantiated it in the nib and unchecked its Opaque and gave it a background color of Clear Color. It has a value property so it knows how much to fill the thermometer. Here’s its drawRect: code:

    - (void)drawRect:(CGRect)rect {
        CGContextRef c = UIGraphicsGetCurrentContext();
        [[UIColor whiteColor] set];
        CGFloat ins = 2.0;
        CGRect r = CGRectInset(self.bounds, ins, ins);
        CGFloat radius = r.size.height / 2.0;
        CGMutablePathRef path = CGPathCreateMutable();
        CGPathMoveToPoint(path, NULL, CGRectGetMaxX(r) - radius, ins);
        CGPathAddArc(path, NULL, radius+ins, radius+ins, radius, -M_PI/2.0, M_PI/2.0, true);
        CGPathAddArc(path, NULL, CGRectGetMaxX(r) - radius, radius+ins, radius, M_PI/2.0, -M_PI/2.0, true);
        CGPathCloseSubpath(path);
        CGContextAddPath(c, path);
        CGContextSetLineWidth(c, 2);
        CGContextStrokePath(c);
        CGContextAddPath(c, path);
        CGContextClip(c);
        CGContextFillRect(c, CGRectMake(r.origin.x, r.origin.y, r.size.width * self.value, r.size.height));
    }
    

    To change the thermometer value, change the MyTherm instance’s value to a number between 0 and 1, and tell it to redraw itself with setNeedsDisplay.

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

Sidebar

Related Questions

Googling this topic I get a sense there are three ways apple allows to
I am new to all this, but here goes: There is an apple file
Is there a way to compile apple script code on the command line from
There are three tables in my database: apples, refrigerators, and houses. Each apple belongs
In Objective-C on Apple there is something called Key-Value Coding that allows you to
There is a sample code of apple named reachability which tells us the network
There's a feature of the Apple Objective-C language which is really useful to me:
Is there an equivalent in dbg/cocoa/apple word for the Microsoft public symbol server and
Is there an API to tap to Apple's Bonjour service (I'm planning to share
Is there a font that supports all scripts? Ideally and Apple font, so I

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.