jdg / MBProgressHUD

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

Multi line message #329

Closed fulldecent closed 8 years ago

fulldecent commented 8 years ago

The mode MBProgressHUDModeText only supports a single line of text. This is very limiting when the device may be a phone which is held vertical. This precludes me from using it to present arbitrary NSErrors because they will usually not fit.

Here is the code I am using to present these errors:

    let hud = staticHud
    hud.mode = .CustomView
    hud.hide(false)
    hud.show(true)
    let view: UITextView = UITextView(frame: CGRectMake(0, 0, 200, 200))
    view.text = error.localizedDescription
    view.font = hud.labelFont
    view.textColor = UIColor.whiteColor()
    view.backgroundColor = UIColor.clearColor()
    view.sizeToFit()
    hud.customView = view
matej commented 8 years ago

This should now be possible with the exposed label and detailsLabel.