i have a music player in my project and i want to insert this music player bottom of application. Actually i'm insert it inside UIWindow perfectly but all views goes under this player and it blocks some buttons and table items.
Here is my UIWindow insert code :
Generate.miniPlayer.translatesAutoresizingMaskIntoConstraints = false
Generate.miniPlayer.leftAnchor.constraint(equalTo: self.window!.leftAnchor).isActive = true
Generate.miniPlayer.rightAnchor.constraint(equalTo: self.window!.rightAnchor).isActive = true
Generate.miniPlayer.bottomAnchor.constraint(equalTo: self.window!.bottomAnchor).isActive = true
self.window?.addSubview(Generate.miniPlayer)
self.window?.bringSubviewToFront(Generate.miniPlayer)
Here is my result:
Thanks a lot!


When you add yourView to view then yourView will be front of your view. For example you have two view
firstViewandsecondViewyou have to put like below if you want to add what you want.then you have to give constraint like below :