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
Got it. UIWindow
works fine. Code:
// when drag starts
draggingView = [[UIWindow alloc] initWithFrame:CGRectMake(0,0,100,100)];
draggingView.windowLevel = UIWindowLevelAlert;
draggingView.center = [gestureRecognizer locationInView:self.view.window];
[draggingView makeKeyAndVisible];
// when drag ends
[draggingView release];
draggingView = nil;
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