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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:30:33+00:00 2026-05-12T11:30:33+00:00

I have been wanting to make a circular preloader in my iPhone app, but

  • 0

I have been wanting to make a circular preloader in my iPhone app, but have been struggling where to get started. I was using Sequel Pro today and saw that they had exactly what I wanted and it’s open source, so I downloaded the source and couldn’t find anything.

I am just looking for a start on how to make something along the lines of:

alt text http://www.grabup.com/uploads/c7b2d101cd9caf0d927c2fa8a7850ba2.png

or

alt text http://www.grabup.com/uploads/fc8520a4425331a3a6a0cbf6508b510f.png

I found some flash tutorials, but it’s hard to translate that into usable code in Objective-C.

Thanks in advance.

  • 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-12T11:30:33+00:00Added an answer on May 12, 2026 at 11:30 am

    It would not be hard to create a UIView subclass for this purpose. In the subclass you would want to do roughly the following in the drawRect routine:

    CGContextRef context = UIGraphicsGetCurrentContext();
    CGFloat      center_x = self.frame.size.width / 2;
    CGFloat      center_y = self.frame.size.height / 2;
    double       progress = 0.42; // A floating-point number from 0..1 inclusively
    
    // draw the frame
    CGContextAddArc(context,
                    center_x,
                    center_y,
                    std::min(self.frame.size.width, self.frame.size.height),
                    0,
                    M_PI * 2,
                    1 /*clockwise*/);
    CGContextStrokePath(context);
    
    // draw the progress indicator
    CGContextAddArc(context,
                    center_x,
                    center_y,
                    std::min(self.frame.size.width, self.frame.size.height),
                    0,
                    M_PI * 2 * progress,
                    1 /*clockwise*/);
    CGContextFillPath(context);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
We recently started using Eclipse to develop our java application and have been running
I have been wanting to make a RSS reader for a while now (just
I have been wanting to create an application using the Microsoft Speech Recognition. My
Alrighty so, I've been wanting to learn C for awhile, and now I have
Have been searching how to convert a dictionary to a string. But the results
Have have been trying to make a validator for my xml files. I have
I have been tracking emails for years using a "beacon" image and for those
I have this code I been working on but I'm having a hard time
I'm getting a bit confused with UIViews recently, I have been using them fine

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.