Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试计算屏幕触摸并使用 UITouch tapCount 来做到这一点。当应用程序进入后台模式时,我需要能够继续计数触摸。我将使用定位服务,所以我知道我可以让应用程序保持活力,但我不确定是否可以继续使用 tapCount。有任何想法吗?
不可能。一旦应用程序进入后台模式 - 屏幕不再属于应用程序 - 而是主屏幕(或屏幕上的任何其他应用程序) - 此外,由于 iOS 设备上的应用程序被沙盒化的方式 - 这将越过那条线.. 为什么需要在应用程序之外注册水龙头?