├── .github └── FUNDING.yml ├── .gitignore ├── Examples ├── JGProgressHUD-Tests-Swift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Info.plist │ ├── JGProgressHUD-Tests-Swift.entitlements │ └── ViewController.swift ├── JGProgressHUD-Tests-tvOS │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── App Icon & Top Shelf Image.brandassets │ │ │ ├── App Icon - App Store.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── App Icon.imagestack │ │ │ │ ├── Back.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ ├── Contents.json │ │ │ │ ├── Front.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ │ └── Middle.imagestacklayer │ │ │ │ │ ├── Content.imageset │ │ │ │ │ └── Contents.json │ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── Top Shelf Image Wide.imageset │ │ │ │ └── Contents.json │ │ │ └── Top Shelf Image.imageset │ │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── Main.storyboard │ └── Info.plist ├── JGProgressHUD-Tests.xcodeproj │ └── project.pbxproj ├── JGProgressHUD-Tests │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── JGAppDelegate.h │ ├── JGAppDelegate.m │ ├── JGDetailViewController.h │ ├── JGDetailViewController.m │ ├── JGMainViewController.h │ ├── JGMainViewController.m │ ├── JGProgressHUD-Tests-Info.plist │ ├── JGProgressHUD-Tests-Prefix.pch │ ├── JGProgressHUD-Tests.entitlements │ ├── Launch Screen.storyboard │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m └── Screenshots │ ├── Presentation.png │ ├── demo1.gif │ └── demo2.gif ├── JGProgressHUD.podspec ├── JGProgressHUD.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ ├── JGProgressHUD-iOS.xcscheme │ └── JGProgressHUD-tvOS.xcscheme ├── JGProgressHUD ├── JGProgressHUD-iOS │ └── Info.plist ├── JGProgressHUD-tvOS │ └── Info.plist └── JGProgressHUD │ ├── JGProgressHUD.m │ ├── JGProgressHUDAnimation.m │ ├── JGProgressHUDErrorIndicatorView.m │ ├── JGProgressHUDFadeAnimation.m │ ├── JGProgressHUDFadeZoomAnimation.m │ ├── JGProgressHUDImageIndicatorView.m │ ├── JGProgressHUDIndeterminateIndicatorView.m │ ├── JGProgressHUDIndicatorView.m │ ├── JGProgressHUDPieIndicatorView.m │ ├── JGProgressHUDRingIndicatorView.m │ ├── JGProgressHUDShadow.m │ ├── JGProgressHUDSuccessIndicatorView.m │ └── include │ ├── JGProgressHUD-Defines.h │ ├── JGProgressHUD.h │ ├── JGProgressHUDAnimation.h │ ├── JGProgressHUDErrorIndicatorView.h │ ├── JGProgressHUDFadeAnimation.h │ ├── JGProgressHUDFadeZoomAnimation.h │ ├── JGProgressHUDImageIndicatorView.h │ ├── JGProgressHUDIndeterminateIndicatorView.h │ ├── JGProgressHUDIndicatorView.h │ ├── JGProgressHUDPieIndicatorView.h │ ├── JGProgressHUDRingIndicatorView.h │ ├── JGProgressHUDShadow.h │ ├── JGProgressHUDSuccessIndicatorView.h │ └── module.modulemap ├── LICENSE.txt ├── Package.swift ├── README.md ├── docs ├── Classes │ ├── JGProgressHUD.html │ ├── JGProgressHUDAnimation.html │ ├── JGProgressHUDErrorIndicatorView.html │ ├── JGProgressHUDFadeAnimation.html │ ├── JGProgressHUDFadeZoomAnimation.html │ ├── JGProgressHUDImageIndicatorView.html │ ├── JGProgressHUDIndeterminateIndicatorView.html │ ├── JGProgressHUDIndicatorView.html │ ├── JGProgressHUDPieIndicatorView.html │ ├── JGProgressHUDRingIndicatorView.html │ ├── JGProgressHUDShadow.html │ └── JGProgressHUDSuccessIndicatorView.html ├── Constants │ ├── JGProgressHUDInteractionType.html │ ├── JGProgressHUDParallaxMode.html │ ├── JGProgressHUDPosition.html │ └── JGProgressHUDStyle.html ├── Protocols │ └── JGProgressHUDDelegate.html ├── css │ ├── scss │ │ ├── _index.scss │ │ ├── _layout.scss │ │ ├── _normalize.scss │ │ ├── _object.scss │ │ ├── _print.scss │ │ ├── _variables.scss │ │ ├── _xcode.scss │ │ └── style.scss │ └── style.css ├── hierarchy.html ├── img │ ├── button_bar_background.png │ ├── disclosure.png │ ├── disclosure_open.png │ ├── library_background.png │ └── title_background.png ├── index.html └── js │ └── script.js └── generate-docs.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: [] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | *.xcuserstate 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | .idea/ 20 | docs/generate-docs.sh 21 | *.pxm -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // JGProgressHUD-Tests-Swift 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | window = UIWindow(frame: UIScreen.main.bounds) 18 | window?.rootViewController = ViewController() 19 | window?.makeKeyAndVisible() 20 | // Override point for customization after application launch. 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(_ application: UIApplication) { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | func applicationDidEnterBackground(_ application: UIApplication) { 30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(_ application: UIApplication) { 35 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 36 | } 37 | 38 | func applicationDidBecomeActive(_ application: UIApplication) { 39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 40 | } 41 | 42 | func applicationWillTerminate(_ application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSApplicationCategoryType 22 | public.app-category.developer-tools 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/JGProgressHUD-Tests-Swift.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-Swift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // JGProgressHUD-Tests-Swift 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import JGProgressHUD 11 | 12 | private typealias Gradient = (start: UIColor, end: UIColor) 13 | 14 | private let blueGradient: Gradient = (UIColor(rgb: 0x24C6DC), UIColor(rgb: 0x514A9D)) 15 | private let tealGradient: Gradient = (UIColor(rgb: 0x1CD8D2), UIColor(rgb: 0x93EDC7)) 16 | private let redGradient: Gradient = (UIColor(rgb: 0xAE2727), UIColor(rgb: 0x79319B)) 17 | 18 | private let gradient = blueGradient 19 | 20 | final class GradientView: UIView { 21 | init(startColor: UIColor, endColor: UIColor) { 22 | super.init(frame: .zero) 23 | 24 | gradientLayer.colors = [startColor.cgColor, endColor.cgColor] 25 | gradientLayer.startPoint = CGPoint(x: 0.5, y: 0) 26 | gradientLayer.endPoint = CGPoint(x: 0.5, y: 1) 27 | gradientLayer.locations = [0.0, 1.0] 28 | } 29 | 30 | @available(*, unavailable) 31 | required init?(coder aDecoder: NSCoder) { 32 | fatalError("init(coder:) has not been implemented") 33 | } 34 | 35 | override class var layerClass: AnyClass { 36 | return CAGradientLayer.self 37 | } 38 | 39 | private var gradientLayer: CAGradientLayer { 40 | return layer as! CAGradientLayer 41 | } 42 | } 43 | 44 | extension UIColor { 45 | convenience init(rgb: UInt) { 46 | self.init( 47 | red: CGFloat((rgb & 0xFF0000) >> 16) / 255.0, 48 | green: CGFloat((rgb & 0x00FF00) >> 8) / 255.0, 49 | blue: CGFloat(rgb & 0x0000FF) / 255.0, 50 | alpha: 1.0 51 | ) 52 | } 53 | } 54 | 55 | final class ViewController: UIViewController { 56 | #if os(iOS) 57 | override var prefersStatusBarHidden: Bool { 58 | return true 59 | } 60 | #endif 61 | 62 | override func loadView() { 63 | self.view = GradientView(startColor: gradient.start, endColor: gradient.end) 64 | } 65 | 66 | override func viewDidAppear(_ animated: Bool) { 67 | super.viewDidAppear(animated) 68 | 69 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1000)) { 70 | self.showLoadingHUD() 71 | } 72 | } 73 | 74 | func showSimpleHUD() { 75 | let hud = JGProgressHUD() 76 | hud.vibrancyEnabled = true 77 | #if os(tvOS) 78 | hud.textLabel.text = "Simple example on tvOS in Swift" 79 | #else 80 | hud.textLabel.text = "Simple example in Swift" 81 | #endif 82 | hud.detailTextLabel.text = "See JGProgressHUD-Tests for more examples" 83 | hud.shadow = JGProgressHUDShadow(color: .black, offset: .zero, radius: 5.0, opacity: 0.2) 84 | hud.show(in: self.view) 85 | } 86 | 87 | func showHUDWithTransform() { 88 | let hud = JGProgressHUD() 89 | hud.vibrancyEnabled = true 90 | hud.textLabel.text = "Loading" 91 | hud.layoutMargins = UIEdgeInsets.init(top: 0.0, left: 0.0, bottom: 10.0, right: 0.0) 92 | 93 | hud.show(in: self.view) 94 | 95 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(1000)) { 96 | UIView.animate(withDuration: 0.3) { 97 | hud.indicatorView = nil 98 | hud.textLabel.font = UIFont.systemFont(ofSize: 30.0) 99 | hud.textLabel.text = "Done" 100 | hud.position = .bottomCenter 101 | } 102 | } 103 | 104 | hud.dismiss(afterDelay: 4.0) 105 | 106 | DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(5)) { 107 | self.showSimpleHUD() 108 | } 109 | } 110 | 111 | func showLoadingHUD() { 112 | let hud = JGProgressHUD() 113 | hud.vibrancyEnabled = true 114 | if arc4random_uniform(2) == 0 { 115 | hud.indicatorView = JGProgressHUDPieIndicatorView() 116 | } 117 | else { 118 | hud.indicatorView = JGProgressHUDRingIndicatorView() 119 | } 120 | hud.detailTextLabel.text = "0% Complete" 121 | hud.textLabel.text = "Downloading" 122 | hud.show(in: self.view) 123 | 124 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(400)) { 125 | self.incrementHUD(hud, progress: 0) 126 | } 127 | } 128 | 129 | func incrementHUD(_ hud: JGProgressHUD, progress previousProgress: Int) { 130 | let progress = previousProgress + 1 131 | hud.progress = Float(progress)/100.0 132 | hud.detailTextLabel.text = "\(progress)% Complete" 133 | 134 | if progress == 100 { 135 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(500)) { 136 | UIView.animate(withDuration: 0.1, animations: { 137 | hud.textLabel.text = "Success" 138 | hud.detailTextLabel.text = nil 139 | hud.indicatorView = JGProgressHUDSuccessIndicatorView() 140 | }) 141 | 142 | hud.dismiss(afterDelay: 1.0) 143 | 144 | DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2)) { 145 | self.showHUDWithTransform() 146 | } 147 | } 148 | } 149 | else { 150 | DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(20)) { 151 | self.incrementHUD(hud, progress: progress) 152 | } 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // JGProgressHUD-Tests-tvOS 4 | // 5 | // Created by Jonas Gessner on 26.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "layers" : [ 3 | { 4 | "filename" : "Front.imagestacklayer" 5 | }, 6 | { 7 | "filename" : "Middle.imagestacklayer" 8 | }, 9 | { 10 | "filename" : "Back.imagestacklayer" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "assets" : [ 3 | { 4 | "size" : "1280x768", 5 | "idiom" : "tv", 6 | "filename" : "App Icon - App Store.imagestack", 7 | "role" : "primary-app-icon" 8 | }, 9 | { 10 | "size" : "400x240", 11 | "idiom" : "tv", 12 | "filename" : "App Icon.imagestack", 13 | "role" : "primary-app-icon" 14 | }, 15 | { 16 | "size" : "2320x720", 17 | "idiom" : "tv", 18 | "filename" : "Top Shelf Image Wide.imageset", 19 | "role" : "top-shelf-image-wide" 20 | }, 21 | { 22 | "size" : "1920x720", 23 | "idiom" : "tv", 24 | "filename" : "Top Shelf Image.imageset", 25 | "role" : "top-shelf-image" 26 | } 27 | ], 28 | "info" : { 29 | "version" : 1, 30 | "author" : "xcode" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "tv", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "tv", 9 | "scale" : "2x" 10 | } 11 | ], 12 | "info" : { 13 | "version" : 1, 14 | "author" : "xcode" 15 | } 16 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "landscape", 5 | "idiom" : "tv", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "11.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "landscape", 12 | "idiom" : "tv", 13 | "extent" : "full-screen", 14 | "minimum-system-version" : "9.0", 15 | "scale" : "1x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIMainStoryboardFile 24 | Main 25 | UIRequiredDeviceCapabilities 26 | 27 | arm64 28 | 29 | UIUserInterfaceStyle 30 | Automatic 31 | 32 | 33 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "29x29", 26 | "scale" : "3x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "40x40", 36 | "scale" : "3x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "57x57", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "iphone", 45 | "size" : "57x57", 46 | "scale" : "2x" 47 | }, 48 | { 49 | "idiom" : "iphone", 50 | "size" : "60x60", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "iphone", 55 | "size" : "60x60", 56 | "scale" : "3x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "20x20", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "20x20", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "29x29", 71 | "scale" : "1x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "29x29", 76 | "scale" : "2x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "40x40", 81 | "scale" : "1x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "40x40", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ipad", 90 | "size" : "50x50", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "idiom" : "ipad", 95 | "size" : "50x50", 96 | "scale" : "2x" 97 | }, 98 | { 99 | "idiom" : "ipad", 100 | "size" : "72x72", 101 | "scale" : "1x" 102 | }, 103 | { 104 | "idiom" : "ipad", 105 | "size" : "72x72", 106 | "scale" : "2x" 107 | }, 108 | { 109 | "idiom" : "ipad", 110 | "size" : "76x76", 111 | "scale" : "1x" 112 | }, 113 | { 114 | "idiom" : "ipad", 115 | "size" : "76x76", 116 | "scale" : "2x" 117 | }, 118 | { 119 | "idiom" : "ipad", 120 | "size" : "83.5x83.5", 121 | "scale" : "2x" 122 | }, 123 | { 124 | "idiom" : "ios-marketing", 125 | "size" : "1024x1024", 126 | "scale" : "1x" 127 | } 128 | ], 129 | "info" : { 130 | "version" : 1, 131 | "author" : "xcode" 132 | }, 133 | "properties" : { 134 | "pre-rendered" : true 135 | } 136 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGAppDelegate.h 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 20.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JGAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGAppDelegate.m 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 20.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGAppDelegate.h" 10 | #import "JGMainViewController.h" 11 | 12 | @implementation JGAppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 15 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 16 | 17 | JGMainViewController *vc = [[JGMainViewController alloc] initWithStyle:UITableViewStyleGrouped]; 18 | 19 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; 20 | 21 | self.window.rootViewController = nav; 22 | 23 | [self.window makeKeyAndVisible]; 24 | 25 | return YES; 26 | } 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application 29 | { 30 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 31 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 32 | } 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application 35 | { 36 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 38 | } 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application 41 | { 42 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 43 | } 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application 46 | { 47 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 48 | } 49 | 50 | - (void)applicationWillTerminate:(UIApplication *)application 51 | { 52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGDetailViewController.h 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 06.08.16. 6 | // Copyright © 2016 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JGDetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGDetailViewController.m 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 06.08.16. 6 | // Copyright © 2016 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGDetailViewController.h" 10 | 11 | @implementation JGDetailViewController { 12 | UITextField *_textField; 13 | } 14 | 15 | - (void)viewDidLoad { 16 | [super viewDidLoad]; 17 | 18 | _textField = [[UITextField alloc] init]; 19 | _textField.borderStyle = UITextBorderStyleRoundedRect; 20 | _textField.placeholder = @"Text field"; 21 | 22 | [self.view addSubview:_textField]; 23 | 24 | self.view.backgroundColor = [UIColor whiteColor]; 25 | } 26 | 27 | - (void)viewDidLayoutSubviews { 28 | [super viewDidLayoutSubviews]; 29 | 30 | _textField.frame = CGRectMake(30.0, (self.view.frame.size.height-25.0)/2.0, self.view.frame.size.width-60.0, 25.0); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGMainViewController.h 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 20.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JGMainViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGProgressHUD-Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSApplicationCategoryType 24 | public.app-category.developer-tools 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | Launch Screen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarHidden 34 | 35 | UIStatusBarStyle 36 | UIStatusBarStyleDefault 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGProgressHUD-Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/JGProgressHUD-Tests.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/Launch Screen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Examples/JGProgressHUD-Tests/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JGProgressHUD Tests 4 | // 5 | // Created by Jonas Gessner on 20.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "JGAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([JGAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Examples/Screenshots/Presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/Examples/Screenshots/Presentation.png -------------------------------------------------------------------------------- /Examples/Screenshots/demo1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/Examples/Screenshots/demo1.gif -------------------------------------------------------------------------------- /Examples/Screenshots/demo2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/Examples/Screenshots/demo2.gif -------------------------------------------------------------------------------- /JGProgressHUD.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "JGProgressHUD" 4 | s.version = "2.2" 5 | s.summary = "Elegant and simple progress HUD for iOS and tvOS" 6 | s.homepage = "https://github.com/JonasGessner/JGProgressHUD" 7 | s.license = { :type => "MIT", :file => "LICENSE.txt" } 8 | s.author = "Jonas Gessner" 9 | s.social_media_url = "https://twitter.com/JonasGessner" 10 | s.platforms = { :ios => "8.0", :tvos => "9.0" } 11 | s.source = { :git => "https://github.com/JonasGessner/JGProgressHUD.git", :tag => "v2.2" } 12 | s.source_files = "JGProgressHUD/JGProgressHUD/**/*.{h,m}" 13 | s.frameworks = "Foundation", "UIKit", "QuartzCore" 14 | s.swift_version = "5.0" 15 | s.requires_arc = true 16 | 17 | end 18 | -------------------------------------------------------------------------------- /JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /JGProgressHUD.xcodeproj/xcshareddata/xcschemes/JGProgressHUD-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD-iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | JGProgressHUD 25 | 26 | 27 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @interface JGProgressHUD (Private) 13 | 14 | - (void)animationDidFinish:(BOOL)presenting; 15 | 16 | @end 17 | 18 | @interface JGProgressHUDAnimation () { 19 | BOOL _presenting; 20 | } 21 | 22 | @property (nonatomic, weak) JGProgressHUD *progressHUD; 23 | 24 | @end 25 | 26 | @implementation JGProgressHUDAnimation 27 | 28 | #pragma mark - Initializers 29 | 30 | + (instancetype)animation { 31 | return [[self alloc] init]; 32 | } 33 | 34 | #pragma mark - Public methods 35 | 36 | - (void)show { 37 | _presenting = YES; 38 | } 39 | 40 | - (void)hide { 41 | _presenting = NO; 42 | } 43 | 44 | - (void)animationFinished { 45 | [self.progressHUD animationDidFinish:_presenting]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDErrorIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDErrorIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDErrorIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | static UIBezierPath *errorBezierPath() { 13 | static UIBezierPath *path; 14 | 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | path = [UIBezierPath bezierPath]; 18 | [path moveToPoint:CGPointMake(3, 3)]; 19 | [path addLineToPoint:CGPointMake(30, 30)]; 20 | [path moveToPoint:CGPointMake(30, 3)]; 21 | [path addLineToPoint:CGPointMake(3, 30)]; 22 | 23 | [path setLineWidth:3]; 24 | [path setLineJoinStyle:kCGLineJoinRound]; 25 | [path setLineCapStyle:kCGLineCapRound]; 26 | }); 27 | 28 | return path; 29 | } 30 | 31 | @implementation JGProgressHUDErrorIndicatorView 32 | 33 | - (instancetype)initWithContentView:(UIView *__unused)contentView { 34 | UIBezierPath *path = errorBezierPath(); 35 | 36 | UIGraphicsBeginImageContextWithOptions(CGSizeMake(33, 33), NO, 0.0); 37 | [[UIColor blackColor] setStroke]; 38 | [path stroke]; 39 | 40 | UIImage *img = [UIGraphicsGetImageFromCurrentImageContext() imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 41 | 42 | UIGraphicsEndImageContext(); 43 | 44 | self = [super initWithImage:img]; 45 | 46 | return self; 47 | } 48 | 49 | - (instancetype)init { 50 | return [self initWithContentView:nil]; 51 | } 52 | 53 | - (void)updateAccessibility { 54 | self.accessibilityLabel = NSLocalizedString(@"Error",); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDFadeAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDFadeAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDFadeAnimation 13 | 14 | #pragma mark - Initializers 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | self.duration = 0.4; 20 | self.animationOptions = UIViewAnimationOptionCurveEaseInOut; 21 | } 22 | return self; 23 | } 24 | 25 | - (void)setAnimationOptions:(UIViewAnimationOptions)animationOptions { 26 | _animationOptions = (animationOptions | UIViewAnimationOptionBeginFromCurrentState); 27 | } 28 | 29 | #pragma mark - Showing 30 | 31 | - (void)show { 32 | [super show]; 33 | 34 | self.progressHUD.alpha = 0.0; 35 | self.progressHUD.hidden = NO; 36 | 37 | [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ 38 | self.progressHUD.alpha = 1.0; 39 | } completion:^(BOOL __unused finished) { 40 | [self animationFinished]; 41 | }]; 42 | } 43 | 44 | #pragma mark - Hiding 45 | 46 | - (void)hide { 47 | [super hide]; 48 | 49 | [UIView animateWithDuration:self.duration delay:0.0 options:self.animationOptions animations:^{ 50 | self.progressHUD.alpha = 0.0; 51 | } completion:^(BOOL __unused finished) { 52 | [self animationFinished]; 53 | }]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDFadeZoomAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeZoomAnimation.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDFadeZoomAnimation.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @implementation JGProgressHUDFadeZoomAnimation 13 | 14 | #pragma mark - Initializers 15 | 16 | - (instancetype)init { 17 | self = [super init]; 18 | if (self) { 19 | self.shrinkAnimationDuaration = 0.2; 20 | self.expandAnimationDuaration = 0.1; 21 | self.expandScale = CGSizeMake(1.1, 1.1); 22 | } 23 | return self; 24 | } 25 | 26 | #pragma mark - Showing 27 | 28 | - (void)show { 29 | [super show]; 30 | 31 | self.progressHUD.alpha = 0.0; 32 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(0.1, 0.1); 33 | 34 | NSTimeInterval totalDuration = self.expandAnimationDuaration+self.shrinkAnimationDuaration; 35 | 36 | self.progressHUD.hidden = NO; 37 | 38 | [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ 39 | self.progressHUD.alpha = 1.0; 40 | } completion:nil]; 41 | 42 | [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 43 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); 44 | } completion:^(BOOL __unused _finished) { 45 | [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 46 | self.progressHUD.HUDView.transform = CGAffineTransformIdentity; 47 | } completion:^(BOOL __unused __finished) { 48 | [self animationFinished]; 49 | }]; 50 | }]; 51 | } 52 | 53 | #pragma mark - Hiding 54 | 55 | - (void)hide { 56 | [super hide]; 57 | 58 | NSTimeInterval totalDuration = self.expandAnimationDuaration+self.shrinkAnimationDuaration; 59 | 60 | [UIView animateWithDuration:totalDuration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut) animations:^{ 61 | self.progressHUD.alpha = 0.0; 62 | } completion:nil]; 63 | 64 | [UIView animateWithDuration:self.expandAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 65 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(self.expandScale.width, self.expandScale.height); 66 | } completion:^(BOOL __unused _finished) { 67 | [UIView animateWithDuration:self.shrinkAnimationDuaration delay:0.0 options:(UIViewAnimationOptions)(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState) animations:^{ 68 | self.progressHUD.HUDView.transform = CGAffineTransformMakeScale(0.1, 0.1); 69 | } completion:^(BOOL __unused __finished) { 70 | self.progressHUD.HUDView.transform = CGAffineTransformIdentity; 71 | 72 | [self animationFinished]; 73 | }]; 74 | }]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDImageIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDImageIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 05.08.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDImageIndicatorView.h" 10 | 11 | @implementation JGProgressHUDImageIndicatorView { 12 | BOOL _customizedTintColor; 13 | } 14 | 15 | - (instancetype)initWithImage:(UIImage *)image { 16 | UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 17 | 18 | self = [super initWithContentView:imageView]; 19 | 20 | return self; 21 | } 22 | 23 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 24 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 25 | 26 | if (!_customizedTintColor) { 27 | if (style == JGProgressHUDStyleDark) { 28 | self.tintColor = [UIColor whiteColor]; 29 | } 30 | else { 31 | self.tintColor = [UIColor blackColor]; 32 | } 33 | _customizedTintColor = NO; 34 | } 35 | } 36 | 37 | - (void)setTintColor:(UIColor *)tintColor { 38 | [super setTintColor:tintColor]; 39 | _customizedTintColor = YES; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDIndeterminateIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndeterminateIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDIndeterminateIndicatorView.h" 10 | 11 | #ifndef __IPHONE_13_0 12 | #define __IPHONE_13_0 130000 13 | #endif 14 | 15 | @implementation JGProgressHUDIndeterminateIndicatorView 16 | 17 | - (instancetype)init { 18 | UIActivityIndicatorView *activityIndicatorView; 19 | 20 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0 21 | if (@available(iOS 13, tvOS 13, *)) { 22 | activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleLarge]; 23 | } 24 | else { 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 27 | activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 28 | #pragma clang diagnostic pop 29 | } 30 | #else 31 | activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 32 | #endif 33 | 34 | [activityIndicatorView startAnimating]; 35 | 36 | self = [super initWithContentView:activityIndicatorView]; 37 | return self; 38 | } 39 | 40 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 41 | return [self init]; 42 | } 43 | 44 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 45 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 46 | 47 | if (style != JGProgressHUDStyleDark) { 48 | self.color = [UIColor blackColor]; 49 | } 50 | else { 51 | self.color = [UIColor whiteColor]; 52 | } 53 | } 54 | 55 | - (void)setColor:(UIColor *)color { 56 | [(UIActivityIndicatorView *)self.contentView setColor:color]; 57 | } 58 | 59 | - (void)updateAccessibility { 60 | self.accessibilityLabel = NSLocalizedString(@"Indeterminate progress",); 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | @interface JGProgressHUDIndicatorView () { 13 | BOOL _accessibilityUpdateScheduled; 14 | } 15 | 16 | + (void)runBlock:(void (^)(void))block; 17 | 18 | @end 19 | 20 | static void runOnNextRunLoop(void (^block)(void)) { 21 | [[NSRunLoop currentRunLoop] performSelector:@selector(runBlock:) target:[JGProgressHUDIndicatorView class] argument:(id)block order:0 modes:@[NSRunLoopCommonModes]]; 22 | } 23 | 24 | @implementation JGProgressHUDIndicatorView 25 | 26 | #pragma mark - Initializers 27 | 28 | - (instancetype)initWithFrame:(CGRect __unused)frame { 29 | return [self init]; 30 | } 31 | 32 | - (instancetype)init { 33 | return [self initWithContentView:nil]; 34 | } 35 | 36 | - (instancetype)initWithContentView:(UIView *)contentView { 37 | self = [super initWithFrame:(contentView ? contentView.frame : CGRectMake(0.0, 0.0, 50.0, 50.0))]; 38 | if (self) { 39 | self.opaque = NO; 40 | self.backgroundColor = [UIColor clearColor]; 41 | 42 | self.isAccessibilityElement = YES; 43 | [self setNeedsAccessibilityUpdate]; 44 | 45 | if (contentView) { 46 | _contentView = contentView; 47 | 48 | [self addSubview:self.contentView]; 49 | } 50 | } 51 | return self; 52 | } 53 | 54 | #pragma mark - Setup 55 | 56 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled {} 57 | 58 | #pragma mark - Accessibility 59 | 60 | + (void)runBlock:(void (^)(void))block { 61 | if (block != nil) { 62 | block(); 63 | } 64 | } 65 | 66 | - (void)setNeedsAccessibilityUpdate { 67 | if (!_accessibilityUpdateScheduled) { 68 | _accessibilityUpdateScheduled = YES; 69 | 70 | runOnNextRunLoop(^{ 71 | [self updateAccessibilityIfNeeded]; 72 | }); 73 | } 74 | } 75 | 76 | - (void)updateAccessibilityIfNeeded { 77 | if (_accessibilityUpdateScheduled) { 78 | [self updateAccessibility]; 79 | _accessibilityUpdateScheduled = NO; 80 | } 81 | } 82 | 83 | - (void)updateAccessibility { 84 | self.accessibilityLabel = [NSLocalizedString(@"Loading",) stringByAppendingFormat:@" %.f %%", self.progress]; 85 | } 86 | 87 | #pragma mark - Getters & Setters 88 | 89 | - (void)setProgress:(float)progress { 90 | [self setProgress:progress animated:NO]; 91 | } 92 | 93 | - (void)setProgress:(float)progress animated:(__unused BOOL)animated { 94 | if (fequal(self.progress, progress)) { 95 | return; 96 | } 97 | 98 | _progress = progress; 99 | 100 | [self setNeedsAccessibilityUpdate]; 101 | } 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDPieIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDPieIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDPieIndicatorView.h" 10 | 11 | @interface JGProgressHUDPieIndicatorLayer : CALayer 12 | 13 | @property (nonatomic, assign) float progress; 14 | 15 | @property (nonatomic, weak) UIColor *color; 16 | 17 | @property (nonatomic, weak) UIColor *fillColor; 18 | 19 | @end 20 | 21 | @implementation JGProgressHUDPieIndicatorLayer 22 | 23 | @dynamic progress, color, fillColor; 24 | 25 | + (BOOL)needsDisplayForKey:(NSString *)key { 26 | return ([key isEqualToString:@"progress"] || [key isEqualToString:@"color"] || [key isEqualToString:@"fillColor"] || [super needsDisplayForKey:key]); 27 | } 28 | 29 | - (id )actionForKey:(NSString *)key { 30 | if ([key isEqualToString:@"progress"]) { 31 | CABasicAnimation *progressAnimation = [CABasicAnimation animation]; 32 | progressAnimation.fromValue = [self.presentationLayer valueForKey:key]; 33 | 34 | progressAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 35 | 36 | return progressAnimation; 37 | } 38 | 39 | return [super actionForKey:key]; 40 | } 41 | 42 | - (void)drawInContext:(CGContextRef)ctx { 43 | UIGraphicsPushContext(ctx); 44 | 45 | CGRect rect = self.bounds; 46 | 47 | CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.width/2.0), rect.origin.y + (CGFloat)floor(rect.size.height/2.0)); 48 | CGFloat lineWidth = 2.0; 49 | CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0)-lineWidth; 50 | 51 | UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0 endAngle:2.0*(CGFloat)M_PI clockwise:NO]; 52 | 53 | [borderPath setLineWidth:lineWidth]; 54 | 55 | if (self.fillColor) { 56 | [self.fillColor setFill]; 57 | 58 | [borderPath fill]; 59 | } 60 | 61 | [self.color set]; 62 | 63 | [borderPath stroke]; 64 | 65 | if (self.progress > 0.0) { 66 | UIBezierPath *processPath = [UIBezierPath bezierPath]; 67 | 68 | [processPath setLineWidth:radius]; 69 | 70 | CGFloat startAngle = -((CGFloat)M_PI/2.0); 71 | CGFloat endAngle = startAngle + 2.0 * (CGFloat)M_PI * self.progress; 72 | 73 | [processPath addArcWithCenter:center radius:radius/2.0 startAngle:startAngle endAngle:endAngle clockwise:YES]; 74 | 75 | [processPath stroke]; 76 | } 77 | 78 | UIGraphicsPopContext(); 79 | } 80 | 81 | @end 82 | 83 | 84 | @implementation JGProgressHUDPieIndicatorView 85 | 86 | #pragma mark - Initializers 87 | 88 | - (instancetype)init { 89 | self = [super initWithContentView:nil]; 90 | 91 | if (self) { 92 | self.layer.contentsScale = [UIScreen mainScreen].scale; 93 | [self.layer setNeedsDisplay]; 94 | 95 | self.color = [UIColor clearColor]; 96 | self.fillColor = [UIColor clearColor]; 97 | } 98 | 99 | return self; 100 | } 101 | 102 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 103 | return [self init]; 104 | } 105 | 106 | - (instancetype)initWithContentView:(UIView *)contentView { 107 | return [self init]; 108 | } 109 | 110 | #pragma mark - Getters & Setters 111 | 112 | - (void)setColor:(UIColor *)tintColor { 113 | if ([tintColor isEqual:self.color]) { 114 | return; 115 | } 116 | 117 | _color = tintColor; 118 | 119 | [(JGProgressHUDPieIndicatorLayer *)self.layer setColor:self.color]; 120 | } 121 | 122 | - (void)setFillColor:(UIColor *)fillColor { 123 | if ([fillColor isEqual:self.fillColor]) { 124 | return; 125 | } 126 | 127 | _fillColor = fillColor; 128 | 129 | [(JGProgressHUDPieIndicatorLayer *)self.layer setFillColor:self.fillColor]; 130 | } 131 | 132 | - (void)setProgress:(float)progress animated:(BOOL)animated { 133 | if (fequal(self.progress, progress)) { 134 | return; 135 | } 136 | 137 | [super setProgress:progress animated:animated]; 138 | 139 | [CATransaction begin]; 140 | [CATransaction setAnimationDuration:(animated ? 0.3 : 0.0)]; 141 | 142 | [(JGProgressHUDPieIndicatorLayer *)self.layer setProgress:progress]; 143 | 144 | [CATransaction commit]; 145 | } 146 | 147 | #pragma mark - Overrides 148 | 149 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 150 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 151 | 152 | if (style == JGProgressHUDStyleDark) { 153 | self.color = [UIColor colorWithWhite:1.0 alpha:1.0]; 154 | self.fillColor = [UIColor colorWithWhite:0.2 alpha:1.0]; 155 | } 156 | else { 157 | self.color = [UIColor blackColor]; 158 | if (style == JGProgressHUDStyleLight) { 159 | self.fillColor = [UIColor colorWithWhite:0.85 alpha:1.0]; 160 | } 161 | else { 162 | self.fillColor = [UIColor colorWithWhite:0.9 alpha:1.0]; 163 | } 164 | } 165 | } 166 | 167 | + (Class)layerClass { 168 | return [JGProgressHUDPieIndicatorLayer class]; 169 | } 170 | 171 | @end 172 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDRingIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDRingIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDRingIndicatorView.h" 10 | 11 | 12 | @interface JGProgressHUDRingIndicatorLayer : CALayer 13 | 14 | @property (nonatomic, assign) float progress; 15 | 16 | @property (nonatomic, weak) UIColor *ringColor; 17 | @property (nonatomic, weak) UIColor *ringBackgroundColor; 18 | 19 | @property (nonatomic, assign) BOOL roundProgressLine; 20 | 21 | @property (nonatomic, assign) CGFloat ringWidth; 22 | 23 | @end 24 | 25 | @implementation JGProgressHUDRingIndicatorLayer 26 | 27 | @dynamic progress, ringBackgroundColor, ringColor, ringWidth, roundProgressLine; 28 | 29 | + (BOOL)needsDisplayForKey:(NSString *)key { 30 | return ([key isEqualToString:@"progress"] || [key isEqualToString:@"ringColor"] || [key isEqualToString:@"ringBackgroundColor"] || [key isEqualToString:@"roundProgressLine"] || [key isEqualToString:@"ringWidth"] || [super needsDisplayForKey:key]); 31 | } 32 | 33 | - (id )actionForKey:(NSString *)key { 34 | if ([key isEqualToString:@"progress"]) { 35 | CABasicAnimation *progressAnimation = [CABasicAnimation animation]; 36 | progressAnimation.fromValue = [self.presentationLayer valueForKey:key]; 37 | 38 | progressAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 39 | 40 | return progressAnimation; 41 | } 42 | 43 | return [super actionForKey:key]; 44 | } 45 | 46 | - (void)drawInContext:(CGContextRef)ctx { 47 | UIGraphicsPushContext(ctx); 48 | 49 | CGRect rect = self.bounds; 50 | 51 | CGPoint center = CGPointMake(rect.origin.x + (CGFloat)floor(rect.size.width/2.0), rect.origin.y + (CGFloat)floor(rect.size.height/2.0)); 52 | CGFloat lineWidth = self.ringWidth; 53 | CGFloat radius = (CGFloat)floor(MIN(rect.size.width, rect.size.height)/2.0) - lineWidth; 54 | 55 | //Background 56 | [self.ringBackgroundColor setStroke]; 57 | 58 | UIBezierPath *borderPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:0.0 endAngle:2.0*(CGFloat)M_PI clockwise:NO]; 59 | 60 | [borderPath setLineWidth:lineWidth]; 61 | [borderPath stroke]; 62 | 63 | //Progress 64 | [self.ringColor setStroke]; 65 | 66 | if (self.progress > 0.0) { 67 | UIBezierPath *processPath = [UIBezierPath bezierPath]; 68 | 69 | [processPath setLineWidth:lineWidth]; 70 | [processPath setLineCapStyle:(self.roundProgressLine ? kCGLineCapRound : kCGLineCapSquare)]; 71 | 72 | CGFloat startAngle = -((CGFloat)M_PI / 2.0); 73 | CGFloat endAngle = startAngle + 2.0 * (CGFloat)M_PI * self.progress; 74 | 75 | [processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES]; 76 | 77 | [processPath stroke]; 78 | } 79 | 80 | UIGraphicsPopContext(); 81 | } 82 | 83 | @end 84 | 85 | 86 | @implementation JGProgressHUDRingIndicatorView 87 | 88 | #pragma mark - Initializers 89 | 90 | - (instancetype)init { 91 | self = [super initWithContentView:nil];; 92 | 93 | if (self) { 94 | self.layer.contentsScale = [UIScreen mainScreen].scale; 95 | [self.layer setNeedsDisplay]; 96 | 97 | self.ringWidth = 3.0; 98 | self.ringColor = [UIColor clearColor]; 99 | self.ringBackgroundColor = [UIColor clearColor]; 100 | } 101 | 102 | return self; 103 | } 104 | 105 | - (instancetype)initWithHUDStyle:(JGProgressHUDStyle)style { 106 | return [self init]; 107 | } 108 | 109 | - (instancetype)initWithContentView:(UIView *)contentView { 110 | return [self init]; 111 | } 112 | 113 | #pragma mark - Getters & Setters 114 | 115 | - (void)setRoundProgressLine:(BOOL)roundProgressLine { 116 | if (roundProgressLine == self.roundProgressLine) { 117 | return; 118 | } 119 | 120 | _roundProgressLine = roundProgressLine; 121 | 122 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRoundProgressLine:self.roundProgressLine]; 123 | } 124 | 125 | - (void)setRingColor:(UIColor *)tintColor { 126 | if ([tintColor isEqual:self.ringColor]) { 127 | return; 128 | } 129 | 130 | _ringColor = tintColor; 131 | 132 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingColor:self.ringColor]; 133 | } 134 | 135 | - (void)setRingBackgroundColor:(UIColor *)backgroundTintColor { 136 | if ([backgroundTintColor isEqual:self.ringBackgroundColor]) { 137 | return; 138 | } 139 | 140 | _ringBackgroundColor = backgroundTintColor; 141 | 142 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingBackgroundColor:self.ringBackgroundColor]; 143 | } 144 | 145 | - (void)setRingWidth:(CGFloat)ringWidth { 146 | if (fequal(ringWidth, self.ringWidth)) { 147 | return; 148 | } 149 | 150 | _ringWidth = ringWidth; 151 | 152 | [(JGProgressHUDRingIndicatorLayer *)self.layer setRingWidth:self.ringWidth]; 153 | } 154 | 155 | - (void)setProgress:(float)progress animated:(BOOL)animated { 156 | if (fequal(self.progress, progress)) { 157 | return; 158 | } 159 | 160 | [super setProgress:progress animated:animated]; 161 | 162 | [CATransaction begin]; 163 | [CATransaction setAnimationDuration:(animated ? 0.3 : 0.0)]; 164 | 165 | [(JGProgressHUDRingIndicatorLayer *)self.layer setProgress:self.progress]; 166 | 167 | [CATransaction commit]; 168 | } 169 | 170 | #pragma mark - Overrides 171 | 172 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled { 173 | [super setUpForHUDStyle:style vibrancyEnabled:vibrancyEnabled]; 174 | 175 | if (style == JGProgressHUDStyleDark) { 176 | self.ringColor = [UIColor colorWithWhite:1.0 alpha:1.0]; 177 | self.ringBackgroundColor = [UIColor colorWithWhite:0.0 alpha:1.0]; 178 | } 179 | else { 180 | self.ringColor = [UIColor blackColor]; 181 | if (style == JGProgressHUDStyleLight) { 182 | self.ringBackgroundColor = [UIColor colorWithWhite:0.85 alpha:1.0]; 183 | } 184 | else { 185 | self.ringBackgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0]; 186 | } 187 | } 188 | } 189 | 190 | + (Class)layerClass { 191 | return [JGProgressHUDRingIndicatorLayer class]; 192 | } 193 | 194 | @end 195 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDShadow.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDShadow.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDShadow.h" 10 | 11 | @implementation JGProgressHUDShadow 12 | 13 | + (instancetype)shadowWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity { 14 | return [[self alloc] initWithColor:color offset:offset radius:radius opacity:opacity]; 15 | } 16 | 17 | - (instancetype)initWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity { 18 | self = [super init]; 19 | 20 | if (self) { 21 | _color = color; 22 | _offset = offset; 23 | _radius = radius; 24 | _opacity = opacity; 25 | } 26 | 27 | return self; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/JGProgressHUDSuccessIndicatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDSuccessIndicatorView.m 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import "JGProgressHUDSuccessIndicatorView.h" 10 | #import "JGProgressHUD.h" 11 | 12 | static UIBezierPath *successBezierPath() { 13 | static UIBezierPath *path; 14 | 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | path = [UIBezierPath bezierPath]; 18 | [path moveToPoint:CGPointMake(1.5, 18)]; 19 | [path addLineToPoint:CGPointMake(11, 28)]; 20 | [path addLineToPoint:CGPointMake(31.5, 5.5)]; 21 | 22 | [path setLineWidth:3]; 23 | [path setLineJoinStyle:kCGLineJoinRound]; 24 | [path setLineCapStyle:kCGLineCapRound]; 25 | }); 26 | 27 | return path; 28 | } 29 | 30 | @implementation JGProgressHUDSuccessIndicatorView 31 | 32 | - (instancetype)initWithContentView:(UIView *__unused)contentView { 33 | UIBezierPath *path = successBezierPath(); 34 | 35 | UIGraphicsBeginImageContextWithOptions(CGSizeMake(33, 33), NO, 0.0); 36 | [[UIColor blackColor] setStroke]; 37 | [path stroke]; 38 | 39 | UIImage *img = [UIGraphicsGetImageFromCurrentImageContext() imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 40 | 41 | UIGraphicsEndImageContext(); 42 | 43 | self = [super initWithImage:img]; 44 | 45 | return self; 46 | } 47 | 48 | - (instancetype)init { 49 | return [self initWithContentView:nil]; 50 | } 51 | 52 | - (void)updateAccessibility { 53 | self.accessibilityLabel = NSLocalizedString(@"Success",); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUD-Defines.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUD-Defines.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 28.04.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | Positions of the HUD. 13 | */ 14 | typedef NS_ENUM(NSUInteger, JGProgressHUDPosition) { 15 | /** Center position. */ 16 | JGProgressHUDPositionCenter = 0, 17 | /** Top left position. */ 18 | JGProgressHUDPositionTopLeft, 19 | /** Top center position. */ 20 | JGProgressHUDPositionTopCenter, 21 | /** Top right position. */ 22 | JGProgressHUDPositionTopRight, 23 | /** Center left position. */ 24 | JGProgressHUDPositionCenterLeft, 25 | /** Center right position. */ 26 | JGProgressHUDPositionCenterRight, 27 | /** Bottom left position. */ 28 | JGProgressHUDPositionBottomLeft, 29 | /** Bottom center position. */ 30 | JGProgressHUDPositionBottomCenter, 31 | /** Bottom right position. */ 32 | JGProgressHUDPositionBottomRight 33 | }; 34 | 35 | /** 36 | Appearance styles of the HUD. 37 | */ 38 | typedef NS_ENUM(NSUInteger, JGProgressHUDStyle) { 39 | /** Extra light HUD with dark elements. */ 40 | JGProgressHUDStyleExtraLight = 0, 41 | /** Light HUD with dark elemets. */ 42 | JGProgressHUDStyleLight, 43 | /** Dark HUD with light elements. */ 44 | JGProgressHUDStyleDark, 45 | }; 46 | 47 | #if TARGET_OS_IOS 48 | /** 49 | Interaction types. 50 | */ 51 | typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) { 52 | /** Block all touches. No interaction behin the HUD is possible. */ 53 | JGProgressHUDInteractionTypeBlockAllTouches = 0, 54 | /** Block touches on the HUD view. */ 55 | JGProgressHUDInteractionTypeBlockTouchesOnHUDView, 56 | /** Block no touches. */ 57 | JGProgressHUDInteractionTypeBlockNoTouches 58 | }; 59 | #endif 60 | 61 | /** 62 | Parallax Modes. 63 | */ 64 | typedef NS_ENUM(NSUInteger, JGProgressHUDParallaxMode) { 65 | /** Follows the device setting for parallax. If "Reduce Motion" is enabled, no parallax effect is added to the HUD, if "Reduce Motion" is disabled the HUD will have a parallax effect. This behaviour is only supported on iOS 8 and higher. */ 66 | JGProgressHUDParallaxModeDevice = 0, 67 | /** Always adds a parallax effect to the HUD. Parallax is only supported on iOS 7 and higher. */ 68 | JGProgressHUDParallaxModeAlwaysOn, 69 | /** Never adds a parallax effect to the HUD. */ 70 | JGProgressHUDParallaxModeAlwaysOff 71 | }; 72 | 73 | #ifndef fequal 74 | /** 75 | Macro for safe floating point comparison (for internal use in JGProgressHUD). 76 | */ 77 | #define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON) 78 | #endif 79 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class JGProgressHUD; 13 | 14 | /** 15 | You may subclass this class to create a custom progress indicator view. 16 | */ 17 | @interface JGProgressHUDAnimation : NSObject 18 | 19 | /** Convenience initializer. */ 20 | + (instancetype __nonnull)animation; 21 | 22 | /** The HUD using this animation. */ 23 | @property (nonatomic, weak, readonly, nullable) JGProgressHUD *progressHUD; 24 | 25 | /** 26 | The @c progressHUD is hidden from screen with @c alpha = 1 and @c hidden = @c YES. Ideally, you should prepare the HUD for presentation, then set @c hidden to @c NO on the @c progressHUD and then perform the animation. 27 | @post Call @c animationFinished. 28 | */ 29 | - (void)show NS_REQUIRES_SUPER; 30 | 31 | /** 32 | The @c progressHUD wis visible on screen with @c alpha = 1 and @c hidden = @c NO. You should only perform the animation in this method, the @c progressHUD itself will take care of hiding itself and removing itself from superview. 33 | @post Call @c animationFinished. 34 | */ 35 | - (void)hide NS_REQUIRES_SUPER; 36 | 37 | /** 38 | @pre This method should only be called at the end of a @c show or @c hide animaiton. 39 | @attention ALWAYS call this method after completing a @c show or @c hide animation. 40 | */ 41 | - (void)animationFinished NS_REQUIRES_SUPER; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDErrorIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDErrorIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDImageIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | An image indicator showing a cross, representing a failed operation. 16 | */ 17 | @interface JGProgressHUDErrorIndicatorView : JGProgressHUDImageIndicatorView 18 | 19 | /** 20 | Default initializer for this class. 21 | */ 22 | - (instancetype __nonnull)init; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDFadeAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDAnimation.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | A simple fade animation that fades the HUD from alpha @c 0.0 to alpha @c 1.0. 16 | */ 17 | @interface JGProgressHUDFadeAnimation : JGProgressHUDAnimation 18 | 19 | /** 20 | Duration of the animation. 21 | 22 | @b Default: 0.4. 23 | */ 24 | @property (nonatomic, assign) NSTimeInterval duration; 25 | 26 | /** 27 | Animation options 28 | 29 | @b Default: UIViewAnimationOptionCurveEaseInOut. 30 | */ 31 | @property (nonatomic, assign) UIViewAnimationOptions animationOptions; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDFadeZoomAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDFadeZoomAnimation.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDAnimation.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | An animation that fades in the HUD and expands the HUD from scale @c (0, 0) to a customizable scale, and finally to scale @c (1, 1), creating a bouncing effect. 16 | */ 17 | @interface JGProgressHUDFadeZoomAnimation : JGProgressHUDAnimation 18 | 19 | /** 20 | Duration of the animation from or to the shrinked state. 21 | 22 | @b Default: 0.2. 23 | */ 24 | @property (nonatomic, assign) NSTimeInterval shrinkAnimationDuaration; 25 | 26 | /** 27 | Duration of the animation from or to the expanded state. 28 | 29 | @b Default: 0.1. 30 | */ 31 | @property (nonatomic, assign) NSTimeInterval expandAnimationDuaration; 32 | 33 | /** 34 | The scale to apply to the HUD when expanding. 35 | 36 | @b Default: (1.1, 1.1). 37 | */ 38 | @property (nonatomic, assign) CGSize expandScale; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDImageIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDImageIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 05.08.15. 6 | // Copyright (c) 2015 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | An indicator for displaying custom images. Supports animated images. 16 | 17 | You may subclass this class to create a custom image indicator view. 18 | */ 19 | @interface JGProgressHUDImageIndicatorView : JGProgressHUDIndicatorView 20 | 21 | /** 22 | Initializes the indicator view with an UIImageView showing the @c image. 23 | 24 | @param image The image to show in the indicator view. 25 | */ 26 | - (instancetype __nonnull)initWithImage:(UIImage *__nonnull)image; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDIndeterminateIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndeterminateIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | An indeterminate progress indicator showing a @c UIActivityIndicatorView. 16 | */ 17 | @interface JGProgressHUDIndeterminateIndicatorView : JGProgressHUDIndicatorView 18 | 19 | /** 20 | Set the color of the activity indicator view. 21 | @param color The color to apply to the activity indicator view. 22 | */ 23 | - (void)setColor:(UIColor *__nonnull)color; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #pragma clang diagnostic push 13 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 14 | #import "JGProgressHUD-Defines.h" 15 | #pragma clang diagnostic pop 16 | 17 | /** You may subclass this class to create a custom progress indicator view. */ 18 | @interface JGProgressHUDIndicatorView : UIView 19 | 20 | /** 21 | Designated initializer for this class. 22 | 23 | @param contentView The content view to place on the container view (the container is the JGProgressHUDIndicatorView). 24 | */ 25 | - (instancetype __nonnull)initWithContentView:(UIView *__nullable)contentView; 26 | 27 | /** Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD's @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing. */ 28 | - (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled; 29 | 30 | /** Ranges from 0.0 to 1.0. */ 31 | @property (nonatomic, assign) float progress; 32 | 33 | /** 34 | Adjusts the current progress shown by the receiver, optionally animating the change. 35 | 36 | The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits. 37 | 38 | @param progress The new progress value. 39 | @param animated YES if the change should be animated, NO if the change should happen immediately. 40 | */ 41 | - (void)setProgress:(float)progress animated:(BOOL)animated; 42 | 43 | /** 44 | The content view which displays the progress. 45 | */ 46 | @property (nonatomic, strong, readonly, nullable) UIView *contentView; 47 | 48 | /** Schedules an accessibility update on the next run loop. */ 49 | - (void)setNeedsAccessibilityUpdate; 50 | 51 | /** 52 | Runs @c updateAccessibility immediately if an accessibility update has been scheduled (through @c setNeedsAccessibilityUpdate) but has not executed yet. 53 | */ 54 | - (void)updateAccessibilityIfNeeded; 55 | 56 | /** 57 | Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate. 58 | */ 59 | - (void)updateAccessibility; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDPieIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDPieIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.07.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | A pie shaped determinate progress indicator. 16 | */ 17 | @interface JGProgressHUDPieIndicatorView : JGProgressHUDIndicatorView 18 | 19 | /** 20 | Tint color of the Pie. 21 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 22 | 23 | @b Default: White for JGProgressHUDStyleDark, otherwise black. 24 | */ 25 | @property (nonatomic, strong, nonnull) UIColor *color; 26 | 27 | /** 28 | The background fill color inside the pie. 29 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 30 | 31 | @b Default: Dark gray for JGProgressHUDStyleDark, otherwise light gray. 32 | */ 33 | @property (nonatomic, strong, nonnull) UIColor *fillColor; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDRingIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDRingIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 20.7.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | A ring shaped determinate progress indicator. 16 | */ 17 | @interface JGProgressHUDRingIndicatorView : JGProgressHUDIndicatorView 18 | 19 | /** 20 | Background color of the ring. 21 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 22 | 23 | @b Default: Black for JGProgressHUDStyleDark, light gray otherwise. 24 | */ 25 | @property (nonatomic, strong, nonnull) UIColor *ringBackgroundColor; 26 | 27 | /** 28 | Progress color of the progress ring. 29 | @attention Custom values need to be set after assigning the indicator view to @c JGProgressHUD's @c indicatorView property. 30 | 31 | @b Default: White for JGProgressHUDStyleDark, otherwise black. 32 | */ 33 | @property (nonatomic, strong, nonnull) UIColor *ringColor; 34 | 35 | /** 36 | Sets if the progress ring should have a rounded line cap. 37 | 38 | @b Default: NO. 39 | */ 40 | @property (nonatomic, assign) BOOL roundProgressLine; 41 | 42 | /** 43 | Width of the ring. 44 | 45 | @b Default: 3.0. 46 | */ 47 | @property (nonatomic, assign) CGFloat ringWidth; 48 | 49 | @end 50 | 51 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDShadow.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDShadow.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 25.09.17. 6 | // Copyright © 2017 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | A wrapper representing properties of a shadow. 13 | */ 14 | @interface JGProgressHUDShadow : NSObject 15 | 16 | - (instancetype __nonnull)initWithColor:(UIColor *__nonnull)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity; 17 | 18 | /** Convenience initializer. */ 19 | + (instancetype __nonnull)shadowWithColor:(UIColor *__nonnull)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity; 20 | 21 | /** 22 | The color of the shadow. Colors created from patterns are currently NOT supported. 23 | */ 24 | @property (nonatomic, strong, readonly, nonnull) UIColor *color; 25 | 26 | /** The shadow offset. */ 27 | @property (nonatomic, assign, readonly) CGSize offset; 28 | 29 | /** The blur radius used to create the shadow. */ 30 | @property (nonatomic, assign, readonly) CGFloat radius; 31 | 32 | /** 33 | The opacity of the shadow. Specifying a value outside the [0,1] range will give undefined results. 34 | */ 35 | @property (nonatomic, assign, readonly) float opacity; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/JGProgressHUDSuccessIndicatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JGProgressHUDSuccessIndicatorView.h 3 | // JGProgressHUD 4 | // 5 | // Created by Jonas Gessner on 19.08.14. 6 | // Copyright (c) 2014 Jonas Gessner. All rights reserved. 7 | // 8 | 9 | #pragma clang diagnostic push 10 | #pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" 11 | #import "JGProgressHUDImageIndicatorView.h" 12 | #pragma clang diagnostic pop 13 | 14 | /** 15 | An image indicator showing a checkmark, representing a failed operation. 16 | */ 17 | @interface JGProgressHUDSuccessIndicatorView : JGProgressHUDImageIndicatorView 18 | 19 | /** 20 | Default initializer for this class. 21 | */ 22 | - (instancetype __nonnull)init; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JGProgressHUD/JGProgressHUD/include/module.modulemap: -------------------------------------------------------------------------------- 1 | module JGProgressHUD { 2 | header "JGProgressHUD.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2018 Jonas Gessner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "JGProgressHUD", 6 | products: [ 7 | .library(name: "JGProgressHUD", targets: ["JGProgressHUD"]) 8 | ], 9 | targets: [ 10 | .target( 11 | name: "JGProgressHUD", 12 | path: "JGProgressHUD/JGProgressHUD" 13 | ) 14 | ] 15 | ) 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JGProgressHUD 2 | --------------- 3 | 4 | An elegant and simple progress HUD for iOS and tvOS. **Supports Swift and Objective-C!**
5 |

6 | 7 |

8 | 9 | Overview 10 | --------------- 11 | 12 | __The ultimate progress HUD for iOS and tvOS is here: JGProgressHUD!__ 13 | 14 | - Plug and play: Simple integration, easy to use, few lines of code required. 15 | - Easily customizable (custom animations, indicator views and more). 16 | - Uses `UIVisualEffectView` and `UIMotionEffect` for a native look. 17 | - Uses AutoLayout to provide a fully dynamic layout. 18 | - Detects and repositions when keyboard appears/disappears. 19 | - Dark mode support — automatically changes appearance. 20 | - Well documented and maintained. 21 | - Voice Over/`UIAccessibility` support. 22 | - Backward compatibility to iOS 8. 23 | - Can be used with Swift and Objective-C. 24 | - And most importantly, it looks good! 25 | 26 | Download the source code and open the Examples project to try JGProgressHUD and see all of its features in action! 27 | 28 | JGProgressHUD can also be used with SwiftUI. See [JGProgressHUD-SwiftUI](https://github.com/JonasGessner/JGProgressHUD-SwiftUI). 29 | 30 | [![GitHub license](https://img.shields.io/github/license/JonasGessner/JGProgressHUD.svg)](https://github.com/JonasGessner/JGProgressHUD/blob/master/LICENSE.txt) 31 | [![CocoaPods](https://img.shields.io/cocoapods/v/JGProgressHUD.svg)](https://cocoapods.org/pods/JGProgressHUD) 32 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 33 | [![Carthage compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen)](https://swift.org/package-manager) 34 | 35 | 36 | Examples 37 | -------------- 38 | 39 |

40 | 41 |             42 | 43 |

44 | 45 | #### Showing indeterminate progress: 46 | 47 | Objective-C: 48 | 49 | ```objc 50 | JGProgressHUD *HUD = [[JGProgressHUD alloc] init]; 51 | HUD.textLabel.text = @"Loading"; 52 | [HUD showInView:self.view]; 53 | [HUD dismissAfterDelay:3.0]; 54 | ``` 55 | 56 | Swift: 57 | 58 | ```swift 59 | let hud = JGProgressHUD() 60 | hud.textLabel.text = "Loading" 61 | hud.show(in: self.view) 62 | hud.dismiss(afterDelay: 3.0) 63 | ``` 64 | 65 | This displays a dark HUD with an activity indicator and the title "Loading". The HUD is presented with a fade animation and is dismissed after 3 seconds with a fade animation. 66 | 67 | #### Showing an error message: 68 | 69 | ```objc 70 | JGProgressHUD *HUD = [[JGProgressHUD alloc] init]; 71 | HUD.textLabel.text = @"Error"; 72 | HUD.indicatorView = [[JGProgressHUDErrorIndicatorView alloc] init]; //JGProgressHUDSuccessIndicatorView is also available 73 | [HUD showInView:self.view]; 74 | [HUD dismissAfterDelay:3.0]; 75 | ``` 76 | 77 | #### Showing determinate progress: 78 | 79 | ```objc 80 | JGProgressHUD *HUD = [[JGProgressHUD alloc] init]; 81 | HUD.indicatorView = [[JGProgressHUDPieIndicatorView alloc] init]; //Or JGProgressHUDRingIndicatorView 82 | HUD.progress = 0.5f; 83 | [HUD showInView:self.view]; 84 | [HUD dismissAfterDelay:3.0]; 85 | ``` 86 | 87 | __For more examples, including in Swift, see Examples.__ 88 | 89 | __Important:__ You should always show `JGProgressHUD` in a `UIViewController` view. 90 | 91 | Customization 92 | ----------- 93 | ### Styles: 94 | JGProgressHUD can be displayed in 3 styles: 95 | 96 | - __Extra Light__ 97 | - __Light__ 98 | - __Dark__ 99 | 100 | The style can also be set automatically according to the current `UITraitCollection` (dark mode). Use the initializer `[[JGProgressHUD alloc] init]`/`JGProgressHUD()` to take advantage of the automatic style. 101 | 102 | ### Indicator Views: 103 | By default a HUD will display an indeterminate progress indicator. The indicator view can be completely hidden by setting the `indicatorView` property to `nil`. These indicator views are available by default: 104 | 105 | - __Indeterminate progress indicator__ 106 | - __Pie progress indicator__ 107 | - __Ring progress indicator__ 108 | - __Success indicator__ 109 | - __Error indicator__ 110 | - __Image indicator__ 111 | 112 | Custom indicator views can be created by subclassing `JGProgressHUDIndicatorView`.
113 | 114 | 115 | ### Animations: 116 | By default a HUD will use a fade animation. Several parameters can be altered such as animation duration or animation curve. A HUD can be displayed without animation and different animations can be used. These animations are available by default: 117 | 118 | - __Fade__ 119 | - __Zoom and Fade__ 120 | 121 | Custom animations can be created by subclassing `JGProgressHUDAnimation`. 122 | 123 | To dim the content behind the HUD set your dim color as `backgroundColor` of your `JGProgressHUD` instance. 124 | 125 | Installation 126 | -------------- 127 | 128 | ### Swift Package Manager: 129 | 130 | In Xcode, use the menu File > Swift Packages > Add Package Dependency... and enter the package URL `https://github.com/JonasGessner/JGProgressHUD.git`. 131 | 132 | This is the recommended way of installing JGProgressHUD. 133 | 134 | ### Carthage: 135 | In your `Cartfile` add: 136 | 137 | ``` 138 | github "JonasGessner/JGProgressHUD" 139 | ``` 140 | 141 | ### CocoaPods: 142 | In your `Podfile` add: 143 | 144 | ``` 145 | pod 'JGProgressHUD' 146 | ``` 147 | 148 | ### Manual Installation: 149 | 150 | 1. Drag the `JGProgressHUD.xcodeproj` file into your Xcode project. 151 | 2. Add `JGProgressHUD.framework` to "Embedded Binaries" in the "General" tab of your target. 152 | 153 | ------- 154 | After installing import the module where you want to use it: 155 | 156 | ```objc 157 | @import JGProgressHUD; 158 | ``` 159 | 160 | Swift: 161 | 162 | ```swift 163 | import JGProgressHUD 164 | ``` 165 | 166 | See the Examples project for an example implementation of JGProgressHUD as framework. 167 | 168 | Requirements 169 | ------------ 170 | 171 | - Base SDK of iOS/tvOS/macCatalyst 13.0 or higher. 172 | - Deployment target of iOS 8.0, tvOS 9.0, macCatalyst 13.0, or higher. 173 | 174 | JGProgressHUD can also be used by projects written in Swift. See Installation for details. 175 | 176 | Documentation 177 | ---------------- 178 | Detailed documentation can be found on here.

179 | Each class and method is well documented, making it easy to quickly get a good overview. To start, see JGProgressHUD.h. 180 | 181 | License 182 | --------- 183 | MIT License.
184 | © 2014-2020, Jonas Gessner. 185 | 186 | Credits 187 | ---------- 188 | Created and maintained by Jonas Gessner, © 2014-2020.
189 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDErrorIndicatorView.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDErrorIndicatorView Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 79 | 80 |
81 |
82 |
83 |
84 |

JGProgressHUDErrorIndicatorView Class Reference

85 | 86 | 87 |
88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
Inherits fromJGProgressHUDImageIndicatorView : JGProgressHUDIndicatorView : UIView
Declared inJGProgressHUDErrorIndicatorView.h
JGProgressHUDErrorIndicatorView.m
96 | 97 | 98 | 99 | 100 |
101 | 102 |

Overview

103 |

An image indicator showing a cross, representing a failed operation.

104 |
105 | 106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
119 | 120 |

– initWithContentView: 121 |

122 | 123 |
124 |
125 | 126 |
127 | 128 | 129 |
130 |

Designated initializer for this class.

131 |
132 | 133 | 134 | 135 |
- (instancetype)initWithContentView:(UIView *__unused)contentView
136 | 137 | 138 | 139 |
140 |

Parameters

141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 |
contentView

The content view to place on the container view (the container is the JGProgressHUDIndicatorView).

149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 |
158 |

Discussion

159 |

Designated initializer for this class.

160 |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
169 |

Declared In

170 |

JGProgressHUDIndicatorView.h

171 |
172 | 173 | 174 |
175 |
176 |
177 | 178 |

– init 179 |

180 | 181 |
182 |
183 | 184 |
185 | 186 | 187 |
188 |

Default initializer for this class.

189 |
190 | 191 | 192 | 193 |
- (instancetype)init
194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 |
204 |

Discussion

205 |

Default initializer for this class.

206 |
207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 |
215 |

Declared In

216 |

JGProgressHUDErrorIndicatorView.h

217 |
218 | 219 | 220 |
221 |
222 |
223 | 224 |

– updateAccessibility 225 |

226 | 227 |
228 |
229 | 230 |
231 | 232 | 233 |
234 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

235 |
236 | 237 | 238 | 239 |
- (void)updateAccessibility
240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 |
250 |

Discussion

251 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

252 |
253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 |
261 |

Declared In

262 |

JGProgressHUDIndicatorView.h

263 |
264 | 265 | 266 |
267 |
268 |
269 |
270 | 271 |
272 | 273 | 274 | 275 | 276 | 277 | 278 |
279 | 280 |
281 | 289 |
290 |
291 |
292 |
293 | 294 | 295 | 296 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDFadeAnimation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDFadeAnimation Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 85 | 86 |
87 |
88 |
89 |
90 |

JGProgressHUDFadeAnimation Class Reference

91 | 92 | 93 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 |
Inherits fromJGProgressHUDAnimation : NSObject
Declared inJGProgressHUDFadeAnimation.h
JGProgressHUDFadeAnimation.m
102 | 103 | 104 | 105 | 106 |
107 | 108 |

Overview

109 |

A simple fade animation that fades the HUD from alpha @c 0.0 to alpha @c 1.0.

110 |
111 | 112 | 113 | 114 | 115 | 116 |
117 | 118 | 119 | 120 | 121 |

Other Methods

122 | 123 |
124 |
125 | 126 |

– show 127 |

128 | 129 |
130 |
131 | 132 |
133 | 134 | 135 |
136 |

The @c progressHUD is hidden from screen with @c alpha = 1 and @c hidden = @c YES. Ideally, you should prepare the HUD for presentation, then set @c hidden to @c NO on the @c progressHUD and then perform the animation. 137 | @post Call @c animationFinished.

138 |
139 | 140 | 141 | 142 |
- (void)show
143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
153 |

Discussion

154 |

The @c progressHUD is hidden from screen with @c alpha = 1 and @c hidden = @c YES. Ideally, you should prepare the HUD for presentation, then set @c hidden to @c NO on the @c progressHUD and then perform the animation. 155 | @post Call @c animationFinished.

156 |
157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 |
165 |

Declared In

166 |

JGProgressHUDAnimation.h

167 |
168 | 169 | 170 |
171 |
172 |
173 | 174 |

– hide 175 |

176 | 177 |
178 |
179 | 180 |
181 | 182 | 183 |
184 |

The @c progressHUD wis visible on screen with @c alpha = 1 and @c hidden = @c NO. You should only perform the animation in this method, the @c progressHUD itself will take care of hiding itself and removing itself from superview. 185 | @post Call @c animationFinished.

186 |
187 | 188 | 189 | 190 |
- (void)hide
191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 |
201 |

Discussion

202 |

The @c progressHUD wis visible on screen with @c alpha = 1 and @c hidden = @c NO. You should only perform the animation in this method, the @c progressHUD itself will take care of hiding itself and removing itself from superview. 203 | @post Call @c animationFinished.

204 |
205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 |
213 |

Declared In

214 |

JGProgressHUDAnimation.h

215 |
216 | 217 | 218 |
219 |
220 |
221 |
222 | 223 | 224 | 225 |

Other Methods

226 | 227 |
228 |
229 | 230 |

  duration 231 |

232 | 233 |
234 |
235 | 236 |
237 | 238 | 239 |
240 |

Duration of the animation.

241 |
242 | 243 | 244 | 245 |
@property (nonatomic, assign) NSTimeInterval duration
246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 |
256 |

Discussion

257 |

Duration of the animation.

258 | 259 |

@b Default: 0.4.

260 |
261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 |
269 |

Declared In

270 |

JGProgressHUDFadeAnimation.h

271 |
272 | 273 | 274 |
275 |
276 |
277 | 278 |

  animationOptions 279 |

280 | 281 |
282 |
283 | 284 |
285 | 286 | 287 |
288 |

Animation options

289 |
290 | 291 | 292 | 293 |
@property (nonatomic, assign) UIViewAnimationOptions animationOptions
294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 |
304 |

Discussion

305 |

Animation options

306 | 307 |

@b Default: UIViewAnimationOptionCurveEaseInOut.

308 |
309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 |
317 |

Declared In

318 |

JGProgressHUDFadeAnimation.h

319 |
320 | 321 | 322 |
323 |
324 |
325 |
326 | 327 |
328 | 329 | 330 | 331 | 332 | 333 | 334 |
335 | 336 |
337 | 345 |
346 |
347 |
348 |
349 | 350 | 351 | 352 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDImageIndicatorView.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDImageIndicatorView Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 77 | 78 |
79 |
80 |
81 |
82 |

JGProgressHUDImageIndicatorView Class Reference

83 | 84 | 85 |
86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 |
Inherits fromJGProgressHUDIndicatorView : UIView
Declared inJGProgressHUDImageIndicatorView.h
JGProgressHUDImageIndicatorView.m
94 | 95 | 96 | 97 | 98 |
99 | 100 |

Overview

101 |

An indicator for displaying custom images. Supports animated images.

102 | 103 |

You may subclass this class to create a custom image indicator view.

104 |
105 | 106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
119 | 120 |

– initWithImage: 121 |

122 | 123 |
124 |
125 | 126 |
127 | 128 | 129 |
130 |

Initializes the indicator view with an UIImageView showing the @c image.

131 |
132 | 133 | 134 | 135 |
- (instancetype)initWithImage:(UIImage *)image
136 | 137 | 138 | 139 |
140 |

Parameters

141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 |
image

The image to show in the indicator view.

149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 |
158 |

Discussion

159 |

Initializes the indicator view with an UIImageView showing the @c image.

160 |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
169 |

Declared In

170 |

JGProgressHUDImageIndicatorView.h

171 |
172 | 173 | 174 |
175 |
176 |
177 | 178 |

– setUpForHUDStyle:vibrancyEnabled: 179 |

180 | 181 |
182 |
183 | 184 |
185 | 186 | 187 |
188 |

Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD’s @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing.

189 |
190 | 191 | 192 | 193 |
- (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled
194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 |
204 |

Discussion

205 |

Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD’s @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing.

206 |
207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 |
215 |

Declared In

216 |

JGProgressHUDIndicatorView.h

217 |
218 | 219 | 220 |
221 |
222 |
223 |
224 | 225 |
226 | 227 | 228 | 229 | 230 | 231 | 232 |
233 | 234 |
235 | 243 |
244 |
245 |
246 |
247 | 248 | 249 | 250 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDIndeterminateIndicatorView.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDIndeterminateIndicatorView Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 79 | 80 |
81 |
82 |
83 |
84 |

JGProgressHUDIndeterminateIndicatorView Class Reference

85 | 86 | 87 |
88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
Inherits fromJGProgressHUDIndicatorView : UIView
Declared inJGProgressHUDIndeterminateIndicatorView.h
JGProgressHUDIndeterminateIndicatorView.m
96 | 97 | 98 | 99 | 100 |
101 | 102 |

Overview

103 |

An indeterminate progress indicator showing a @c UIActivityIndicatorView.

104 |
105 | 106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
119 | 120 |

– setUpForHUDStyle:vibrancyEnabled: 121 |

122 | 123 |
124 |
125 | 126 |
127 | 128 | 129 |
130 |

Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD’s @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing.

131 |
132 | 133 | 134 | 135 |
- (void)setUpForHUDStyle:(JGProgressHUDStyle)style vibrancyEnabled:(BOOL)vibrancyEnabled
136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 |
146 |

Discussion

147 |

Use this method to set up the indicator view to fit the HUD style and vibrancy setting. This method is called by @c JGProgressHUD when the indicator view is added to the HUD and when the HUD’s @c vibrancyEnabled property changes. This method may be called multiple times with different values. The default implementation does nothing.

148 |
149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 |
157 |

Declared In

158 |

JGProgressHUDIndicatorView.h

159 |
160 | 161 | 162 |
163 |
164 |
165 | 166 |

– setColor: 167 |

168 | 169 |
170 |
171 | 172 |
173 | 174 | 175 |
176 |

Set the color of the activity indicator view.

177 |
178 | 179 | 180 | 181 |
- (void)setColor:(UIColor *)color
182 | 183 | 184 | 185 |
186 |

Parameters

187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 |
color

The color to apply to the activity indicator view.

195 |
196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 |
204 |

Discussion

205 |

Set the color of the activity indicator view.

206 |
207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 |
215 |

Declared In

216 |

JGProgressHUDIndeterminateIndicatorView.h

217 |
218 | 219 | 220 |
221 |
222 |
223 | 224 |

– updateAccessibility 225 |

226 | 227 |
228 |
229 | 230 |
231 | 232 | 233 |
234 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

235 |
236 | 237 | 238 | 239 |
- (void)updateAccessibility
240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 |
250 |

Discussion

251 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

252 |
253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 |
261 |

Declared In

262 |

JGProgressHUDIndicatorView.h

263 |
264 | 265 | 266 |
267 |
268 |
269 |
270 | 271 |
272 | 273 | 274 | 275 | 276 | 277 | 278 |
279 | 280 |
281 | 289 |
290 |
291 |
292 |
293 | 294 | 295 | 296 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDShadow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDShadow Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 87 | 88 |
89 |
90 |
91 |
92 |

JGProgressHUDShadow Class Reference

93 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
Inherits fromNSObject
Declared inJGProgressHUDShadow.h
JGProgressHUDShadow.m
104 | 105 | 106 | 107 | 108 |
109 | 110 |

Overview

111 |

A wrapper representing properties of a shadow.

112 |
113 | 114 | 115 | 116 | 117 | 118 |
119 | 120 | 121 | 122 | 123 |

Other Methods

124 | 125 |
126 |
127 | 128 |

+ shadowWithColor:offset:radius:opacity: 129 |

130 | 131 |
132 |
133 | 134 |
135 | 136 | 137 |
138 |

Convenience initializer.

139 |
140 | 141 | 142 | 143 |
+ (instancetype)shadowWithColor:(UIColor *)color offset:(CGSize)offset radius:(CGFloat)radius opacity:(float)opacity
144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 |
154 |

Discussion

155 |

Convenience initializer.

156 |
157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 |
165 |

Declared In

166 |

JGProgressHUDShadow.h

167 |
168 | 169 | 170 |
171 |
172 |
173 |
174 | 175 | 176 | 177 |

Other Methods

178 | 179 |
180 |
181 | 182 |

  color 183 |

184 | 185 |
186 |
187 | 188 |
189 | 190 | 191 |
192 |

The color of the shadow. Colors created from patterns are currently NOT supported.

193 |
194 | 195 | 196 | 197 |
@property (nonatomic, strong, readonly, nonnull) UIColor *color
198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 |
208 |

Discussion

209 |

The color of the shadow. Colors created from patterns are currently NOT supported.

210 |
211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 |
219 |

Declared In

220 |

JGProgressHUDShadow.h

221 |
222 | 223 | 224 |
225 |
226 |
227 | 228 |

  offset 229 |

230 | 231 |
232 |
233 | 234 |
235 | 236 | 237 |
238 |

The shadow offset.

239 |
240 | 241 | 242 | 243 |
@property (nonatomic, assign, readonly) CGSize offset
244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 |
254 |

Discussion

255 |

The shadow offset.

256 |
257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 |
265 |

Declared In

266 |

JGProgressHUDShadow.h

267 |
268 | 269 | 270 |
271 |
272 |
273 | 274 |

  radius 275 |

276 | 277 |
278 |
279 | 280 |
281 | 282 | 283 |
284 |

The blur radius used to create the shadow.

285 |
286 | 287 | 288 | 289 |
@property (nonatomic, assign, readonly) CGFloat radius
290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 |
300 |

Discussion

301 |

The blur radius used to create the shadow.

302 |
303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 |
311 |

Declared In

312 |

JGProgressHUDShadow.h

313 |
314 | 315 | 316 |
317 |
318 |
319 | 320 |

  opacity 321 |

322 | 323 |
324 |
325 | 326 |
327 | 328 | 329 |
330 |

The opacity of the shadow. Specifying a value outside the [0,1] range will give undefined results.

331 |
332 | 333 | 334 | 335 |
@property (nonatomic, assign, readonly) float opacity
336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 |
346 |

Discussion

347 |

The opacity of the shadow. Specifying a value outside the [0,1] range will give undefined results.

348 |
349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 |
357 |

Declared In

358 |

JGProgressHUDShadow.h

359 |
360 | 361 | 362 |
363 |
364 |
365 |
366 | 367 |
368 | 369 | 370 | 371 | 372 | 373 | 374 |
375 | 376 |
377 | 385 |
386 |
387 |
388 |
389 | 390 | 391 | 392 | -------------------------------------------------------------------------------- /docs/Classes/JGProgressHUDSuccessIndicatorView.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDSuccessIndicatorView Class Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 79 | 80 |
81 |
82 |
83 |
84 |

JGProgressHUDSuccessIndicatorView Class Reference

85 | 86 | 87 |
88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
Inherits fromJGProgressHUDImageIndicatorView : JGProgressHUDIndicatorView : UIView
Declared inJGProgressHUDSuccessIndicatorView.h
JGProgressHUDSuccessIndicatorView.m
96 | 97 | 98 | 99 | 100 |
101 | 102 |

Overview

103 |

An image indicator showing a checkmark, representing a failed operation.

104 |
105 | 106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 |
118 |
119 | 120 |

– initWithContentView: 121 |

122 | 123 |
124 |
125 | 126 |
127 | 128 | 129 |
130 |

Designated initializer for this class.

131 |
132 | 133 | 134 | 135 |
- (instancetype)initWithContentView:(UIView *__unused)contentView
136 | 137 | 138 | 139 |
140 |

Parameters

141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 |
contentView

The content view to place on the container view (the container is the JGProgressHUDIndicatorView).

149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 |
158 |

Discussion

159 |

Designated initializer for this class.

160 |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 |
169 |

Declared In

170 |

JGProgressHUDIndicatorView.h

171 |
172 | 173 | 174 |
175 |
176 |
177 | 178 |

– init 179 |

180 | 181 |
182 |
183 | 184 |
185 | 186 | 187 |
188 |

Default initializer for this class.

189 |
190 | 191 | 192 | 193 |
- (instancetype)init
194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 |
204 |

Discussion

205 |

Default initializer for this class.

206 |
207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 |
215 |

Declared In

216 |

JGProgressHUDSuccessIndicatorView.h

217 |
218 | 219 | 220 |
221 |
222 |
223 | 224 |

– updateAccessibility 225 |

226 | 227 |
228 |
229 | 230 |
231 | 232 | 233 |
234 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

235 |
236 | 237 | 238 | 239 |
- (void)updateAccessibility
240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 |
250 |

Discussion

251 |

Override to set custom accessibility properties. This method gets called once when initializing the view and after calling @c setNeedsAccessibilityUpdate.

252 |
253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 |
261 |

Declared In

262 |

JGProgressHUDIndicatorView.h

263 |
264 | 265 | 266 |
267 |
268 |
269 |
270 | 271 |
272 | 273 | 274 | 275 | 276 | 277 | 278 |
279 | 280 |
281 | 289 |
290 |
291 |
292 |
293 | 294 | 295 | 296 | -------------------------------------------------------------------------------- /docs/Constants/JGProgressHUDInteractionType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDInteractionType Constants Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

JGProgressHUDInteractionType Constants Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inJGProgressHUD-Defines.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

JGProgressHUDInteractionType

79 | 80 | 81 |
82 |

Interaction types.

83 |
84 | 85 | 86 |
87 | 88 | 89 |

Definition

90 | typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType ) {
91 | 92 |    JGProgressHUDInteractionTypeBlockAllTouches = 0,
93 | 94 |    JGProgressHUDInteractionTypeBlockTouchesOnHUDView,
95 | 96 |    JGProgressHUDInteractionTypeBlockNoTouches,
97 | 98 | };
99 | 100 |
101 | 102 |
103 |

Constants

104 |
105 | 106 |
JGProgressHUDInteractionTypeBlockAllTouches
107 |
108 | 109 | 110 |

Block all touches. No interaction behin the HUD is possible.

111 | 112 | 113 | 114 | 115 | 116 | 117 |

118 | Declared In JGProgressHUD-Defines.h. 119 |

120 | 121 |
122 | 123 |
JGProgressHUDInteractionTypeBlockTouchesOnHUDView
124 |
125 | 126 | 127 |

Block touches on the HUD view.

128 | 129 | 130 | 131 | 132 | 133 | 134 |

135 | Declared In JGProgressHUD-Defines.h. 136 |

137 | 138 |
139 | 140 |
JGProgressHUDInteractionTypeBlockNoTouches
141 |
142 | 143 | 144 |

Block no touches.

145 | 146 | 147 | 148 | 149 | 150 | 151 |

152 | Declared In JGProgressHUD-Defines.h. 153 |

154 | 155 |
156 | 157 |
158 |
159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 |
168 |

Declared In

169 |

JGProgressHUD-Defines.h

170 |
171 | 172 | 173 | 174 | 175 | 176 |
177 | 178 |
179 | 187 |
188 |
189 |
190 |
191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /docs/Constants/JGProgressHUDParallaxMode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDParallaxMode Constants Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

JGProgressHUDParallaxMode Constants Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inJGProgressHUD-Defines.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

JGProgressHUDParallaxMode

79 | 80 | 81 |
82 |

Parallax Modes.

83 |
84 | 85 | 86 |
87 | 88 | 89 |

Definition

90 | typedef NS_ENUM(NSUInteger, JGProgressHUDParallaxMode ) {
91 | 92 |    JGProgressHUDParallaxModeDevice = 0,
93 | 94 |    JGProgressHUDParallaxModeAlwaysOn,
95 | 96 |    JGProgressHUDParallaxModeAlwaysOff,
97 | 98 | };
99 | 100 |
101 | 102 |
103 |

Constants

104 |
105 | 106 |
JGProgressHUDParallaxModeDevice
107 |
108 | 109 | 110 |

Follows the device setting for parallax. If “Reduce Motion” is enabled, no parallax effect is added to the HUD, if “Reduce Motion” is disabled the HUD will have a parallax effect. This behaviour is only supported on iOS 8 and higher.

111 | 112 | 113 | 114 | 115 | 116 | 117 |

118 | Declared In JGProgressHUD-Defines.h. 119 |

120 | 121 |
122 | 123 |
JGProgressHUDParallaxModeAlwaysOn
124 |
125 | 126 | 127 |

Always adds a parallax effect to the HUD. Parallax is only supported on iOS 7 and higher.

128 | 129 | 130 | 131 | 132 | 133 | 134 |

135 | Declared In JGProgressHUD-Defines.h. 136 |

137 | 138 |
139 | 140 |
JGProgressHUDParallaxModeAlwaysOff
141 |
142 | 143 | 144 |

Never adds a parallax effect to the HUD.

145 | 146 | 147 | 148 | 149 | 150 | 151 |

152 | Declared In JGProgressHUD-Defines.h. 153 |

154 | 155 |
156 | 157 |
158 |
159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 |
168 |

Declared In

169 |

JGProgressHUD-Defines.h

170 |
171 | 172 | 173 | 174 | 175 | 176 |
177 | 178 |
179 | 187 |
188 |
189 |
190 |
191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /docs/Constants/JGProgressHUDPosition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDPosition Constants Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

JGProgressHUDPosition Constants Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inJGProgressHUD-Defines.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

JGProgressHUDPosition

79 | 80 | 81 |
82 |

Positions of the HUD.

83 |
84 | 85 | 86 |
87 | 88 | 89 |

Definition

90 | typedef NS_ENUM(NSUInteger, JGProgressHUDPosition ) {
91 | 92 |    JGProgressHUDPositionCenter = 0,
93 | 94 |    JGProgressHUDPositionTopLeft,
95 | 96 |    JGProgressHUDPositionTopCenter,
97 | 98 |    JGProgressHUDPositionTopRight,
99 | 100 |    JGProgressHUDPositionCenterLeft,
101 | 102 |    JGProgressHUDPositionCenterRight,
103 | 104 |    JGProgressHUDPositionBottomLeft,
105 | 106 |    JGProgressHUDPositionBottomCenter,
107 | 108 |    JGProgressHUDPositionBottomRight,
109 | 110 | };
111 | 112 |
113 | 114 |
115 |

Constants

116 |
117 | 118 |
JGProgressHUDPositionCenter
119 |
120 | 121 | 122 |

Center position.

123 | 124 | 125 | 126 | 127 | 128 | 129 |

130 | Declared In JGProgressHUD-Defines.h. 131 |

132 | 133 |
134 | 135 |
JGProgressHUDPositionTopLeft
136 |
137 | 138 | 139 |

Top left position.

140 | 141 | 142 | 143 | 144 | 145 | 146 |

147 | Declared In JGProgressHUD-Defines.h. 148 |

149 | 150 |
151 | 152 |
JGProgressHUDPositionTopCenter
153 |
154 | 155 | 156 |

Top center position.

157 | 158 | 159 | 160 | 161 | 162 | 163 |

164 | Declared In JGProgressHUD-Defines.h. 165 |

166 | 167 |
168 | 169 |
JGProgressHUDPositionTopRight
170 |
171 | 172 | 173 |

Top right position.

174 | 175 | 176 | 177 | 178 | 179 | 180 |

181 | Declared In JGProgressHUD-Defines.h. 182 |

183 | 184 |
185 | 186 |
JGProgressHUDPositionCenterLeft
187 |
188 | 189 | 190 |

Center left position.

191 | 192 | 193 | 194 | 195 | 196 | 197 |

198 | Declared In JGProgressHUD-Defines.h. 199 |

200 | 201 |
202 | 203 |
JGProgressHUDPositionCenterRight
204 |
205 | 206 | 207 |

Center right position.

208 | 209 | 210 | 211 | 212 | 213 | 214 |

215 | Declared In JGProgressHUD-Defines.h. 216 |

217 | 218 |
219 | 220 |
JGProgressHUDPositionBottomLeft
221 |
222 | 223 | 224 |

Bottom left position.

225 | 226 | 227 | 228 | 229 | 230 | 231 |

232 | Declared In JGProgressHUD-Defines.h. 233 |

234 | 235 |
236 | 237 |
JGProgressHUDPositionBottomCenter
238 |
239 | 240 | 241 |

Bottom center position.

242 | 243 | 244 | 245 | 246 | 247 | 248 |

249 | Declared In JGProgressHUD-Defines.h. 250 |

251 | 252 |
253 | 254 |
JGProgressHUDPositionBottomRight
255 |
256 | 257 | 258 |

Bottom right position.

259 | 260 | 261 | 262 | 263 | 264 | 265 |

266 | Declared In JGProgressHUD-Defines.h. 267 |

268 | 269 |
270 | 271 |
272 |
273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 |
282 |

Declared In

283 |

JGProgressHUD-Defines.h

284 |
285 | 286 | 287 | 288 | 289 | 290 |
291 | 292 |
293 | 301 |
302 |
303 |
304 |
305 | 306 | 307 | 308 | -------------------------------------------------------------------------------- /docs/Constants/JGProgressHUDStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUDStyle Constants Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 57 | 58 |
59 |
60 |
61 |
62 |

JGProgressHUDStyle Constants Reference

63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
Declared inJGProgressHUD-Defines.h
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 |

JGProgressHUDStyle

79 | 80 | 81 |
82 |

Appearance styles of the HUD.

83 |
84 | 85 | 86 |
87 | 88 | 89 |

Definition

90 | typedef NS_ENUM(NSUInteger, JGProgressHUDStyle ) {
91 | 92 |    JGProgressHUDStyleExtraLight = 0,
93 | 94 |    JGProgressHUDStyleLight,
95 | 96 |    JGProgressHUDStyleDark,
97 | 98 | };
99 | 100 |
101 | 102 |
103 |

Constants

104 |
105 | 106 |
JGProgressHUDStyleExtraLight
107 |
108 | 109 | 110 |

Extra light HUD with dark elements.

111 | 112 | 113 | 114 | 115 | 116 | 117 |

118 | Declared In JGProgressHUD-Defines.h. 119 |

120 | 121 |
122 | 123 |
JGProgressHUDStyleLight
124 |
125 | 126 | 127 |

Light HUD with dark elemets.

128 | 129 | 130 | 131 | 132 | 133 | 134 |

135 | Declared In JGProgressHUD-Defines.h. 136 |

137 | 138 |
139 | 140 |
JGProgressHUDStyleDark
141 |
142 | 143 | 144 |

Dark HUD with light elements.

145 | 146 | 147 | 148 | 149 | 150 | 151 |

152 | Declared In JGProgressHUD-Defines.h. 153 |

154 | 155 |
156 | 157 |
158 |
159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 |
168 |

Declared In

169 |

JGProgressHUD-Defines.h

170 |
171 | 172 | 173 | 174 | 175 | 176 |
177 | 178 |
179 | 187 |
188 |
189 |
190 |
191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /docs/css/scss/_index.scss: -------------------------------------------------------------------------------- 1 | .index-container { 2 | -webkit-flex-direction: column; 3 | flex-direction: column; 4 | 5 | @media (min-width: $desktop-min-width) { 6 | display: flex; 7 | -webkit-flex-direction: row; 8 | flex-direction: row; 9 | -webkit-flex-wrap: wrap; 10 | flex-wrap: wrap; 11 | } 12 | 13 | .index-column { 14 | -webkit-flex: 1 1 33%; 15 | flex: 1 1 33%; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs/css/scss/_layout.scss: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | .clear { 6 | clear: both; 7 | } 8 | 9 | .clearfix { 10 | &:before, &:after { 11 | clear: both; 12 | display: table; 13 | content: ""; 14 | } 15 | } 16 | 17 | .xcode .hide-in-xcode { 18 | display: none; 19 | } 20 | 21 | body { 22 | font: 62.5% $body-font; 23 | background: $body-background; 24 | 25 | @media (max-width: $mobile-max-width) { 26 | background-color: $content-background; 27 | } 28 | } 29 | 30 | h1, h2, h3 { 31 | font-weight: 300; 32 | color: #808080; 33 | } 34 | 35 | h1 { 36 | font-size: 2em; 37 | color: #000; 38 | } 39 | 40 | h4 { 41 | font-size: 13px; 42 | line-height: 1.5; 43 | margin: 21px 0 0 0; 44 | } 45 | 46 | a { 47 | color: $tint-color; 48 | text-decoration: none; 49 | } 50 | 51 | pre, code { 52 | font-family: $code-font; 53 | word-wrap: break-word; 54 | } 55 | 56 | pre > code, .method-declaration code { 57 | display: inline-block; 58 | font-size: .85em; 59 | padding: 4px 0 4px 10px; 60 | border-left: 5px solid rgba(0, 155, 51, .2); 61 | 62 | &:before { 63 | content: "Objective-C"; 64 | display: block; 65 | 66 | font: 9px/1 $body-font; 67 | color: #009b33; 68 | text-transform: uppercase; 69 | letter-spacing: 2px; 70 | padding-bottom: 6px; 71 | } 72 | } 73 | 74 | pre > code { 75 | font-size: inherit; 76 | } 77 | 78 | table, th, td { 79 | border: 1px solid #e9e9e9; 80 | } 81 | 82 | table { 83 | width: 100%; 84 | } 85 | 86 | th, td { 87 | padding: 7px; 88 | 89 | > :first-child { 90 | margin-top: 0; 91 | } 92 | 93 | > :last-child { 94 | margin-bottom: 0; 95 | } 96 | } 97 | 98 | .container { 99 | @extend .clearfix; 100 | 101 | max-width: 980px; 102 | padding: 0 10px; 103 | margin: 0 auto; 104 | 105 | @media (max-width: $mobile-max-width) { 106 | padding: 0; 107 | } 108 | } 109 | 110 | header { 111 | position: fixed; 112 | top: 0; 113 | left: 0; 114 | width: 100%; 115 | z-index: 2; 116 | 117 | background: #414141; 118 | color: #fff; 119 | font-size: 1.1em; 120 | line-height: 25px; 121 | letter-spacing: .05em; 122 | 123 | #library-title { 124 | float: left; 125 | } 126 | 127 | #developer-home { 128 | float: right; 129 | } 130 | 131 | h1 { 132 | font-size: inherit; 133 | font-weight: inherit; 134 | margin: 0; 135 | } 136 | 137 | p { 138 | margin: 0; 139 | } 140 | 141 | h1, a { 142 | color: inherit; 143 | } 144 | 145 | @media (max-width: $mobile-max-width) { 146 | .container { 147 | padding: 0 10px; 148 | } 149 | } 150 | } 151 | 152 | aside { 153 | position: fixed; 154 | top: 25px; 155 | left: 0; 156 | width: 100%; 157 | height: 25px; 158 | z-index: 2; 159 | 160 | font-size: 1.1em; 161 | 162 | #header-buttons { 163 | background: rgba(255, 255, 255, .8); 164 | margin: 0 1px; 165 | padding: 0; 166 | list-style: none; 167 | text-align: right; 168 | line-height: 32px; 169 | 170 | li { 171 | display: inline-block; 172 | cursor: pointer; 173 | padding: 0 10px; 174 | } 175 | 176 | label, select { 177 | cursor: inherit; 178 | } 179 | 180 | #on-this-page { 181 | position: relative; 182 | 183 | .chevron { 184 | display: inline-block; 185 | width: 14px; 186 | height: 4px; 187 | position: relative; 188 | 189 | .chevy { 190 | background: #878787; 191 | height: 2px; 192 | position: absolute; 193 | width: 10px; 194 | 195 | &.chevron-left { 196 | left: 0; 197 | transform: rotateZ(45deg) scale(0.6); 198 | } 199 | 200 | &.chevron-right { 201 | right: 0; 202 | transform: rotateZ(-45deg) scale(0.6); 203 | } 204 | } 205 | } 206 | 207 | #jump-to { 208 | opacity: 0; 209 | font-size: 16px; 210 | 211 | position: absolute; 212 | top: 5px; 213 | left: 0; 214 | width: 100%; 215 | height: 100%; 216 | } 217 | } 218 | } 219 | } 220 | 221 | article { 222 | margin-top: 25px; 223 | 224 | #content { 225 | @extend .clearfix; 226 | 227 | background: $content-background; 228 | border: 1px solid $content-border; 229 | padding: 15px 25px 30px 25px; 230 | 231 | font-size: 1.4em; 232 | line-height: 1.45; 233 | 234 | position: relative; 235 | 236 | @media (max-width: $mobile-max-width) { 237 | padding: 15px 10px 20px 10px; 238 | border: none; 239 | } 240 | 241 | .navigation-top { 242 | position: absolute; 243 | top: 15px; 244 | right: 25px; 245 | } 246 | 247 | .title { 248 | margin: 21px 0 0 0; 249 | padding: 15px 0; 250 | } 251 | 252 | p { 253 | color: #414141; 254 | margin: 0 0 15px 0; 255 | } 256 | 257 | th, td { 258 | p:last-child { 259 | margin-bottom: 0; 260 | } 261 | } 262 | 263 | main { 264 | ul { 265 | list-style: none; 266 | margin-left: 24px; 267 | margin-bottom: 12px; 268 | padding: 0; 269 | 270 | li { 271 | position: relative; 272 | padding-left: 1.3em; 273 | 274 | &:before { 275 | content: "\02022"; 276 | 277 | color: #414141; 278 | font-size: 1.08em; 279 | line-height: 1; 280 | 281 | position: absolute; 282 | left: 0; 283 | padding-top: 2px; 284 | } 285 | } 286 | } 287 | } 288 | 289 | footer { 290 | @extend .clearfix; 291 | 292 | .footer-copyright { 293 | margin: 70px 25px 10px 0; 294 | } 295 | 296 | p { 297 | font-size: .71em; 298 | color: #a0a0a0; 299 | } 300 | } 301 | } 302 | } 303 | -------------------------------------------------------------------------------- /docs/css/scss/_object.scss: -------------------------------------------------------------------------------- 1 | .section-specification { 2 | table { 3 | width: auto; 4 | 5 | th { 6 | text-align: left; 7 | } 8 | } 9 | } 10 | 11 | .method-title { 12 | margin-left: -15px; 13 | margin-bottom: 8px; 14 | transition: margin-left .3s ease-out; 15 | 16 | .section-method.hide & { 17 | margin-left: 0; 18 | } 19 | 20 | code { 21 | font-weight: 400; 22 | font-size: .85em; 23 | } 24 | } 25 | 26 | .method-info { 27 | background: $object-background; 28 | border-bottom: 1px solid $object-border; 29 | margin: 0 -25px; 30 | padding: 20px 25px 0 25px; 31 | transition: height .3s ease-out; 32 | 33 | position: relative; 34 | 35 | .pointy-thing { 36 | background: $content-background; 37 | height: 10px; 38 | border-bottom: 1px solid $object-border; 39 | margin: -20px -25px 16px -25px; 40 | 41 | &:before { 42 | display: inline-block; 43 | content: ""; 44 | 45 | background: $object-background; 46 | border: 1px solid $object-border; 47 | border-bottom: 0; 48 | border-right: 0; 49 | 50 | position: absolute; 51 | left: 21px; 52 | top: 3px; 53 | width: 12px; 54 | height: 12px; 55 | transform: rotate(45deg); 56 | } 57 | } 58 | 59 | .method-subsection { 60 | margin-bottom: 15px; 61 | 62 | .argument-name { 63 | width: 1px; 64 | text-align: right; 65 | 66 | code { 67 | color: #808080; 68 | font-style: italic; 69 | font-weight: 400; 70 | } 71 | } 72 | } 73 | } 74 | 75 | .section-method { 76 | &.hide .method-info { 77 | height: 0 !important; 78 | overflow: hidden; 79 | display: none; 80 | } 81 | 82 | &.hide.animating .method-info { 83 | display: block; 84 | } 85 | 86 | &.animating .method-info { 87 | overflow: hidden; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /docs/css/scss/_print.scss: -------------------------------------------------------------------------------- 1 | @media print { 2 | body { 3 | background: #fff; 4 | padding: 8px; 5 | } 6 | 7 | header { 8 | position: static; 9 | background: #fff; 10 | color: #000; 11 | } 12 | 13 | aside { 14 | display: none; 15 | } 16 | 17 | .container { 18 | max-width: none; 19 | padding: 0; 20 | } 21 | 22 | article { 23 | margin-top: 0; 24 | 25 | #content { 26 | border: 0; 27 | background: #fff; 28 | padding: 15px 0 0 0; 29 | 30 | .title { 31 | margin-top: 0; 32 | padding-top: 0; 33 | } 34 | } 35 | } 36 | 37 | .method-info { 38 | &, & .pointy-thing { 39 | background: #fff; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/css/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | $body-font: -apple-system-font, "Helvetica Neue", Helvetica, sans-serif; 2 | $code-font: "Source Code Pro", Monaco, Menlo, Consolas, monospace; 3 | 4 | $body-background: #f2f2f2; 5 | $content-background: #fff; 6 | $content-border: #e9e9e9; 7 | $tint-color: #08c; 8 | $object-background: #f9f9f9; 9 | $object-border: #e9e9e9; 10 | 11 | $mobile-max-width: 650px; 12 | $desktop-min-width: 768px; -------------------------------------------------------------------------------- /docs/css/scss/_xcode.scss: -------------------------------------------------------------------------------- 1 | .xcode { 2 | header, aside { 3 | display: none; 4 | } 5 | 6 | .container { 7 | padding: 0; 8 | } 9 | 10 | article { 11 | margin-top: 0; 12 | 13 | #content { 14 | border: 0; 15 | margin: 0; 16 | } 17 | } 18 | 19 | .method-info { 20 | &, .section-method.hide & { 21 | max-height: auto; 22 | overflow: visible; 23 | 24 | &.hiding { 25 | display: block; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/css/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "variables", "normalize", "layout", "index", "object", "print", "xcode"; 2 | -------------------------------------------------------------------------------- /docs/css/style.css: -------------------------------------------------------------------------------- 1 | html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}*{box-sizing:border-box}.clear{clear:both}.clearfix:before,.container:before,article #content:before,article #content footer:before,.clearfix:after,.container:after,article #content:after,article #content footer:after{clear:both;display:table;content:""}.xcode .hide-in-xcode{display:none}body{font:62.5% -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;background:#f2f2f2}@media (max-width: 650px){body{background-color:#fff}}h1,h2,h3{font-weight:300;color:#808080}h1{font-size:2em;color:#000}h4{font-size:13px;line-height:1.5;margin:21px 0 0 0}a{color:#08c;text-decoration:none}pre,code{font-family:"Source Code Pro",Monaco,Menlo,Consolas,monospace;word-wrap:break-word}pre>code,.method-declaration code{display:inline-block;font-size:.85em;padding:4px 0 4px 10px;border-left:5px solid rgba(0,155,51,0.2)}pre>code:before,.method-declaration code:before{content:"Objective-C";display:block;font:9px/1 -apple-system-font,"Helvetica Neue",Helvetica,sans-serif;color:#009b33;text-transform:uppercase;letter-spacing:2px;padding-bottom:6px}pre>code{font-size:inherit}table,th,td{border:1px solid #e9e9e9}table{width:100%}th,td{padding:7px}th>:first-child,td>:first-child{margin-top:0}th>:last-child,td>:last-child{margin-bottom:0}.container{max-width:980px;padding:0 10px;margin:0 auto}@media (max-width: 650px){.container{padding:0}}header{position:fixed;top:0;left:0;width:100%;z-index:2;background:#414141;color:#fff;font-size:1.1em;line-height:25px;letter-spacing:.05em}header #library-title{float:left}header #developer-home{float:right}header h1{font-size:inherit;font-weight:inherit;margin:0}header p{margin:0}header h1,header a{color:inherit}@media (max-width: 650px){header .container{padding:0 10px}}aside{position:fixed;top:25px;left:0;width:100%;height:25px;z-index:2;font-size:1.1em}aside #header-buttons{background:rgba(255,255,255,0.8);margin:0 1px;padding:0;list-style:none;text-align:right;line-height:32px}aside #header-buttons li{display:inline-block;cursor:pointer;padding:0 10px}aside #header-buttons label,aside #header-buttons select{cursor:inherit}aside #header-buttons #on-this-page{position:relative}aside #header-buttons #on-this-page .chevron{display:inline-block;width:14px;height:4px;position:relative}aside #header-buttons #on-this-page .chevron .chevy{background:#878787;height:2px;position:absolute;width:10px}aside #header-buttons #on-this-page .chevron .chevy.chevron-left{left:0;transform:rotateZ(45deg) scale(0.6)}aside #header-buttons #on-this-page .chevron .chevy.chevron-right{right:0;transform:rotateZ(-45deg) scale(0.6)}aside #header-buttons #on-this-page #jump-to{opacity:0;font-size:16px;position:absolute;top:5px;left:0;width:100%;height:100%}article{margin-top:25px}article #content{background:#fff;border:1px solid #e9e9e9;padding:15px 25px 30px 25px;font-size:1.4em;line-height:1.45;position:relative}@media (max-width: 650px){article #content{padding:15px 10px 20px 10px;border:none}}article #content .navigation-top{position:absolute;top:15px;right:25px}article #content .title{margin:21px 0 0 0;padding:15px 0}article #content p{color:#414141;margin:0 0 15px 0}article #content th p:last-child,article #content td p:last-child{margin-bottom:0}article #content main ul{list-style:none;margin-left:24px;margin-bottom:12px;padding:0}article #content main ul li{position:relative;padding-left:1.3em}article #content main ul li:before{content:"\02022";color:#414141;font-size:1.08em;line-height:1;position:absolute;left:0;padding-top:2px}article #content footer .footer-copyright{margin:70px 25px 10px 0}article #content footer p{font-size:.71em;color:#a0a0a0}.index-container{-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.index-container{display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}}.index-container .index-column{-webkit-flex:1 1 33%;flex:1 1 33%}.section-specification table{width:auto}.section-specification table th{text-align:left}.method-title{margin-left:-15px;margin-bottom:8px;transition:margin-left .3s ease-out}.section-method.hide .method-title{margin-left:0}.method-title code{font-weight:400;font-size:.85em}.method-info{background:#f9f9f9;border-bottom:1px solid #e9e9e9;margin:0 -25px;padding:20px 25px 0 25px;transition:height .3s ease-out;position:relative}.method-info .pointy-thing{background:#fff;height:10px;border-bottom:1px solid #e9e9e9;margin:-20px -25px 16px -25px}.method-info .pointy-thing:before{display:inline-block;content:"";background:#f9f9f9;border:1px solid #e9e9e9;border-bottom:0;border-right:0;position:absolute;left:21px;top:3px;width:12px;height:12px;-webkit-transform:rotate(45deg);transform:rotate(45deg) }.method-info .method-subsection{margin-bottom:15px}.method-info .method-subsection .argument-name{width:1px;text-align:right}.method-info .method-subsection .argument-name code{color:#808080;font-style:italic;font-weight:400}.section-method.hide .method-info{height:0 !important;overflow:hidden;display:none}.section-method.hide.animating .method-info{display:block}.section-method.animating .method-info{overflow:hidden}@media print{body{background:#fff;padding:8px}header{position:static;background:#fff;color:#000}aside{display:none}.container{max-width:none;padding:0}article{margin-top:0}article #content{border:0;background:#fff;padding:15px 0 0 0}article #content .title{margin-top:0;padding-top:0}.method-info,.method-info .pointy-thing{background:#fff}}.xcode header,.xcode aside{display:none}.xcode .container{padding:0}.xcode article{margin-top:0}.xcode article #content{border:0;margin:0}.xcode .method-info,.section-method.hide .xcode .method-info{max-height:auto;overflow:visible}.xcode .method-info.hiding,.section-method.hide .xcode .method-info.hiding{display:block} 2 | 3 | -------------------------------------------------------------------------------- /docs/hierarchy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUD Hierarchy 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 36 | 37 |
38 |
39 |
40 |
41 |

JGProgressHUD Hierarchy

42 | 43 | 44 |
45 |

Class Hierarchy

46 | 47 | 98 | 99 |
100 | 101 | 102 | 103 |
104 | 105 |

Protocol References

106 | 111 | 112 | 113 |

Constant References

114 | 125 | 126 | 127 |
128 | 129 | 130 |
131 | 139 |
140 |
141 |
142 |
143 |
144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /docs/img/button_bar_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/docs/img/button_bar_background.png -------------------------------------------------------------------------------- /docs/img/disclosure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/docs/img/disclosure.png -------------------------------------------------------------------------------- /docs/img/disclosure_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/docs/img/disclosure_open.png -------------------------------------------------------------------------------- /docs/img/library_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/docs/img/library_background.png -------------------------------------------------------------------------------- /docs/img/title_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JonasGessner/JGProgressHUD/6336c426fb147ee19c15252eaf363f29720c3eb5/docs/img/title_background.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | JGProgressHUD Reference 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 |

17 | JGProgressHUD 18 |

19 | 20 |

21 | Jonas Gessner 22 |

23 | 24 |
25 |
26 | 27 | 36 | 37 |
38 |
39 |
40 |
41 |

JGProgressHUD Reference

42 | 43 | 44 | 45 |
46 | 47 | 48 | 49 | 79 | 80 | 81 | 82 |
83 | 84 |

Protocol References

85 | 90 | 91 | 92 | 93 |

Constant References

94 | 105 | 106 | 107 | 108 |
109 | 110 |
111 | 112 |
113 | 121 |
122 |
123 |
124 |
125 |
126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /docs/js/script.js: -------------------------------------------------------------------------------- 1 | function $() { 2 | return document.querySelector.apply(document, arguments); 3 | } 4 | 5 | if (navigator.userAgent.indexOf("Xcode") != -1) { 6 | document.documentElement.classList.add("xcode"); 7 | } 8 | 9 | var jumpTo = $("#jump-to"); 10 | 11 | if (jumpTo) { 12 | jumpTo.addEventListener("change", function(e) { 13 | location.hash = this.options[this.selectedIndex].value; 14 | }); 15 | } 16 | 17 | function hashChanged() { 18 | if (/^#\/\/api\//.test(location.hash)) { 19 | var element = document.querySelector("a[name='" + location.hash.substring(1) + "']"); 20 | 21 | if (!element) { 22 | return; 23 | } 24 | 25 | element = element.parentNode; 26 | 27 | element.classList.remove("hide"); 28 | fixScrollPosition(element); 29 | } 30 | } 31 | 32 | function fixScrollPosition(element) { 33 | var scrollTop = element.offsetTop - 150; 34 | document.documentElement.scrollTop = scrollTop; 35 | document.body.scrollTop = scrollTop; 36 | } 37 | 38 | [].forEach.call(document.querySelectorAll(".section-method"), function(element) { 39 | element.classList.add("hide"); 40 | 41 | element.querySelector(".method-title a").addEventListener("click", function(e) { 42 | var info = element.querySelector(".method-info"), 43 | infoContainer = element.querySelector(".method-info-container"); 44 | 45 | element.classList.add("animating"); 46 | info.style.height = (infoContainer.clientHeight + 40) + "px"; 47 | fixScrollPosition(element); 48 | element.classList.toggle("hide"); 49 | if (element.classList.contains("hide")) { 50 | e.preventDefault(); 51 | } 52 | setTimeout(function() { 53 | element.classList.remove("animating"); 54 | }, 300); 55 | }); 56 | }); 57 | 58 | window.addEventListener("hashchange", hashChanged); 59 | hashChanged(); 60 | -------------------------------------------------------------------------------- /generate-docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Homebrew appledoc does not ship with templates... 4 | git clone --depth 1 https://github.com/tomaz/appledoc 5 | 6 | appledoc --output . --project-name JGProgressHUD --project-company "Jonas Gessner" --company-id "com.jonasgessner" --template appledoc/Templates --create-html --no-create-docset --no-install-docset JGProgressHUD/JGProgressHUD 7 | 8 | rm -rf docs && mv html docs 9 | 10 | rm -rf appledoc 11 | --------------------------------------------------------------------------------