MBProgressHUD使用Checkmark完成视图

时间:2017-06-13 16:58:51

标签: ios

我正在使用MBProgressHUD,我希望将外观更改为具有复选标记和已完成文本的外观。我有什么想法可以做到这一点?

enter image description here

1 个答案:

答案 0 :(得分:5)

我认为没有像屏幕截图那样的内置外观。你必须提供自己的复选标记图像。然后你可以改变这样的外观:

let hud = MBProgressHUD.showHUDAddedTo(view, animated: true)
hud.mode = .CustomView
hud.customView = UIImageView(image: UIImage(named: "checkmark")) // according to the documentation a good image size is something like 37x37px
hud.label.text = "Completed"

checkmark