Frage

When the cocoa application starts, the NSWindow automatically change to full screen resolution. However, the custom view in the window does not resize at all. I am using auto layout so I thought it should change automatically.

I tried to resize the frame in this function but it does work still:

 -(void)windowDidResize:(NSNotification *)notification{
        // windowView - is custom view in NSWindow
        [self.windowView setFrame:self.window.frame];
 }

Here is the screenshot: (view not in full size mode.)

enter image description here

Here is the view in full size mode. I have no idea why the view does not enlarge with window.

enter image description here

War es hilfreich?

Lösung

I think you will need to select these views in Interface Builder, and check the 'Size Inspector' as below.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top