How get current keywindow equivalent for multi window SceneDelegate Xcode 11?

后端 未结 6 1103
北海茫月
北海茫月 2020-12-31 22:33

I\'m converting my iOS13 app for iPadOS to SceneDelegate (multi window).

How can I get the current UIWindow from the current SceneDelegate?

I know that a can

6条回答
  •  佛祖请我去吃肉
    2020-12-31 23:07

    It sounds like you probably want to move this logic to your SceneDelegate.

    The SceneDelegate now has knowledge of whether the window is connected to the scene, so it might make sense to have every connected scene listen to whatever event is driving the snack bar, and the show it on its window. This would then result in every visible window showing the snack bar (1 or more).

提交回复
热议问题