简体   繁体   中英

How to check app is in ideal state in ios sdk

有没有发现用户在应用程序处于前台时没有在应用程序中进行任何活动的信息。

try this code

UIApplication.shared.applicationState == .inactive

other cases

case active

case inactive

case background

Checkout this thread . Ii will wrapp with a UIWindow subclass which is going to send notification. You can use delegate for more effective.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM