开发者

NSApplication Delegate Question

开发者 https://www.devze.com 2023-02-13 19:29 出处:网络
I was wondering if - (void)applicationWillTerminate:(NSNotification *)notification is still called when the system shuts down and the a开发者_开发问答pplication is told to quit.

I was wondering if - (void)applicationWillTerminate:(NSNotification *)notification is still called when the system shuts down and the a开发者_开发问答pplication is told to quit.

I'm working on an agent that needs to perform some actions when quitting, but I'm not sure if the delegate is called or not.

Thanks!


Yes, applicationWillTerminate: will be called. The best-practices for clean application shutdown are documented by Apple.

0

精彩评论

暂无评论...
验证码 换一张
取 消