-
Notifications
You must be signed in to change notification settings - Fork 496
Piergiuseppe Longo edited this page Jul 5, 2017
·
2 revisions
Add the moment is not possible to change the frame, but you can always create your custom HUD extending the desired HUD and overriding layoutSubviews
class CustomFrameHUD : PKHUDProgressView{
open override func layoutSubviews() {
super.layoutSubviews()
let viewWidth = bounds.size.width
let viewHeight = bounds.size.height
titleLabel.frame = CGRect(origin: CGPoint.zero, size: CGSize(width: viewWidth, height: titleHeight))
imageView.frame = CGRect(origin: CGPoint(x:0.0, y:quarterHeight), size: CGSize(width: viewWidth, height: imagefHeight))
subtitleLabel.frame = CGRect(origin: CGPoint(x:0.0, y:threeQuarterHeight), size: CGSize(width: viewWidth, height: subTitleHeight))
}
}
HUD.show(.progress, onView: UIApplication.shared.windows.last)