How to respond to touch events in UIWindow?

前端 未结 4 1003
不思量自难忘°
不思量自难忘° 2020-12-30 14:11

Is it possible to handle touch events in the key UIWindow in the app Delegate or anywhere else?

Any help would be appreciated please.

4条回答
  •  旧巷少年郎
    2020-12-30 14:53

    UIWindow is a subclass of UIResponder, which has APIs for handling touch events (e.g., touchesBegan:withEvent:). It is possible then for you to subclass UIWindow, override the touch event handling APIs, and manage the touch events yourself.

提交回复
热议问题