- August 12, 2025
- Mins Read
TTProgressHUD
is a light weight HUD written in SwiftUI meant to display the progress of an ongoing task on iOS. TTProgressHUD
(left) was designed to look as similar as possible to the Apple HUD (example from Podcast.app, right).
Xcode 11 and iOS 13 is required.
Drag TTProgressHUD.swift
and TTProgressHUDConfig.swift
into your project.
Use TTProgressHUD
wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.
Import the TTProgressHUD
package:
import TTProgressHUD
struct ContentView: View {
@State var hudVisible = true
@State var hudConfig = TTProgressHUDConfig()
var body: some View {
TTProgressHUD($hudVisible, config: hudConfig)
}
}
TTProgressHUD
can be customized via the TTProgressHUDConfig
struct. The default values were chosen so that TTProgressHUD
looks as similar as possible to the Apple HUD.
public init(
type: TTProgressHUDType = .loading,
title: String? = nil,
caption: String? = nil,
minSize: CGSize = CGSize(width: 100.0, height: 100.0),
cornerRadius: CGFloat = 12.0,
backgroundColor: Color = .clear,
foregroundColor: Color = Color(.systemBackground),
titleForegroundColor: Color = .primary,
captionForegroundColor: Color = .secondary,
shadowColor: Color = .clear,
shadowRadius: CGFloat = 0.0,
borderColor: Color = .clear,
borderWidth: CGFloat = 0.0,
lineWidth: CGFloat = 10.0,
imageViewSize: CGSize = CGSize(width: 100, height: 100),
imageViewForegroundColor: Color = .primary,
successImage: String = “checkmark.circle”,
warningImage: String = “exclamationmark.circle”,
errorImage: String = “xmark.circle”,
shouldAutoHide: Bool = false,
allowsTapToHide: Bool = false,
autoHideInterval: TimeInterval = 10.0,
hapticsEnabled: Bool = true
){…}
Recognize your user's voice elegantly without having to figure out authorization and audio engines. SwiftSpeech Examples Features Installation Getting Started ...
Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements iOS 14.0 Installation ...
SlidingRuler is a Swift package containing a SwiftUI control that acts like an linear infinite slider or a finite, more precise ...
SkeletonUI aims to bring an elegant, declarative syntax to skeleton loading animations. Get rid of loading screens or spinners and ...