I want to display, above any other views, even the navigation bar, a kind of \"pop-up\" view that looks like this:
Note if you want add view in Full screen then only use below code
Add these extension of UIViewController
public extension UIViewController {
internal func makeViewAsFullScreen() {
var viewFrame:CGRect = self.view.frame
if viewFrame.origin.y > 0 || viewFrame.origin.x > 0 {
self.view.frame = UIScreen.main.bounds
}
}
}
Continue as normal adding process of subview
Now use in adding UIViewController's viewDidAppear
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.makeViewAsFullScreen()
}