All Projects → sindresorhus → Dockprogress

sindresorhus / Dockprogress

Licence: mit
Show progress in your app's Dock icon

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Dockprogress

Gradientcircularprogress
Customizable progress indicator library in Swift
Stars: ✭ 407 (-49.94%)
Mutual labels:  cocoapods, carthage, progress-circle
Progress.swift
⌛️ Add beautiful progress bars to your loops.
Stars: ✭ 265 (-67.4%)
Mutual labels:  cocoapods, carthage, progress-bar
Arslineprogress
iOS progress bar, replacement for the default activity indicator.
Stars: ✭ 434 (-46.62%)
Mutual labels:  cocoapods, carthage, progress-circle
Circularprogress
Circular progress indicator for your macOS app
Stars: ✭ 366 (-54.98%)
Mutual labels:  cocoapods, carthage, progress-circle
Multiprogressview
📊 An animatable view that depicts multiple progresses over time. Modeled after UIProgressView
Stars: ✭ 614 (-24.48%)
Mutual labels:  cocoapods, carthage, progress-bar
Flexiblepagecontrol
A flexible UIPageControl like Instagram.
Stars: ✭ 638 (-21.53%)
Mutual labels:  cocoapods, carthage
Flyoverkit
360° flyover on a MKMapView 🚁
Stars: ✭ 666 (-18.08%)
Mutual labels:  cocoapods, carthage
Interactivesidemenu
iOS Interactive Side Menu written in Swift.
Stars: ✭ 668 (-17.84%)
Mutual labels:  cocoapods, carthage
Zephyr
Effortlessly synchronize UserDefaults over iCloud.
Stars: ✭ 722 (-11.19%)
Mutual labels:  cocoapods, carthage
Urlembeddedview
URLEmbeddedView automatically caches the object that is confirmed the Open Graph Protocol.
Stars: ✭ 633 (-22.14%)
Mutual labels:  cocoapods, carthage
Zoomtransitioning
ZoomTransitioning provides a custom transition with image zooming animation and swiping the screen edge.
Stars: ✭ 670 (-17.59%)
Mutual labels:  cocoapods, carthage
Xlpagertabstrip
Android PagerTabStrip for iOS.
Stars: ✭ 6,671 (+720.54%)
Mutual labels:  cocoapods, carthage
Blockhook
Hook Objective-C blocks. A powerful AOP tool.
Stars: ✭ 742 (-8.73%)
Mutual labels:  cocoapods, carthage
Guitar
A Cross-Platform String and Regular Expression Library written in Swift.
Stars: ✭ 641 (-21.16%)
Mutual labels:  cocoapods, carthage
Defaults
Swifty and modern UserDefaults
Stars: ✭ 734 (-9.72%)
Mutual labels:  cocoapods, carthage
Stlocationrequest
Request the Location Services via a 3D 360° flyover MKMapView 🗺
Stars: ✭ 636 (-21.77%)
Mutual labels:  cocoapods, carthage
Nightnight
Elegant way to integrate night mode to swift projects
Stars: ✭ 771 (-5.17%)
Mutual labels:  cocoapods, carthage
Shiny
Iridescent Effect View (inspired by Apple Pay Cash) ✨
Stars: ✭ 707 (-13.04%)
Mutual labels:  cocoapods, carthage
Validatedpropertykit
Easily validate your Properties with Property Wrappers 👮
Stars: ✭ 701 (-13.78%)
Mutual labels:  cocoapods, carthage
Koyomi
Simple customizable calendar component in Swift 📆
Stars: ✭ 716 (-11.93%)
Mutual labels:  cocoapods, carthage

DockProgress

Show progress in your app's Dock icon

This package is used in production by the Gifski app. You might also like some of my other apps.

Requirements

  • macOS 10.12+
  • Xcode 12+
  • Swift 5.3+

Install

Swift Package Manager

Add https://github.com/sindresorhus/DockProgress in the “Swift Package Manager” tab in Xcode.

Carthage

github "sindresorhus/DockProgress"

CocoaPods

pod 'DockProgress'

Usage

Manually set the progress

import Cocoa
import DockProgress

foo.onUpdate = { progress in
	DockProgress.progress = progress
}

Specify a Progress instance

import Cocoa
import DockProgress

let progress = Progress(totalUnitCount: 1)
progress?.becomeCurrent(withPendingUnitCount: 1)

DockProgress.progressInstance = progress

The given Progress instance is weakly stored. It's up to you to retain it.

Styles

It comes with three styles. PR welcome for more.

Check out the example app in the Xcode project.

You can also draw a custom progress with .custom(drawHandler: (_ rect: CGRect) -> Void).

Bar

import DockProgress

DockProgress.style = .bar

This is the default.

Squircle

import DockProgress

DockProgress.style = .squircle(color: NSColor.white.withAlphaComponent(0.5))

By default, it should perfectly fit a macOS 11 icon, but there's a inset parameter if you need to make any adjustments.

Circle

import DockProgress

DockProgress.style = .circle(radius: 55, color: .systemBlue)

Make sure to set a radius that matches your app icon.

Badge

import DockProgress

DockProgress.style = .badge(color: .systemBlue, badgeValue: { getDownloadCount() })

Large badgeValue numbers will be written in kilo short notation, for example, 10121k.

Note: The badgeValue is not meant to be used as a numeric percentage. It's for things like count of downloads, number of files being converted, etc.

Related

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].