This is due to the UIRemoveView (private) in the hierarchy. As far as I can tell, your application cannot send events directly to remote views. I suspect that this is a security measure that prevents you from presenting a sharing dialog and automatically sending a touch event to it to perform an external action that the user did not request. Remote views do not start in your application. The Copy button interacts with an XPC link.
All of this means that if the remote view is covered in one of your views, there is no way (at least I found) to interact with it. You must make sure that you do not close it.
It is actually simple. The thing that stores the remote view is called UITransitionView and is used for other things at the OS level that you probably shouldn't cover as well. So do not do this:
- (void)didAddSubview:(UIView *)subview { [super didAddSubview:subview]; if ([subview isKindOfClass:NSClassFromString(@"UITransitionView")]) {
But ... It requires you to talk about UITransitionView in your code. This is both a fragile and possibly forbidden use of private APIs.
Otherwise, you will have to wrap your UIActivityViewController requests with some calls / notifications that indicate that the window will not span the views until we finish (which you will need to clear in the completion handler).
source share