CircularProgress alternatives and similar libraries
Based on the "UI" category.
Alternatively, view CircularProgress alternatives based on common mentions on social networks and blogs.
-
Charts
Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. -
Material
A UI/UX framework for creating beautiful applications. -
LTMorphingLabel
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift. -
NVActivityIndicatorView
A collection of awesome loading animations -
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
SwiftMessages
A very flexible message bar for iOS written in Swift. -
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support -
AMScrollingNavbar
Scrollable UINavigationBar that follows the scrolling of a UIScrollView -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
SPPermission
Universal API for request permission and get its statuses. -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
PermissionScope
A Periscope-inspired way to ask for iOS permissions. -
ImagePicker
:camera: Reinventing the way ImagePicker works. -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
SCLAlertView
Beautiful animated Alert View. Written in Swift -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
Instructions
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift. -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
TLYShyNavBar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
PKHUD
A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8. -
Siren
Notify users when a new version of your app is available and prompt them to upgrade. -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros. -
Parchment
A paging view controller with a highly customizable menu ✨ -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion -
DOFavoriteButton
Cute Animated Button written in Swift. -
XLActionController
Fully customizable and extensible action sheet controller written in Swift
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CircularProgress or a related project?
README
CircularProgress
Circular progress indicator for your macOS app
This package is used in production by apps like Gifski and HEIC Converter.
Requirements
- macOS 10.12+
- Xcode 13+
- Swift 5.5+
Install
Swift Package Manager
Add https://github.com/sindresorhus/CircularProgress
in the “Swift Package Manager” tab in Xcode.
Carthage
github "sindresorhus/CircularProgress"
CocoaPods
pod 'CircularProgressMac'
Usage
Also check out the example app in the Xcode project.
Note: All the properties/methods must be set/called from the main thread.
Manually set the progress
import Cocoa
import CircularProgress
@main
final class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet private var window: NSWindow!
let circularProgress = CircularProgress(size: 200)
func applicationDidFinishLaunching(_ notification: Notification) {
window.contentView!.addSubview(circularProgress)
foo.onUpdate = { progress in
self.circularProgress.progress = progress
}
}
}
Specify a Progress
instance
The given Progress
instance is strongly kept alive as long as the CircularProgress
instance or until you set .progressInstance = nil
.
import Cocoa
import CircularProgress
@main
final class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet private var window: NSWindow!
let circularProgress = CircularProgress(size: 200)
let progress = Progress(totalUnitCount: 1)
func applicationDidFinishLaunching(_ notification: Notification) {
window.contentView!.addSubview(circularProgress)
progress?.becomeCurrent(withPendingUnitCount: 1)
circularProgress.progressInstance = progress
}
}
Cancel button
If you use the .progress
property, you need to opt into the cancel button by setting .isCancellable = true
. You can be notified of when the button is clicked by setting the .onCancelled
property to a closure.
If you use the .progressInstance
property, setting a Progress
object that is isCancellable
, which is the default, automatically enables the cancel button.
Per default, the cancelled state is indicated by desaturing the current color and reducing the opacity. You can customize this by implementing the .cancelledStateColorHandler
callback and returning a color to use for the cancelled state instead. The opacity is not automatically reduced when the callback has been set. To disable the cancelled state visualization entirely, set .visualizeCancelledState
to false
.
Indeterminate state
Displays a state that indicates that the remaining progress is indeterminate.
Note that the .progress
property and .isIndeterminate
are not tied together. You'll need to manually set .isIndeterminate = false
when progress is being made again.
If you use the .progressInstance
property, the isIndeterminate
property will automatically be observed. The view will then switch back and forth to the indeterminate state when appropriate.
Hidden progress label
Displays a spinner without a percentage indicator in the center.
This is accomplished by setting the .isLabelHidden
property to true
. The default state is false
(the label is displayed).
API
/**
Color of the circular progress view.
Defaults to the user's accent color. For High Sierra and below it uses a fallback color.
*/
@IBInspectable var color: NSColor = .controlAccentColor
/**
Line width of the circular progress view.
*/
@IBInspectable var lineWidth: CGFloat = 2
/**
Show an animated checkmark instead of `100%`.
*/
@IBInspectable var showCheckmarkAtHundredPercent = true
/**
Hide the progress label.
The property supports KVO.
*/
@IBInspectable var isLabelHidden = true
/**
The progress value in the range `0...1`.
- Note: The value will be clamped to `0...1`.
*/
@IBInspectable var progress: Double = 0
/**
Let a `Progress` instance update the `progress` for you.
*/
var progressInstance: Progress?
/**
Reset the progress back to zero without animating.
*/
func resetProgress() {}
/**
Cancels `Progress` if it's set and prevents further updates.
*/
func cancelProgress() {}
/**
Triggers when the progress was cancelled succesfully.
*/
var onCancelled: (() -> Void)?
/**
Returns whether the progress is finished.
The property supports KVO.
*/
@IBInspectable var isFinished: Bool { get }
/**
If the progress view is cancellable it shows the cancel button.
*/
@IBInspectable var isCancellable: Bool
/**
Make the progress indeterminate.
The property supports KVO.
*/
@IBInspectable var isIndeterminate: Bool
/**
Returns whether the progress has been cancelled.
The property supports KVO.
*/
@IBInspectable var isCancelled: Bool { get }
/**
Determines whether to visualize changing into the cancelled state.
*/
var visualizeCancelledState: Bool = true
/**
Supply the base color to use for displaying the cancelled state.
*/
var cancelledStateColorHandler: ((NSColor) -> NSColor)?
init(frame: CGRect) {}
init?(coder: NSCoder) {}
/**
Initialize the progress view with a width/height of the given `size`.
*/
convenience init(size: Double) {}
Related
- DockProgress - Show progress in your app's Dock icon
- Defaults - Swifty and modern UserDefaults
- Preferences - Add a preferences window to your macOS app
- KeyboardShortcuts - Add user-customizable global keyboard shortcuts to your macOS app
- LaunchAtLogin - Add "Launch at Login" functionality to your macOS app
- Regex - Swifty regular expressions
- More…