这里是苹果官方关于实现全屏体验的文档:http://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/FullScreenApp/FullScreenApp.html
1. 实现全屏体验,可以自定义NSWindow,重新实现期初始化方法。
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)styleMask
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag {
if ([SystemVersion compare:@"10.7.0"] >= 0) {
self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO];
}
else {
self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: NO];
}
return self;
}
2. 设置窗口支持全屏体验
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
3885

被折叠的 条评论
为什么被折叠?



