iPadOS13 (b7), UIMenuController and multiple windows

Having problems popping a UIMenuController when using multiple (side by side) windows.


So I handle a tap in a view then I set the firstResponder to that view, then I present a UIMenuController in that view and the canPerformAction: is called on that view - all good!


I then attempt the same in the adjacent window (same code obviously) and the canPerformAction: is still sent to the previous view (in the other window.) Indeed, pressing the menu also results in the handler being called on the other view.


Both views return YES from canBecomeFirstRepsonder:


Anyone got any ideas?


Thanks

  • Did you find a fix? The solution using 'makeKeyWindow' is not working on iPadOS 14-15.

Add a Comment

Accepted Reply

Turns out you need to call [view.window makeKeyWindow] prior to calling [view becomeFirstResponder] prior to presenting the UIMenuController.


Makes sense I guess...

Replies

Turns out you need to call [view.window makeKeyWindow] prior to calling [view becomeFirstResponder] prior to presenting the UIMenuController.


Makes sense I guess...