All Projects → alxrguz → ALProgressView

alxrguz / ALProgressView

Licence: MIT license
Animated and fully customizable progress view with 2 styles: ring and bar.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ALProgressView

Mkringprogressview
⭕️ Ring progress view similar to Activity app on Apple Watch
Stars: ✭ 1,140 (+1483.33%)
Mutual labels:  apple, progress-bar, circle, progress-circle
mp-progress
专注于小程序圆环形进度条的小工具
Stars: ✭ 72 (+0%)
Mutual labels:  progress-bar, circle, progress-circle
Jocircularslider
A highly customisable and reusable circular slider for iOS applications.
Stars: ✭ 128 (+77.78%)
Mutual labels:  progress-bar, circle, progress-circle
Percircle
⭕️ CSS percentage circle built with jQuery
Stars: ✭ 217 (+201.39%)
Mutual labels:  progress-bar, circle, progress-circle
XCArcProgressView
Android开口圆环比例进度View(高仿猎豹清理大师内存占用比例View)
Stars: ✭ 28 (-61.11%)
Mutual labels:  progress-bar, progress-circle, progress-view
Hgcircularslider
A custom reusable circular / progress slider control for iOS application.
Stars: ✭ 2,240 (+3011.11%)
Mutual labels:  progress-bar, circle, progress-circle
ALRadioButtons
RadioButtons for iOS. Inherited from UIControl, support 2 native styles, fully customizable.
Stars: ✭ 65 (-9.72%)
Mutual labels:  apple, uikit, uicomponent
Swiftui
A collaborative list of awesome SwiftUI resources. Feel free to contribute!
Stars: ✭ 774 (+975%)
Mutual labels:  apple, uikit
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (+1023.61%)
Mutual labels:  apple, uikit
Spalert
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
Stars: ✭ 1,014 (+1308.33%)
Mutual labels:  apple, uikit
Drawer View
📤 Custom UI component for iOS, replication of Apple's Apple Music player and Shortcuts’ components view [Swift 5.0, iOS 12].
Stars: ✭ 136 (+88.89%)
Mutual labels:  apple, uikit
LinearProgressView
A simple linear progress view for iOS
Stars: ✭ 103 (+43.06%)
Mutual labels:  progress-bar, progress-view
About Swiftui
Gathering all info published, both by Apple and by others, about new framework SwiftUI.
Stars: ✭ 5,954 (+8169.44%)
Mutual labels:  apple, uikit
Compositional Layouts Kit
📏 A set of advanced compositional layouts for UICollectionView with examples [Swift 5.3, iOS 13].
Stars: ✭ 317 (+340.28%)
Mutual labels:  apple, uikit
WWDC
🌈 𝐖𝐖𝐃𝐂 𝐒𝐞𝐬𝐬𝐢𝐨𝐧 𝐍𝐨𝐭𝐞𝐬 👩🏻‍💻 ✨
Stars: ✭ 31 (-56.94%)
Mutual labels:  apple, uikit
Fruity
Rusty bindings for Apple libraries
Stars: ✭ 72 (+0%)
Mutual labels:  apple, uikit
Swiftui Visual Effects
View modifiers that wrap UIVisualEffectView, with environment integration.
Stars: ✭ 137 (+90.28%)
Mutual labels:  apple, uikit
Swiftautolayout
Write constraints in a concise, expressive, Swifty way.
Stars: ✭ 83 (+15.28%)
Mutual labels:  apple, uikit
Circular-Progress-View
A customisable circular progress view for android.
Stars: ✭ 39 (-45.83%)
Mutual labels:  progress-circle, progress-view
CustomProgress
一款常见的进度条加载框架
Stars: ✭ 32 (-55.56%)
Mutual labels:  progress-bar, progress-view

ALProgressView

Navigation

Requirements

  • iOS 10.0 +
  • Swift 4.2 +

Installation

Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To integrate ALProgressView click File -> Swift Package -> Add Package Dependency and insert:

https://github.com/alxrguz/ALProgressView

CocoaPods

ALProgressView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ALProgressView'

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate ALProgressView into your project manually. Put Source/ALProgressView folder in your Xcode project.

Usage

Quick Start

import ALProgressView

class MyViewController: UIViewController {

    private lazy var progressRing = ALProgressRing()
    private lazy var progressBar = ALProgressBar()

    override func viewDidLoad() {
        super.viewDidLoad()

        view.addSubview(progressRing)
        view.addSubview(progressRing)
      
      	// MARK: ALProgressRing
        
        // Setup layout 
        progressRing.translatesAutoresizingMaskIntoConstraints = false
        progressRing.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
        progressRing.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
      	// Make sure to set the view size
        progressRing.widthAnchor.constraint(equalToConstant: 180).isActive = true
        progressRing.heightAnchor.constraint(equalToConstant: 180).isActive = true
      
      
        // MARK: ALProgressBar
      
        // Setup layout 
        progressBar.translatesAutoresizingMaskIntoConstraints = false
        progressBar.topAnchor.constraint(equalTo: progressRing.bottomAnchor, constant: 20).isActive = true
        progressBar.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
        progressBar.widthAnchor.constraint(equalTo: titleLabel.widthAnchor).isActive = true
        // Make sure to set the view height
        progressBar.heightAnchor.constraint(equalToConstant: 10).isActive = true
      
       
        // Setting progress
        progressRing.setProgress(0.8, animated: true)
        progressBar.setProgress(0.6, animated: true)
    }
}

You can also run ExampleApp and play with the parameters there

Customization

General
Colors

You can customize the buttons, headers and indicators colors depending on their state.

/// Set track color
/// If you don't need a gradient, just set the same values for `startColor` and `endColor`
progressView.startColor = .systemPink 
progressView.endColor = .systemRed 

/// Set groove color
progressView.grooveColor = .systemRed 
Animation
progressView.duration = 2 // Duration of the ring's fill animation.
progressView.timingFunction = .easeOutExpo // Timing function of the ring's fill animation.

/// The following use of setProgress (_ value: Int, animated: Bool) 
/// will take into account the new parameters 
progressView.setProgress(0.8, animated: true)

Let's take a look at the timingFunction parameter, it is of type ALTimingFunction, which contains the following types of animations:

There is a good cheat sheet available here.

AlProgressRing
progressBar.startAngle = -.pi / 2 // The start angle of the ring to begin drawing.
progressRing.endAngle = 1.5 * .pi // The end angle of the ring to end drawing. 
progressRing.startGradientPoint = .init(x: 0.5, y: 0) // The starting poin of the gradient
progressRing.endGradientPoint = .init(x: 0.5, y: 1) // The ending position of the gradient.

// Sets the line width for progress ring and "groove" ring
progressRing.lineWidth = 10
// Or, if you need to separate these parameters, use
progressRing.ringWidth = 10 
progressRing.grooveWidth = 8 
AlProgressBar
progressBar.barEdgeInset = 1.5 // Distance between groove and progress bar.

License

ALProgressView is under MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].