Git Product home page Git Product logo

circular-progress's Introduction

Circular Progress Views

Circular progress views are used in lots of iOS apps. UIKit, though, doesn't provide a circular progress view. Therefore we look at several techniques for building a customizable circular progress view. By customizable I simply mean that we'll be able apply different styles in a "pluggable" way to alter the look based on our app's needs and the context in which the circular progress is presented.

This demo code coincides with my STL CocoaHeads talk on techniques for building circular progress views.

The demo code shows how to:

  • use Core Animation CAShapeLayers to draw content
  • use explicit animations (CABasicAnimation) to animate the content
  • use custom animatable properties on a CALayer subclass to perform custom animations
  • apply well-known design patterns to "plug-in" and composite different progress styles
  • add "sparkles" to a progress view using a CAEmitterLayer

Sample Graphs

Samples

Presentation Slides

Be sure to review the CocoaHeads presentation slides for additional notes and details.

What About strokeEnd?

You could use CAShapeLayer's strokeEnd to animate the progress "layer". However, my experience is a "choppy" animation when there are small changes to the strokeEnd property. Therefore, the sample code examines techniques for animating "arcs" using a custom layer subclass (i.e. ProgressLayer) and a custom animatable property.

Additional Repos

circular-progress's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hardik99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.