SVProgressHUD 調(diào)用方法
簡單列舉幾個例子
成功的調(diào)用
SVProgressHUD.showSuccess(withStatus: "成功的調(diào)用")
SVProgressHUD.dismiss(withDelay: 1)
失敗的調(diào)用
SVProgressHUD.showError(withStatus: "失敗的調(diào)用")
SVProgressHUD.dismiss(withDelay: 1)
自定義的調(diào)用
SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.custom) //自定義內(nèi)容
SVProgressHUD.setBackgroundLayerColor(UIColor(hexString: "#000000").withAlphaComponent(0.5)) //設(shè)置背景顏色
SVProgressHUD.setBackgroundColor(UIColor.init(hexString: "#4C4C4C")) //設(shè)置顯示view的背景顏色
SVProgressHUD.setSuccessImage(UIImage(named: "Transfer")!)//添加自定義圖片
SVProgressHUD.setImageViewSize(CGSizeMake(30, 30)) // 設(shè)置圖片的大小
SVProgressHUD.setFont(UIFont.systemFont(ofSize: 14)) //設(shè)置顯示文本的字體大小
SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.dark) //
SVProgressHUD .showSuccess(withStatus: "顯示的文本") //設(shè)置顯示文本
SVProgressHUD.dismiss(withDelay: 1) //設(shè)置顯示的時間