Created
April 3, 2019 11:39
-
-
Save SergLam/17e79128e374da4b446df5d5e6313eea to your computer and use it in GitHub Desktop.
PKHUD Custom layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileprivate func showImageLoadingProgress() { | |
let imageSize = CGSize(width: UIScreen.width / 2, height: UIScreen.width / 2) | |
let imageLoadingProgressView = UIImageView(frame: CGRect(origin: CGPoint.zero, size: imageSize)) | |
PKHUD.sharedHUD.contentView = imageLoadingProgressView | |
let fileName = R.image.imageLoaderGif.name.replacingOccurrences(of: ".gif", with: "") | |
imageLoadingProgressView.loadGif(name: fileName) | |
PKHUD.sharedHUD.show() | |
} | |
fileprivate func hideImageLoadingProgress(_ completion: @escaping VoidClosure) { | |
PKHUD.sharedHUD.hide(true) { (_) in | |
completion() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment