2021-12-08 iOS 优雅退出应用

[[UIApplication sharedApplication] performSelector:@selector(suspend)];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
    exit(0);
});

你可能感兴趣的:(2021-12-08 iOS 优雅退出应用)