문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top