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
Post a Comment