In my app I want to create a new UIWindow
over the main UIWindow, And I wrote as following, but it don\'t works.
first, i create a UIWindow
as the
func createAdsWindow(){
let frame = CGRect.init(0, UIScreen.main.bounds.height - 60, UIScreen.main.bounds.width, 60)
adsWindow = UIWindow.init(frame: frame)
adsWindow!.backgroundColor = UIColor(colorBackground)
let adsViewController = UIViewController.init()
adsViewController.view.backgroundColor = UIColor.red
adsWindow?.rootViewController = adsViewController
adsWindow?.windowLevel = UIWindow.Level(rawValue: 2)
adsWindow?.makeKeyAndVisible()
}