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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:54:31+00:00 2026-06-04T07:54:31+00:00

How can I create a animated loading effect like the below image in iOS?

  • 0

How can I create a animated loading effect like the below image in iOS? Someone kindly give me an idea or point me to any examples.
enter image description 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-04T07:54:33+00:00Added an answer on June 4, 2026 at 7:54 am

    I have a very good idea how this works (I work for Shazam and wrote this animation) so…

    Whilst I doubt you want an animation that has all the subtleties of the Shazam version, I will explain the basic idea.

    Firstly the animation is composed of five main parts.

    1. A CAShapeLayer that forms the circle
    2. A CABasicAnimation that keeps our animation in time
    3. A timer that tells our shape layer to redraw
    4. A mask layer that will rotate and mask our shape layer
    5. A Logo that sits on top of the shape layer (It doesn’t have to be shazam)

    So firstly create the CAShapeLayer

    CAShapeLayer *newPieLayer = [CAShapeLayer layer];     
    
    [newPieLayer setFillColor:[UIColor blackColor].CGColor];
    
    [[self layer] addSublayer:newPieLayer];
    
    return newPieLayer;
    

    Create the mask layer and add it to the circle layer, your mask image should a circle that sweeps from zero alpha to 100% alpha

    self.maskLayer = [CALayer layer];
    [self.maskLayer setBounds:self.bounds];
    [self.maskLayer setPosition:CGPointMake(self.bounds.size.width/ 2, self.bounds.size.height/2)];
    [self.maskLayer setContents:(id)[UIImage imageNamed:kMaskImageName].CGImage];
    
    newPieLayer.mask = self.maskLayer;
    

    Create the animation that will keep us in sync and add it to the mask layer

        CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
        anim.fromValue = [NSNumber numberWithFloat:startRadians];
        anim.toValue = [NSNumber numberWithFloat:M_PI * 2];
        anim.duration = timeInterval;
        anim.delegate = delegate;
        anim.TimingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    
        [maskLayer addAnimation:anim forKey:kMaskRotationAnimationKey];
    

    Create and start the timer that we want to do our drawing from

    [NSTimer scheduledTimerWithTimeInterval:kAnimationFireRate target:self selector:@selector(updateTimerFired:) userInfo:nil repeats:YES];
    

    In the timer callback set the path for the layer

    float rotation = [[[maskLayer presentationLayer] valueForKeyPath:@"transform.rotation.z"] floatValue];
    
    decibelPath = CGPathCreateArc(animationCenter, inRadius, endAngle, rotation);
    
    [self.layerOne setPath:decibelPath];
    

    Now you should have something that looks very similar

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

Sidebar

Related Questions

how can create a windows move maker like application in vb.net.... if we want
I can create function pointers in Fortran 90, with code like real, external ::
I would like to create a visual effect when an item in a listbox
Can anyone describe a way to create an animated scaling affect on the iPhone?
I want to have a mesh that can be animated. I'm loading mesh from
I'm trying to create an animated ripple effect on the desktop of OSX. Not
How can I create an animated .gif file from a movie I have? I
I'm wondering how I can create a popover with buttons like this. ANSWER: UIActionSheet
I can create a contact that is not mail enabled, but how do I
How can create a view with mutiple images, something similiar to the photo app

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.