SHARE
TWEET

Untitled

a guest May 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  Loader.swift
  3. //  Walkthrough
  4. //
  5. //  Created by mac on 14/08/18.
  6. //  Copyright © 2018 mac. All rights reserved.
  7. //
  8.  
  9. import Foundation
  10. import SVProgressHUD
  11.  
  12. class Loader {
  13.     static func show() {
  14.         UIApplication.shared.isNetworkActivityIndicatorVisible = true
  15.         SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.black)
  16.         SVProgressHUD.show()
  17.     }
  18.    
  19.     static func show(withMessage msg: String){
  20.         UIApplication.shared.isNetworkActivityIndicatorVisible = true
  21.         SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.black)
  22.         SVProgressHUD.show(withStatus: msg)
  23.     }
  24.    
  25.     static func show(Progress progress: Double) {
  26.         UIApplication.shared.isNetworkActivityIndicatorVisible = true
  27.         SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.black)
  28. //        SVProgressHUD.showProgress(Float(progress))
  29.         SVProgressHUD.showProgress(Float(progress), status: "Uploading...")
  30.     }
  31.    
  32.     static func hide() {
  33.         UIApplication.shared.isNetworkActivityIndicatorVisible = false
  34.         SVProgressHUD.dismiss()
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top