jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

Rename `HUDForView:` to `lookupHUDInView:` #544

Closed arror closed 6 years ago

arror commented 6 years ago

Fix method for Swift

arror commented 6 years ago

This method will be mapped to a convenience constructor in Swift.

if let hud = MBProgressHUD.init(for: self.base.view) {
    return hud
} else {
    let hud = MBProgressHUD()
    self.base.view.addSubview(hud)
    return hud
}
merkury commented 5 years ago

Renaming will solve the problem, that this method is not exported/bridged to swift. HUDForView is NOT a convenient constructor but a lookup method. As I commented here: https://github.com/jdg/MBProgressHUD/issues/450