Курс UIKit UIActivityIndicatorView свойство beginIgnoringInteractionEvents устарело, чем заменить?


#1
activityIndicator.hidesWhenStopped = true
    activityIndicator.color = #colorLiteral(red: 0.1019607857, green: 0.2784313858, blue: 0.400000006, alpha: 1)
    activityIndicator.startAnimating()
    UIApplication.shared.beginIgnoringInteractionEvents()
    
    
    progressView.setProgress(0, animated: true)
   
    
    
    NotificationCenter.default.addObserver(self,
                                           selector: #selector(updateTextView),
                                           name: UIResponder.keyboardWillShowNotification,
                                           object: nil)
    
    NotificationCenter.default.addObserver(self,
                                           selector: #selector(updateTextView),
                                           name: UIResponder.keyboardWillHideNotification,
                                           object: nil)
    
    
    Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in
        if self.progressView.progress != 1 {
            self.progressView.progress += 0.2
        } else {
            self.activityIndicator.stopAnimating()
            self.textView.isHidden = false
            self.progressView.isHidden = true
            UIApplication.shared.endIgnoringInteractionEvents()
        }
    }