UIAlertController above all views (iOS12)

27 views Asked by At

I have added the button on top of all views:

let window = UIApplication.shared.keyWindow!

window.addSubview(nextBtn)

And than I call UIAlertController

let ac = UIAlertController(title: "", message: NSLocalizedString("choose_type_physical_activity", comment: ""), preferredStyle: .actionSheet)

....

present(ac, animated: true, completion: nil)

And only on iOS 12 I have a button over my action sheet

enter image description here

1

There are 1 answers

0
Dima On

I just added my button to NavigationController not to UIWindow