I am doing doing the following operations in viewDidLoad:
view.window?.isUserInteractionEnabled = false
view.bringSubviewToFront(activityIndicator)
But the activityIndicator isn't showing up and I can still interact with the view. Whereas when I am doing the same thing in viewWillAppear, it is working correctly. What might be a reason?