So I am trying to make a macOS window close after a selected period of time. I read online that I could use self.view.window?.close
to make it disappear. So far, that is not working.
Do any of you have any tips?
Also, I want it to open another window after the 1st one closes. So I don't want it to quit the app entirely.
EDIT: I found out by using print(self.view.window
) was set to nil
. What does that mean and how do I fix it?