Question

I have two NSWindows, both with an NSPanel in them. I want to switch windows when a button is pressed. How can this be done? I don't need the old window any more so I just want to show the new one.

Was it helpful?

Solution

To focus the second window, simply call:

[window2 makeKeyWindow];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top