SVProgressHUD 调用方法
简单列举几个例子
成功的调用
SVProgressHUD.showSuccess(withStatus: "成功的调用")
SVProgressHUD.dismiss(withDelay: 1)
失败的调用
SVProgressHUD.showError(withStatus: "失败的调用")
SVProgressHUD.dismiss(withDelay: 1)
自定义的调用
SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.custom) //自定义内容
SVProgressHUD.setBackgroundLayerColor(UIColor(hexString: "#000000").withAlphaComponent(0.5)) //设置背景颜色
SVProgressHUD.setBackgroundColor(UIColor.init(hexString: "#4C4C4C")) //设置显示view的背景颜色
SVProgressHUD.setSuccessImage(UIImage(named: "Transfer")!)//添加自定义图片
SVProgressHUD.setImageViewSize(CGSizeMake(30, 30)) // 设置图片的大小
SVProgressHUD.setFont(UIFont.systemFont(ofSize: 14)) //设置显示文本的字体大小
SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.dark) //
SVProgressHUD .showSuccess(withStatus: "显示的文本") //设置显示文本
SVProgressHUD.dismiss(withDelay: 1) //设置显示的时间