2011-11-12 80 views
0

有沒有辦法在雪豹的全屏模式下轉換nsview?可可:雪豹全屏nsview

+2

您搜索的文檔?看看NSView類的參考。它有一個全屏模式的部分。 – sidyll

+2

是的,在谷歌 – rafa

+0

@rafa然後,我會假設你看到了我爲「全屏」所做的結果,所以你試過了什麼?什麼沒有用? –

回答

2

像這樣的東西應該爲你工作 -

- (IBAction)enterFullScreen:(id)sender 
{ 
    NSDictionary *fullScreenOptions = [[NSDictionary dictionaryWithObject:[NSNumber numberWithInt:1] forKey:NSFullScreenModeAllScreens] retain]; 
    BOOL fullScreenEnteredFlag = [fullScreenView enterFullScreenMode:[NSScreen mainScreen] withOptions:fullScreenOptions]; 
} 
1

的NSView有以下幾種方法

– enterFullScreenMode:withOptions: 
– exitFullScreenModeWithOptions: 
– isInFullScreenMode