¿Moverse por el contenido de la ventana con solo hacer clic en un botón?

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.

preguntado el 24 de agosto de 12 a las 03:08

This will have to be done programatically, using NSView's -setFrame: -

@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? -

Once again programmatically, except (I believe) using NSWindow's -setFrame:display:animate: or -setFrame:display: after calculating the window's new size. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.