I have a button that will close my app.
I am using exit(0);
but I dont like the way it closes my app, its like when an app crashes and the app closes kinda close. I am looking for away to terminate when the user pushes this button. Any suggestions?
Thanks
I have tried the following:
[[NSThread mainThread] exit];
but got this error:
No visible @interface for 'NSThread' declares the selector 'exit'