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.
我注意到UIApplicationWillTerminateNotification如果我从 Xcode 停止可执行文件,则不会发送。有没有一种干净的方法让它打电话?
UIApplicationWillTerminateNotification
使用下面的代码。它会很好用!
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];