How to show UIView OVER UIPopoverController

In my application, I have my main view, and when I click the button, the UIPopoverController is displayed on top of my main view (and not full-screen mode, so I still see the view) containing the UITableView. When I click one of the cells in the table, I want to show a custom screen-oriented screen (a simple view informing the user that the application is processing), which will disappear and disappear for a certain period of time.

The problem is that my custom view always appears under UIPopover ... I tried everything I could to bring SubviewToFront, etc. Nothing works ... I also tried to wrap my custom view in a UIViewController and use [mainView presentViewController: myCustomView ...], but when I do this, the main view disappears

Can anybody help? thanks

+1
source share
1 answer

thanks Ole Begemann, this question really was a duplicate. Although the solution to my problem is not to subclass UIWindow, but to add my UIView to the UIWindow key:

NSArray * windows = [[UIApplication sharedApplication] windows]; UIWindow* win0 = [windows objectAtIndex:0]; [win0 addSubview:loadingView]; [win0 bringSubviewToFront:loadingWindow]; 
+4
source

Source: https://habr.com/ru/post/1306695/


All Articles