i wanna add a collectionView on the top of all the views in a tableViewController, so i used the code below in viewDidAppear
tableView.window?.addSubview(selectedView)
tableView.window?.bringSubview(toFront: selectedView)
strangely, i couldnt saw the view as i supposed, and as i
po tableView.window
in the terminal, the answer is 'nil'
but the most strange thing is that the same code worked in another tableViewController
BTW: I knew the best way is using UIViewController to replace UITableViewController, but i just wanna know how could tableView.window is nil in viewDidLoad or viewDidAppear when using a UITableViewController