I am trying to integrate the SVProgressHUD library and want to show before the API response on my controller for that I have written a code but it's throwing an error like Thread 1: "-[MYOWEB.AppDelegate window]: unrecognized selector sent to instance 0x600001bc2a40"
//ViewController.swift
import UIKit
import SVProgressHUD
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
SVProgressHUD.setDefaultMaskType(.clear)
SVProgressHUD.setDefaultStyle(.custom)
SVProgressHUD.setForegroundColor(UIColor.white)
SVProgressHUD.setBackgroundColor(#colorLiteral(red: 0.1333333333, green: 0.3764705882, blue: 0.9960784314, alpha: 1).withAlphaComponent(1))
}
}