How to add a view on top of a UIPopoverController

前端 未结 2 353
南旧
南旧 2021-01-03 08:13

I\'ve got an iPad app with a “drawer” table displayed in a popover. The user can tap-and-hold on an item in the drawer to drag that item out of it and into my main view. Tha

2条回答
  •  醉梦人生
    2021-01-03 08:57

    Adding the Swift Version:

        let windows: [UIWindow] = UIApplication.shared.windows
        let firstWindow: UIWindow = windows[0]
    
        firstWindow.addSubview(loadingView)
        firstWindow.bringSubview(toFront: loadingView)
    

    EDIT to admin: thanks for the review – deleted my other answer in duplicate How to show a UIView OVER a UIPopoverController

提交回复
热议问题