Centering a document window
-
31-10-2019 - |
Pregunta
I am writing a core data, document based app. I am trying to center the document's window. I have tried calling the following code from the document's makeWindowControllers method, from the window controller's awakeFromNib method and from the window controller's showWindows method. I keep getting a nil result for myWindow. Any ideas? Thank you.
NSWindow *myWindow = [myWindowController window];
[myWindow center];
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow