explaingit

pkluz/pkhud

3,779SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Swift library for iOS that adds a translucent floating status overlay to your app, like Apple's volume indicator, with built-in success, error, and loading animations you can display with a single line of code.

Mindmap

mindmap
  root((PKHUD))
    What It Does
      HUD overlay for iOS
      Brief status feedback
    Content Views
      Success checkmark
      Error X
      Progress spinner
      Custom content
    Setup Options
      CocoaPods
      Carthage
      Swift Package Manager
    Customization
      Background dimming
      Interactive vs blocking
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Show a success checkmark or error overlay after a network request completes in an iOS app

USE CASE 2

Display a spinning loading indicator while a file upload or download runs, then swap it to a success animation on completion

USE CASE 3

Give users non-blocking visual feedback during background tasks without writing custom animation or overlay code

USE CASE 4

Add a brief confirmation HUD with a custom content view styled to match Apple's native indicator style

Tech stack

SwiftiOSCocoaPodsCarthageSwift Package Manager

Getting it running

Difficulty · easy Time to first run · 5min

Requires Xcode and an iOS 8+ project target.

Free to use in any app including commercial products with no restrictions beyond keeping the MIT copyright notice.

In plain English

PKHUD is a Swift library for iOS app developers that provides a heads-up display overlay, the small floating popup that Apple uses for things like the volume indicator, rotation lock notification, and similar brief status messages. If you have ever seen a translucent rounded square appear momentarily on an iPhone screen to confirm an action, this library recreates that style for use inside your own apps. The library ships with several ready-made content views: a checkmark for success, an X for failure, a spinning progress indicator, and a few others, all animated. You add it to your Xcode project through CocoaPods, Carthage, or Swift Package Manager (three standard iOS dependency tools), import the module with one line, and then show a HUD with a single function call. For example, calling HUD.flash(.success, delay: 1.0) displays a checkmark overlay that disappears after one second. You can also attach a completion handler to run code after the HUD finishes showing. For longer tasks, you can show a progress indicator when an operation starts and then swap it out for a success or error view when the operation finishes, all without dismissing and re-showing the overlay. This makes it straightforward to give users visual feedback during network requests or file operations without writing custom animation code. The library has two main customization knobs: whether the background behind the HUD is dimmed slightly, and whether the underlying screen remains interactive while the HUD is visible. Custom content views are also supported if the built-in options do not fit your needs, though the blur effect, corner radius, and shading style are intentionally fixed and cannot be changed. PKHUD requires iOS 8 or later and is released under the MIT License, meaning you can use it in free or commercial apps without restriction.

Copy-paste prompts

Prompt 1
Help me add PKHUD to my iOS app via Swift Package Manager and show me how to display a success checkmark overlay that auto-dismisses after 1.5 seconds
Prompt 2
I'm using PKHUD in my iOS app. Show me how to display a spinning progress HUD when a network request starts and replace it with a success or error view when it finishes
Prompt 3
How do I create a custom content view in PKHUD to show my own icon and label instead of the default checkmark or X?
Prompt 4
Walk me through setting up PKHUD with CocoaPods for an existing Xcode project and configuring whether the background dims while the HUD is visible
Open on GitHub → Explain another repo

← pkluz on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.