Question

I am trying to develop an application for the mac however I am having issues trying to make multiple windows such as when you click cmd+N on safari.

I have tried looking for tutorials on how to do it however the closest I have got to be able to do this is just by creating a separate window by using this tutorial here: https://www.youtube.com/watch?v=Z1Erw7aP0EQ

If anyone knows how I can make unlimited windows using Xcode I will highly appreciate it!

Was it helpful?

Solution

Just write a NSDocument-based app, as described in Apple's docs. BTW, Apple's docs are always worth visiting together with the various tutorials you can dig up with Google.

That said, the document architecture works best if your window is going to contain something that can be viewed as a document. If the Open... (and maybe Save...) menu items make sense for your data, then you'll likely be fine with the document architecture, otherwise you should be prepared to jump through a few hoops to tweak the architecture to your needs.

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