I want to re-show the main window after closed when click my app icon on dock. Anyone know how to do it ? Thanks in advance.
Implement applicationShouldHandleReopen:hasVisibleWindows: in your application delegate. In your implementation, order the window back in. (Make sure you don't release it and it doesn't release itself when it gets closed.)
applicationShouldHandleReopen:hasVisibleWindows:
See the documentation.