How to get a separated window with Mac Catalyst?

I noticed that in wwdc-20-10056 video, when adding a new recipe, the app will show the UI in a separated window. But I can’t find any information about how to implement this. So I want to know how to implement this feature.

By the way, is there any way to use NSAlert with Mac Catalyst?
How to get a separated window with Mac Catalyst?
 
 
Q