¿Moverse por el contenido de la ventana con solo hacer clic en un botón?
Frecuentes
Visto 48 veces
0
I have a window containing 6 NSView subclasses. My views are placed beside each other horizontally, creating one long horizontal rectangle window.
When the user clicks on a button, I want the same views to be moved and placed vertically, creating one long vertical rectangle window.
e.g. Currently my views are placed as: [][][][][][]
At the click of a button, I want my views to move into the following new places:
[]
[]
[]
[]
[]
[]
How can I do this? Note I am developing an app for OSX Mountain Lion. I also do not want to create new NSViews, I just want them to move them around into the new order.
0 Respuestas
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas objective-c macos cocoa user-interface or haz tu propia pregunta.
This will have to be done programatically, using
NSView
's-setFrame:
- Vervious@Vervious I see. I would also need to change the shape of the window though (make it a vertical rectangle from a horizontal rectangle). How would I do this? - fdh
Once again programmatically, except (I believe) using
NSWindow
's-setFrame:display:animate:
or-setFrame:display:
after calculating the window's new size. - Vervious