[英]Adding UIView overlay to KeyWindow without covering alerts
我正在嘗試將加載疊加層添加到我的應用程序中,到目前為止,它可以正常運行,只是它出於某種原因覆蓋了警報。
疊加層是全屏UIView,其顯示如下:
UIApplication.SharedApplication.KeyWindow.AddSubview(view);
我隨后顯示的警報是這樣創建的:
var alertController = UIAlertController.Create(title, message, UIAlertControllerStyle.Alert); alertController.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext; viewController.PresentViewController(alertController, true, null);
問題在於,盡管ModalPresentationStyle設置為OverCurrentContext,但警報仍顯示在疊加層下方。 有沒有一種方法可以強制將它們顯示在所有內容之上?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.