isInFullScreenMode
フルスクリーンモードかを返します
解説
フルスクリーンモードかを返します。
フルスクリーンモードであればYES、そうでなければNOを返します。
返り値
( BOOL )
フルスクリーンモードYES/NO
引数
フレームワーク
ApplicationKit
クラス
NSView
使用可能
10.5
参照
例文
#import "SetImage.h" NSTimer *timer; @implementation SetImage - (IBAction)set:(id)sender { //Imageを作る NSImage *img = [NSImage imageNamed: @"NSApplicationIcon" ]; //レシーバimage(NSImageView)にimgをセットする [image setImage : img ]; /* NSFullScreenModeAnimation; NSFullScreenModeAllScreens; NSFullScreenModeSetting; NSFullScreenModeWindowLevel; */ LKAnimation *anime = [LKAnimation animation]; NSDictionary *fullscreenOption = [NSDictionary dictionaryWithObjectsAndKeys: anime,@"NSFullScreenModeAnimation", [NSNumber numberWithInteger:(NSInteger)1.0],@"NSFullScreenModeWindowLevel",nil]; //フルスクリーンモード設定 [image enterFullScreenMode:[NSScreen mainScreen] withOptions:fullscreenOption]; //1秒後に終了タイマー timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(timerControl) userInfo:nil repeats:NO]; } -(void) timerControl{ //フルスクリーンモード解除 if ([image isInFullScreenMode]){ [image exitFullScreenModeWithOptions:nil]; } } @end