Welcome to the YLProgressBar documentation. This page will guide you on how to effectively use YLProgressBar in your projects. YLProgressBar is a custom progress bar library for iOS developed in Swift.


To install YLProgressBar in your iOS project, follow the steps below:

  1. Open your project in Xcode.
  2. Go to the “File” menu and select “Swift Packages” and then “Add Package Dependency”.
  3. In the prompt, paste the URL “https://github.com/yannickl/YLProgressBar” and click “Next”.
  4. Choose the preferred version rule and click “Next”.
  5. Select the target where you want to add YLProgressBar and click “Finish”.


Once you have successfully installed YLProgressBar, you can start using it in your project. Follow the steps below to get started:

Importing YLProgressBar

In your relevant Swift file, import the YLProgressBar module using the following code:

import YLProgressBar

Creating a Progress Bar

To create a progress bar, initialize an instance of YLProgressBar:

let progressBar = YLProgressBar(frame: CGRect(x: 0, y: 0, width: 200, height: 20))

Customizing the Progress Bar

YLProgressBar provides several properties and customization options. Some common customization options include:

  • Changing the track color: progressBar.trackTintColor = UIColor.lightGray
  • Changing the progress color: progressBar.progressTintColor = UIColor.blue
  • Setting the progress value: progressBar.progress = 0.5
  • Changing the corner radius: progressBar.cornerRadius = 10
  • Customizing the animation duration: progressBar.animationDuration = 2.0

Displaying the Progress Bar

Finally, add the progress bar to your view:


Advanced Usage

YLProgressBar offers more advanced features for enhanced customization:

  • Customizing the appearance of different sections of the progress bar
  • Adding custom animation to the progress bar
  • Responding to progress bar events


If you encounter any issues or have questions, please refer to the following resources:

  1. Check the YLProgressBar GitHub repository for open issues and solutions.
  2. Join the YLProgressBar community on the official forum for additional support.


Congratulations! You have successfully learned how to integrate and use YLProgressBar in your iOS projects. Enjoy creating beautiful progress bars for your applications!