swift - Stop async operations on window close -


in app delegate have put callback stop program when window shut.

 func applicationshouldterminateafterlastwindowclosed(sender: nsapplication) -> bool {         return true     } 

this doesn't work because (i assume) there async bluetooth task running. best way stop running , clean up?

i use approach

[nsapp performselector:@selector(terminate:) withobject:nil afterdelay:0]; 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -