Question

I am making a simple app that will hide open windows, but I want to add a text box that will tell the number of open windows, what cocoa function do I need for this? is there a function in nswindow that I could use?

Was it helpful?

Solution

int windowCount = [[[NSApplication sharedApplication] windows] count];

That should do the trick.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top